Sign in to follow this  

glPushName/glPopName and GLSL

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

This topic is 4170 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this