Skip to main content
GameDev.net gamedev.net
🔒 Locked

passing structures into Cg

Started by edwinnie May 17, 2004 at 4:33 AM 1 replies 350+ views
Original Post
edwinnie
edwinnie
ok, i am fumbling through the Cg tut bk and cant find any help that will answer this qn... //Cg file void VertexProgram(Material material, Light light, ...) how do u pass a "Material" struct into Cg from C/C++ code? in short, how do u bind the "Material" parameter so Cg can recognize what it contains. thx! Edwinz
janos
janos
suppose you have

struct MyStruct
{
float a;
float b;
}


and you have a param of type MyStruct name MyStructParameter

just send the two parameters named

MyStructParameter.a

and

MyStructParameter.b

to Cg


[edited by - janos on May 17, 2004 9:15:40 AM]
Act of War - EugenSystems/Atari
edwinnie
edwinnie
hi thx fer replying!, will try it soon!

[edited by - edwinnie on May 18, 2004 3:51:44 AM]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.