Tutorial on integrating CG shader into GL and D3D9?
Question
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
.
OTHER TIPS
http://www.codesampler.com/oglsrc/oglsrc_10.htm#ogl_cg_simple_vs2ps - This sample might help you. http://developer.nvidia.com/node/91 - You can also read this.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow