Jump to content

View more

Image of the Day

WIP title screen for #DeathOfAPartisan #screenshotsaturday #gamedev https://t.co/qJNhfZCvd4
IOTD | Top Screenshots

The latest, straight to your Inbox.

Subscribe to GameDev.net Direct to receive the latest updates and exclusive content.


Sign up now

sharing vertex attributes between shaders

4: Adsense

Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.


  • You cannot reply to this topic
1 reply to this topic

#1 ic0de   Members   

974
Like
0Likes
Like

Posted 14 December 2012 - 09:07 PM

I have several shaders that share a common set of vertex attributes and I was wondering if it was possible to share the index of a vertex attrib array between two or more shaders so that I don't need to bind a different vertex attrib array for each different shader I use.

Edited by ic0de, 14 December 2012 - 09:08 PM.

Currently working on new DOS game, Chuck Jones: Space Cop of the Future, Check out my Dev Blog
 

you know you program too much when you start ending sentences with semicolons;


#2 C0lumbo   Members   

4366
Like
1Likes
Like

Posted 15 December 2012 - 02:47 AM

I use glBindAttribLocation on all my shaders to force attributes into known slots. You have to call it before linking your program.




Old topic!

Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.