PDA

View Full Version : warning: no vertex attribute zero



Dark Photon
11-09-2009, 10:58 AM
warning: no vertex attribute is explicitly assigned to vertex attribute zero
If anybody has hit this, what are the options for getting rid of this warning?

Sometimes you just don't need gl_Vertex (vertex attrib 0) in the vertex shader to do the job.

Alfonse Reinheart
11-09-2009, 11:25 AM
If you're not using the built-in attribute "gl_Vertex", you must specifically designate one of the vertex attributes to be attribute 0. Use "glBindAttribLocation" before linking the program.

Brolingstanz
11-09-2009, 12:09 PM
#pragma warning(...) would be nice here.

Dark Photon
11-09-2009, 12:48 PM
If you're not using the built-in attribute "gl_Vertex", you must specifically designate one of the vertex attributes to be attribute 0. Use "glBindAttribLocation" before linking the program.
Thanks. I didn't find anything on this in the spec. Is this a spec issue or a vendor driver quirk?

And if the former, is this true even for GLSL 1.3-1.5? Maybe I'm just searching for the wrong strings.

bertgp
11-10-2009, 06:02 AM
The orange book mentions this in the chapter about vertex attributes and uniforms. I don't know where they got this information from however.

Dark Photon
11-10-2009, 05:10 PM
Thanks for the tip!

Stephen A
11-10-2009, 11:29 PM
I think this limitation was lifted in OpenGL 3.0+.

Alfonse Reinheart
11-11-2009, 01:06 AM
I think this limitation was lifted in OpenGL 3.0+.

Well, it is just a warning...