On 23/04/06, Phil Costin philcostin@hotmail.com wrote:
It seems we still need a HLSL to GLSL translator for SM 3.0 but that is for future discussion :)
Well, no, not directly. In Direct3D9 HLSL is compiled to the same kind of code as assembly shaders by the d3d9x library. The d3d9 dll never sees HLSL or assembly, just compiled shaders. Direct3D10 does contain a "D3D10CompileShader" function, but that's shader model 4.0.
I was curious as to whether it would be acceptable to provide a compile-time check for OpenGL 2.0?
No, and it's not required either. GLSL is an extension just like any other, and should be checked runtime, just like all the other extensions.