Sign in to follow this  

GLSL Shader Versions

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

'Lo all. I'm currently doing a little research on GLSL - to perhaps take over from Cg in my engine. Now, at the moment, finding out the shader version the hardware supports is pretty easy using Cg, however, I can't seem to find an GLSL equivelent. How can I find out what shader version the hardware supports?

Share this post


Link to post
Share on other sites
Aside from GLSL version numbers (which can be retrived via glGetString(GL_SHADING_LANGUAGE_VERSION); see GDC05 videos and pdfs in Forum FAQ) GLSL doesnt have a concept of 'versions' like DX or Cg. All GLSL functions are valid, you'll just get throw back into software for some and not others.

However, GLSL does have cap querying functions which allow you to work out what the card can do, for example if you ask how many texture stages you can read from in vertex programs and you get zero back you can safely assume you are on a PS2.x card (ATI or GFFX), then if you query the number of uniforms avaible you can figure out what ATI card (X800 has a high instruction count and 4096 uniforms to use)

As to if this is setup is a good or bad thing, camps are divided as you'd expect, but its what we have to work with so meh, go with it [smile]

As a side from GLSL1.10 the version of GLSL the shader is written against can be specified along with some syntax for adding extensions, as before see the pdf and videos in the Forum FAQ

Share this post


Link to post
Share on other sites

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