PDA

View Full Version : Uniform Structs in Cg



FoobarWoozle
03-13-2005, 03:13 PM
Hello,

Is there an easy way to set an entire uniform struct parameter in a Cg shader from an OGL application?

thanks

CWiC
03-14-2005, 02:27 AM
The Cg runtime gives you the option of modifying the values of your program parameters. There are variants of these calls to set matrices, arrays, textures, and texture states. I'm afraid there is no possiblity to set entire structure at one call. Instead you should use cgGetFirstStructParameter and so on, parsing content of structure...