Jump to content
  • Advertisement
Sign in to follow this  
Scienthsine

OpenGL [SOLVED] glBindAttribLocation and NVidia

This topic is 3127 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does NVidia's drivers still not allow you to use the indices for old built-in vertex attributes? From: http://developer.download.nvidia.com/opengl/glsl/glsl_release_notes.pdf If so... doesn't this make glBindAttribLocation kinda useless? I would really like to have all 16 of my vertex attributes and be able to reference them with my own names... WTF NVidia? [Edited by - Scienthsine on December 2, 2009 5:52:44 PM]

Share this post


Link to post
Share on other sites
Advertisement
I think you're misunderstanding. There is only a problem if you actually use the old built-in name, and at the same time try to bind your own name to the same index.
Quote:
For example, you should not use gl_Normal (a built-in vertex attribute) and also use glBindAttribLocation to bind a generic vertex attribute named “whatever” to vertex attribute index 2 because gl_Normal aliases to index 2.
...
The compiler will automatically assign vertex shader attribute variables not pre-assigned by glBindAttribLocation to locations that do not collide with any built-in attribute variables used by the vertex shader. The assigned locations can be queries with glGetAttribLocation. This means that a developer only needs to worry about collisions when they are explicitly requesting an attribute to be bound to a specific location.

Share this post


Link to post
Share on other sites
Ohhhhhhhh ok!

I think this tutorial has the wrong idea then: http://www.opengl.org/sdk/docs/tutorials/ClockworkCoders/attributes.php

I felt that they were saying that those indices are reserved for built-ins only.

Share this post


Link to post
Share on other sites
You just misinterpreted it :) . It really basically reads "If you use gl_Normal, it takes slot 2 and no other". It's a limitation of GF6x00 and GF7x00.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!