View Full Version : Running Cg and GLSL in parallel
05-28-2005, 06:51 PM
I'm not too aware of how the underlying architecture works when it comes to compiled shader code.
How dirty (or possible) is it to have Cg and GLSL shaders loaded at once (obviously not running at once, but say drawing one item in a scene while using a Cg shader, then switching over to a GLSL shader)
05-28-2005, 11:35 PM
That's perfectly possible and should work fine. You can also use assembly shaders (i.e. ARB_vertex/fragment_program shaders) for some objects, but GLSL shaders for others. In the end, all types of shaders will get compiled to a hardware-specific shader program by the driver. So in the end it doesn't make much difference if the shader is originally written in Cg or GLSL, apart from the fact that you might run into different compiler bugs ;)
I use Cg and GLSL in the Ogre (http://ogre3d.org) rendering engine at the same with no problems. ie a rendering operation that binds an arbfp and then another rendering operation that binds GLSL.
Powered by vBulletin® Version 4.2.3 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.