Jump to content
  • Advertisement
Sign in to follow this  

I am crazy! ----- SetTextureStageState

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

if I set multi texture then other mesh will be total black.
	m_device->SetTexture(0, m_tex);
	m_device->SetTexture(1, m_detailTex1);
	m_device->SetTexture(2, m_alpha1);
	m_device->SetTexture(3, m_detailTex2);
	m_device->SetTexture(4, m_alpha2);
	m_device->SetSamplerState(1, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP);
	m_device->SetSamplerState(1, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP);

//   if I just remove these line below all mesh will show

	//base pic
	m_device->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
	m_device->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
	m_device->SetTextureStageState(0, D3DTSS_RESULTARG, D3DTA_TEMP);

	// detail pic1
	m_device->SetTextureStageState(1, D3DTSS_COLORARG1, D3DTA_TEXTURE);
	m_device->SetTextureStageState(1, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
	//	first alpha
	m_device->SetTextureStageState(2, D3DTSS_COLOROP, D3DTOP_BLENDTEXTUREALPHA);
	m_device->SetTextureStageState(2, D3DTSS_COLORARG1, D3DTA_TEMP);
	m_device->SetTextureStageState(2, D3DTSS_COLORARG2, D3DTA_CURRENT);
	m_device->SetTextureStageState(2, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1);
	m_device->SetTextureStageState(2, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);

I already disable texture ,I just use text 0
                                d->SetTexture(1, 0);
				d->SetTexture(2, 0);			
m_device->SetTexture(0, tex);
render other mesh but toal black.

[Edited by - derek7 on December 4, 2005 3:14:02 AM]

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!