Jump to content
  • Advertisement
Sign in to follow this  
JorenJoestar

CGparameter problem

This topic is 3626 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
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!