Jump to content
  • Advertisement
Sign in to follow this  
laeuchli

OpenGL Cg and DirectX debug info

This topic is 4060 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

Dear All, I've just started working on someone elses code, which is basicly a wrapper for DirectX and OpenGL. I've been trying to get familar with the code base, and have been running the DirectX section of the code though the debugger. I notice lots of redundant SetSampler warnings in the debug information. However when I look at the code, I dont see anyplace that could be calling it that often(in fact I've placed break points on the SetSampler calls, and they are only getting called once at startup, whereas I'm getting lots of SetSampelr warnings). I've noticed several of the Cg DirectX demos also have this problem. Is this an issue with Cg(and if so should I be concerned about this), or is it more likely that theres some problem I havent detected in the code? If the latter is the case, does anyone have a suggestion on how to go about debugging this? Regards Jesse

Share this post


Link to post
Share on other sites
Advertisement
If memory serves me right, that warning only shows when you have the DX warning level set to highest.

Also, in my experience, ID3DXEFFECT tends to generate similar warnings when used, so it's probably safe to say they're coming from the CG handling.

I wouldn't worry about it too much. I mean, it is setting redundant states, but that's not a big deal. Not a big deal at all. I just keep my warning level at a notch under the highest.

Hope this helps.

Share this post


Link to post
Share on other sites
I found the problem by stepping though every line for several frames. It had to do with how the guy who'd written it had set it up to handle multiple windows, so he was releasing and resetting the fragement shader each time frame. So in the end it was possible to get rid of most of them. I'm aware its not a super serious error, but my understanding is its better to get rid of them. Then again maybe not. Can anyone pronounce for certain?

Share this post


Link to post
Share on other sites
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!