Cg interfaces

Started by
1 comment, last by gjaegy 18 years, 5 months ago
Hi! Has anyone here any experience with Cg shader interfaces? I know how to create and bind them in a single Cg program and all that jazz, but I would like to keep all my interfaces in an external file, so that I do not have to declare them in every Cg program I use. And afaik Cg doesn't support #include. How can I keep my interfaces in a separate file and then use them in different Cg programs? Thx for any help you can provide. Marek
Advertisement
Quote:Original post by marco1475
And afaik Cg doesn't support #include.


Sure it does. Cg always supported includes. Check out the interface examples that come with the Cg installer (they're for OpenGL BTW).


-SirKnight
Yes you can. When using the cg runtime, be sure to use the "-Iinclude_path" options with the cgd3d9CreateProgram (or similar).

Gregory Jaegy[Homepage]

This topic is closed to new replies.

Advertisement