Jump to content
  • Advertisement
Sign in to follow this  
darkprophet

glPushName/glPopName and GLSL

This topic is 4383 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

Hi all, I realised that the selection stack isnt accessible from shaders and im wondering why that is? The only solution I can think of is that the name stack is implemented on the software/driver side and not in HW; But the specification say that glPushName/glPopName are valid operations while creating a display list, and display lists (most of the time) get shoved into vram. So unless the driver filters the operations out and does some trickery with the selection matrix, why can't I access them from shaders? Regards, DarkProphet

Share this post


Link to post
Share on other sites
Advertisement
glPushName/glPopName dont have anything to do with a buffer. They get put on a stack, like the modelview matrix stack or the perspective matrix stack, or the texture matrix stack, which are all accessible in shaders.

Regards,
DarkProphet

Share this post


Link to post
Share on other sites
Seperating out objects into different render targets based on its name/ID is a valid usage which is what I would like to use it for. I do realise I could do the same using a uniform per object; but grouping objects under 1 name would have been ideal...and would probably require less overhead as the glPushName is needed for the entire rendering of all the objects, and it fits quite well with my engine.

Regards,
DarkProphet

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!