Does the latter deprecate the former?
I'm writing code which I would like to work on shader 2.0 hardware, but I want to use the more recent programming conventions such as VAO's.
So I have been using the glVertexAttribPointer
functions instead of glVertexPointer
, glNormalPointer
, glColorPointer
and so on.
It seems as though we have come to a point where the server-client concept isn't... particularly relevant (edit: I meant as it applies to switching state for these buffer pointers). But I'd like to know just what the old En/DisableClientState
actually does and how it relates to what glEnableVertexAttribArray
actually does.
And I also don't have any graphics hardware from 5 generations ago, but surely some user of my software might. How might I go about preventing my code from failing to compile on a Radeon 9700 for instance? (Though I hope if a user has the latest driver it might support the new stuff)
It seems as though we have come to a point where the server-client concept isn't... particularly relevant
Actually it's very relevant. The whole Buffer Objects terminology is in terms of server and client. The buffers are server side, and the client just issues drawing commands referring to the server side buffers.
The main reason for replacing glEnableClientState with glEnableVertexAttribArray is, that since OpenGL-3 always uses vertex arrays (there's no longer an immediate mode), and the distinction if the data is client or server side, is made by the binding states of the various buffer object slots. If buffer object 0 is bound, the data is client side, if the bound buffer object is nonzero it's server side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With