• Advertisement
Sign in to follow this  

Cg interfaces

This topic is 4474 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
Yes you can. When using the cg runtime, be sure to use the "-Iinclude_path" options with the cgd3d9CreateProgram (or similar).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement