What is the difference between glEnable and glEnableClientState?

What is the difference between glEnable and glEnableClientState? Every time I need to set / disable the mode, I have to look at the link to find out which of them will accept it. Is there any general rule that says which modes go into which?

+4
source share
3 answers

In addition to tibur's answer in practice, the only use of glEnableClientState and glDisableClientState is to enable / disable the built-in attribute arrays of a fixed function (e.g. GL_VERTEX_ARRAY , GL_NORMAL_ARRAY , ...). For all other states, you use glEnable and glDisable (or glEnableVertexAttribArray and glDisableVertexAttribArray for common vertex shader attributes).

+6
source

glEnable are server-side and glEnableClientState are client-side. Think of the server side as the processor and the client side as your GPU. Globally, vertex arrays are client-only.

+2
source

glEnable used for a set of states defined by OpenGL ARB, representing the internal state of the driver. glEnableClientState is a state that represents information that you more directly control. The only client state that existed to enable / disable were the old states of the vertex array. And they were exceeded by glEnable/DisableVertexAttribArray .

The difference does not really make sense, since the driver still controls all of this state.

+2
source

All Articles