[SOLVED]Why do we need ofSetPolyMode and when to use it?

Hi, I’m curious in what circumstance, would one wants to use ofSetPolyMode(ofPolyWindingMode)

There are these modes,

OF_POLY_WINDING_ODD 	        ,
OF_POLY_WINDING_NONZERO         ,
OF_POLY_WINDING_POSITIVE        ,
OF_POLY_WINDING_NEGATIVE        ,
OF_POLY_WINDING_ABS_GEQ_TWO

I tested them and they have effect on some shapes (unclosed shapes mostly) but on more common shapes like rectangle, circle… it didn’t have any effect on the shape.

Could anyone please briefly explain when would I want to use it?

Winding is used for culling mostly. More on face culling

1 Like

Thank you so much!

Could you also briefly teach me when to use ofDrawBitmapMode?

OF_BITMAPMODE_SIMPLE = 0,
OF_BITMAPMODE_SCREEN,
OF_BITMAPMODE_VIEWPORT,
OF_BITMAPMODE_MODEL,
OF_BITMAPMODE_MODEL_BILLBOARD

These are the options of it. Thank you!

And really the last one, ofBlendMode

OF_BLENDMODE_DISABLED = 0,
OF_BLENDMODE_ALPHA 	  = 1,
OF_BLENDMODE_ADD 	  = 2,
OF_BLENDMODE_SUBTRACT = 3,
OF_BLENDMODE_MULTIPLY = 4,
OF_BLENDMODE_SCREEN   = 5

Okay, I think I roughly understand what ofBlendMode is. it seems to affect RGBA.
But I have no idea what ofDrawBitmapMode is and when to use it.

OKay, I found the relevant thread!

Thanks!!

1 Like