Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

glEnableClientState deprecated

Tags:

c++

opengl

vbo

I want to use GL_POINT_SPRITE_ARB + VBO for my particle system rendering. I've done all preparations with point_sprites, but stuck at VBO. It seems that glEnableClientState, is not working. I read that it is deprecated in modern openGL. So, what should i use instead?

like image 862
user1575728 Avatar asked Aug 04 '12 07:08

user1575728


1 Answers

glEnableClientState is how you tell OpenGL that you're using a vertex array for a particular fixed-function attribute (gl_Vertex, gl_Color, etc). Those are all removed from core contexts. You should use glEnableVertexAttribArray to enable a generic vertex attribute, and you use glVertexAttribPointer to associate that attribute with a buffer object.

like image 136
Nicol Bolas Avatar answered Oct 07 '22 12:10

Nicol Bolas