I’m using the ofBoxExample on iOS to get a feel for binding a texture to a ofBox. However, it seems like some of the sides aren’t rendering correctly since you can see through them when the box should be solid. Has anyone noticed this before?
more picture examples.
the last picture is correct. So only certain angles it seems to render correctly.
Do you have depth test enabled?
I believe so. I have the following in my main.mm
ofAppiPhoneWindow * iOSWindow = new ofAppiPhoneWindow(); iOSWindow->enableAntiAliasing(4); iOSWindow->enableRetinaSupport(); iOSWindow->enableDepthBuffer(); ofSetupOpenGL(iOSWindow, 480, 320, OF_FULLSCREEN); ofRunApp(new testApp);
Is there another call other than ‘iOSWindow->enableDepthBuffer();’ we need to do?
I missed that you need the following in main.mm:
glEnable( GL_DEPTH_TEST );
before the 3D part.
Thanks for the tip!