only using glVertexAttribPointer

Hi, I read -some time ago- -somewhere on the internet- that in -some future openGL specification- that the only way to pass vertex attributes will be through the glVertexAttribPointer command, replacing all of glVertexPointer, glNormalPointer etc.

Initially I thought that seemed like an OK idea, simplifying the API interface etc… So I was about to get around to updating my graphics library to reflect this, but, now I’m confused as in some circumstances I like to use the default gl shaders for less important geomerty in my scenes as they’re generally less expensive than my own shaders.

Is there a way to pass vertex information down the standard gl pipeline using only glVertexAttribPointer? Or do I now have to rewrite those shaders in glsl by copying from the red book or something like that?

but, now I’m confused as in some circumstances I like to use the default gl shaders for less important geomerty in my scenes as they’re generally less expensive than my own shaders.

Yeah, the “default gl shaders” were “removed” in the same spec that got rid of glVertexPointer, et. al.

However, since NVIDIA is going to ensure that it never actually gets removed from OpenGL implementations, don’t worry about it. Nothing has changed. As usual.

In that future you are talking about (OpenGL 3.1+), there are no “default shaders”, no fixed function pipeline. So your worries are already obsolete :wink:

Yep, and if you should absolultely need backwards compatibility, check for ARB_compatibility and create a context under the compatibility profile - boom.