Enable Client State -- what's it do exactly?

Problems with Canvas, OpenGL, etc...

Enable Client State -- what's it do exactly?

Postby tenfour » Thu Aug 04, 2011 3:39 am

In all the examples I've seen, these lines are used before drawing meshes:
gl.glEnableClientState(GL10.GL_VERTEX_ARRAY);
gl.glEnableClientState(GL10.GL_TEXTURE_COORD_ARRAY);

And then these are always disabled again at the end of the draw call for each mesh.

I don't really understand what they actually do, and why you would want to disable them. I presume it would be more efficient not to disable and re-enable these for each mesh in your scene if you don't have to. Can you just leave them on all the time?

I haven't been able to find any explanation of the actual meaning of these client states, so I don't know where I can turn them off in my code.
tenfour
Freshman
Freshman
 
Posts: 7
Joined: Mon Aug 23, 2010 10:55 pm

Top

Return to Android 2D/3D Graphics - OpenGL Problems

Who is online

Users browsing this forum: No registered users and 4 guests