Hey guys, I'm looking to write some GLSL but need to output into bytecode is this possible?
thanks
GLSL Bytecode
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.
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.
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
Thanks
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).
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.
Maybe that's something you could look at.
Does CG toolkit have a GUI or is it just code that I add into my VS directory.
Do you have a download?
Do you have a download?
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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement