views:

23

answers:

1

I'm trying to use libRocket in an iPhone application (with cocos2d), but I can't seem to get over OpenGL error 0x0500 in -[EAGLView swapBuffers]. It seems to be triggered when calling glDrawElements(GL_TRIANGLES, num_indices, GL_UNSIGNED_INT, indices); in ShellRenderInterfaceOpenGL.

I had to change GL_RGB8 to GL_RGB in the GenerateTexture function. I'm sure it's probably related but GL_RGB8 is not found when compiling.

any pointers?

+1  A: 

In OpenGL ES, glDrawElements accepts type = GL_UNSIGNED_BYTE or type = GL_UNSIGNED_SHORT, GL_UNSIGNED_INT is not valid and thus generates GL error 0x500, which is GL_INVALID_ENUM.

Matias Valdenegro
That fixed it. Thank you very much!
sharvey