Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


N00b Texture adding problem

This topic is 5392 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 guys, Is anyone able to help me? I have two Textures (one loaded from file with color-keying and one dynamicly createt...), and now, I want to add the two textures and set in on the Screen. Unfotunately, I just can see the first Texture (the one, i loaded from the File)... Here''s the code
	tbDirect3D::SetTexture(0, m_pRadarTex);
  	tbDirect3D::SetTexture(1, pRadar2Tex);


	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_TEXCOORDINDEX, 0);

	tbDirect3D::GetDevice()->SetTextureStageState(0, D3DTSS_COLOROP,	D3DTOP_MODULATE);
	tbDirect3D::GetDevice()->SetTextureStageState(0, D3DTSS_COLORARG1,	D3DTA_CURRENT);
	tbDirect3D::GetDevice()->SetTextureStageState(0, D3DTSS_COLORARG2,	D3DTA_TEXTURE);

	tbDirect3D::GetDevice()->SetTextureStageState(0, D3DTSS_ALPHAOP,	D3DTOP_MODULATE);
	tbDirect3D::GetDevice()->SetTextureStageState(0, D3DTSS_ALPHAARG1,	D3DTA_CURRENT);
	tbDirect3D::GetDevice()->SetTextureStageState(0, D3DTSS_ALPHAARG2,	D3DTA_TEXTURE);

	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_COLOROP,	D3DTOP_ADD);
	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_COLORARG1,	D3DTA_CURRENT);
	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_COLORARG2,	D3DTA_TEXTURE);

	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_ALPHAOP,	D3DTOP_ADD);
	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_ALPHAARG1,	D3DTA_CURRENT);
	tbDirect3D::GetDevice()->SetTextureStageState(1, D3DTSS_ALPHAARG2,	D3DTA_TEXTURE);

	tbDirect3D::GetDevice()->DrawPrimitiveUP(D3DPT_TRIANGLESTRIP, 2, m_RadarVertex, sizeof(SRadarVertex));

Thanks, Chrissi

Share this post

Link to post
Share on other sites

  • 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!