Search code examples
c++opengldirect3dcg

Tutorial on integrating CG shader into GL and D3D9?


I've found many tutorials on writing CG shaders but none that show how to integrate it into a D3D or GL scene. Is there a tutorial that would show how CG would integrate into these?


Solution

  • I'm using this on iOS/Android OpenGL ES 2.0, but this could work for you too: hlsl2glslfork. It's a library that you can compile/link right into you application, and it can translate your Cg/HLSL to GLSL right before you call glShaderSource.