Sign in to follow this  

I am crazy! ----- SetTextureStageState

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

This topic is 4398 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.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this