Question GLSL,CG,Assembly shaders

hi

i have some question about shaders in opengl

  1. is GLSL available in the OpenGL 1.5?

  2. is CG limited to the nvidia graphics cards?

  3. can i use OpenGL’s low level shaders in the DirectX?

  1. Yes. The GL_ARB_shading_language_100 extension is written against the OpenGL 1.5 specification.

  2. It should also work for ATI cards, the cg compiler allows you to compile against a number of profiles available for both NVidia and ATI.

  3. No idea. I haven’t studied the DirectX shader models.

N.

  1. No.

And on 2, for Cg to work on ATI cards you have to compile either to ARB_vp/ARB_fp, which leaves out any modern shader features, or to GLSL, in which case you’d be better off writing GLSL in the first place.

thanks

-how can i use assembly shaders in the OpenGL ( which work with the DirectX)?

  • how can i detcet graphics card support CG?

-how can i use assembly shaders in the OpenGL ( which work with the DirectX)?

You don’t. OpenGL and D3D do not share assembly shading languages. And OpenGL does not have any widespread assembly shading languages that support more modern features.

  • how can i detcet graphics card support CG?

Detect whether it is an nVidia card. They’re the only ones that allow you to send a Cg shader through as a glslang shader. Otherwise, you will have to use the nVidia-provided Cg compiler.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.