Sign in to follow this  
giugio

OpenGL cg and opengl matrix

Recommended Posts

Hy. In what format i must pass a 4x4 opengl matrix to a cg shader(constant buffers) float4x4 float by float? i'm try: 1,2,3,4//first 4 float 1 5,6,7,8//second 4 float 2 9,10,11,12//third 4 float 3 13,14,15,16//last 4 float 4 and: float* f= new float[16] f[0]=1 first float f[1]=2 second float first 4 float f[2]=3 third float f[3]=4 fourth float f[4]=5 fift float f[5]=6 six float second 4 float f[6]=7 seven float f[7]=8 eight float ecc.. but don't work. may be that I must traspose the matrix? thanks.

Share this post


Link to post
Share on other sites
also i have a doubth:
I use wild magic 4 engine that transform the geometry that is in the scenegraph for default, then if i transform the geometry i transform all two times?
may be?
i must disable the recursive matrix transform of the scenegraph?
thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this