Jump to content
  • Advertisement
Sign in to follow this  

SetSamplerState makes my app freeze

This topic is 4705 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! I have a Texture class designed to handle texture loading/managing operations. It stocks the Texture, Filter types, the filename and optionnally an ID. All the codes works well and renders execept this:
void D3DY::CD3DYTexture::SelectTexture(LPDIRECT3DDEVICE9 const Device,int iTexNum)
	if(iTexNum<0) return;


Unless I comment out the SetSamplerState functions, my app makes an error at this moment. That is, right after the SetTexture which works. What can be the cause of this? Does calling SetSamplerState between beginscene and endscene result in a bug? oh, and m_TexFilter and m_MipFilter are defined like so: D3DTEXTUREFILTERTYPE m_TexFilter, m_MipFilter; Which, in my program, corresponds to D3DTEXF_LINEAR and D3DTEXF_LINEAR

Share this post

Link to post
Share on other sites
The easiest way to figure out what you are doing wrong will be to Enable D3D Debugging and check the Output from the debug runtime. It will tell you exactly what you are doing wrong in this situation.

As a general rule, if you get an INVALID_CALL error, fire up the debugger and check out the D3D output.

Share this post

Link to post
Share on other sites
Oh I see!

Thanks for the advice, I should have done this first.

I get an error like so:

First-chance exception at 0x77e55a3d in Debug.exe: 0xC0000005: Access violation reading location 0x03e4eb80.
Direct3D9: (ERROR) :Invalid texture pointer. SetTexture failed.

0x03e4eb80 corresponds to my texture pointer's value.

I'll investigate on the case

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!