Question

I know that I can't do glPush/PopAttrib in openGL ES and that I have to do this manually. My question is: What do I need to enable/disable and psuh/pop in order to properly render 3D models?

The problem I have is that colors are being mixed between different object to render. Also, some object do not have textures and it looks like it is trying to apply one to it.

Is there a "safe" maybe not optimised way to make sure every time I render a new object the openGL state is "clean" ? Kinda like glPushAttrib(GL_ALL_ATTRIB_BITS)

Was it helpful?

Solution

No, there isn't. But there are much fewer possible states (~10) in OpenGL ES 2.0, everything else is controlled by your very own shaders, anyway. Basically you just have to enable/disable all possible states to be sure (and properly configure the ones you enabled).

A list of all states can be found here:

http://www.khronos.org/opengles/sdk/docs/man/xhtml/glEnable.xml

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top