Jump to content
  • Advertisement
Sign in to follow this  
kubapl

GLSL Bytecode

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

Advertisement
I don't think it (OpenGL 4.1) supports bytecode in the same way HLSL does, you can get a binary blob back from the driver but it can only be reloaded on that same device... not distributed with your application or anything.

There's a big (rather heated) discussion at opengl.org where it was stated pretty authoritatively that GLSL will not get an intermediate format like this anytime in the near future. Although I think OpenGL ES might be getting something, as compiling shaders at runtime on mobile devices can be pretty slow.

Share this post


Link to post
Share on other sites
Okay so maybe I wasn't to clear. I'm working on a project that does not support any high level shader languages. So what I am trying to do is write a GLSL shader and then have that translated to the equivalent ARB Assembly or Bytecode.

Thanks

Share this post


Link to post
Share on other sites
Maybe somebody more knowledgeable than me can jump in here, but since there is no GLSL bytecode specification your only option would be to try to convert it to ARB assembly (which is before my time so I can't really comment further).

Share this post


Link to post
Share on other sites
Hm, it's been a while and I've never been an OpenGL-expert, but IIRC nvidia's cg compiler outputs viewable ARB-assembler. (It compiles many things to many other things.) I once had to compile shaders for an OpenGL project and wanted to look at the compiler output to see what became of my ifs and fors. Anyway, I think I used GLSL as input, but it may have been Cg, I don't know for certain.

Maybe that's something you could look at.

Share this post


Link to post
Share on other sites
Quote:
Original post by kubapl
Does CG toolkit have a GUI or is it just code that I add into my VS directory.

Do you have a download?


The compiler runs from command prompt.

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!