Jump to content
  • Advertisement
Sign in to follow this  

screen is always white when changing texture and render states?

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

I'm just messing around with different SetTextureStage calls but the screen is always completely white when I use them. If you need more info than what's below please ask I'm not sure what all you'll want.
// Everything is 2D Orthoganal, So I just draw one background image and
// randomly draw several imgaes in a 128x128 pixel area. The normal states 
// just setup alphablending.

		(*m_d3ddev)->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
		(*m_d3ddev)->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
		(*m_d3ddev)->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);


		(*m_d3ddev)->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_ZERO);
		(*m_d3ddev)->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_SRCCOLOR);
		(*m_d3ddev)->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_ADD);
		(*m_d3ddev)->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);

// the above code is what I'm using to set the states, there's only to sets of 
// changes, the background is normal the others are the screen blend

// the inital states are setup at the beginning of the program
m_d3ddev->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
	m_d3ddev->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
	m_d3ddev->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
	m_d3ddev->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);

any help is appreciated

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!