Sign in to follow this  

CGparameter problem

This topic is 3314 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 guys, recently I've changed my renderer to support both CgFx and HLSL but I have a problem using Cg... As test purpose, I'm using a really simple CgFx program that applies a texture to an object, without any kind of illumination. I have two parameters: the worldviewprojection matrix and the texture, nothing more and nothing less. Now comes the problem: I have two objects using this CgEffect, and I take the CGparameter using cgGetNamedEffectParameter, and this handle is used for both the meshes. The problem is that the last value set is the one used across the meshes, so for example the texture is the second for both...what am I doing wrong? thanks!

Share this post


Link to post
Share on other sites

This topic is 3314 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.

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