GlEnableClientState and glEnableVertexAttribArray

Do the latter deny the former?

I am writing code that would like to work with shader 2.0 equipment, but I want to use later programming conventions like VAO.

So, I used the functions glVertexAttribPointer instead of glVertexPointer , glNormalPointer , glColorPointer and so on.

It seems that we have come to a point where the server-client concept is not ... especially relevant (change: I had in mind, since this refers to the switching state for these buffer pointers). But I would like to know what the old En/DisableClientState actually does and how it relates to what glEnableVertexAttribArray actually does.

And I also do not have graphics hardware from 5 generations ago, but, of course, some user of my software can be used. How can I prevent the failure of my code on Radeon 9700? (Although I hope that if the user has the latest driver, he can support the new material)

+6
source share
1 answer

It seems that we have come to a point where the server-client concept is not ... especially relevant

This is actually very relevant. The term "Buffer Objects" refers to the server and client. The buffers are on the server side, and the client simply issues drawing commands related to the buffers on the server side.

The main reason for replacing glEnableClientState with glEnableVertexAttribArray is that since OpenGL-3 always uses vertex arrays (now there is no faster mode), the difference, if the data is client or server, is made using binding states with different slots of buffer objects. If the buffer 0 object is bound, the data is client-side if the linked buffer object is different from it on the server side.

+8
source

Source: https://habr.com/ru/post/905769/


All Articles