I think I’m seeing some interesting / unexpected behavior here - it seems as if simply enabling face culling / GL_BACK breaks drawing for a some planar objects, like ofFbo.draw internally, ofTrueTypeFont, etc.
I’m assuming this is a winding order issue for the primitives being drawn. Anyone else encounter this? Would be nice to not have to manage state, and have things draw front facing by default… non?
Shall I file a bug ?
yes this is a mess, sorry, traditionally we’ve done all the polygons CW, the new 3d primitives are mostly CW too but i think the box is CCW! anyway there’s already an issue opened for this. you can fix it mostly by setting glCullFace(GL_CW) when drawing any of… but yes if you are combining it with 3d models you’ll need to change back and forth from CW to CCW
Ah I missed the issue on git hub - ill ping it, it would be good I think to ensure winding is the same for all of oF, just for sanities sake. Small detail and definitely annoying to fix, I’m sure.
Thanks for explaining.
Interesting, it seems binding an FBO also changes the face forward code (other that or the projection matrix is in correct).
Both examples render nested spheres with face culling enabled:
Without an FBO :
With an FBO :
Disabling face culling resolves the issue, but it does mean all front facing surfaces are in fact, back facing, and that will effect lighting / normals etc non?