Jump to content
  • Advertisement
Sign in to follow this  
OuncleJulien

Texture stage state whoes

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

Argle! So after hours of making a project for school I have just now realized that the textures on my D3D app are all black on nvidia machines. I have a geforce 3 and a geforce 6800 Ultra that both don't display anyhing. After some research I've found that with nvidia cards you can't trust a default texture stage state. I've thought this to be true for all graphics cards though. So as the bare min I'm always sure to put these in: g_d3dDevice->SetRenderState(D3DRS_LIGHTING,FALSE); g_d3dDevice->SetRenderState(D3DRS_CULLMODE,D3DCULL_CCW); g_d3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1); g_d3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE); g_d3dDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE); Am I missing anything that would cause this discrepency? What are the states and params that every D3D app should set to make sure textures work on both ATI and nvidia cards? What do you guys set? (I'm only using 1 texture and no lighting btw) Thanks!

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by OuncleJulien
g_d3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_SELECTARG1);
g_d3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
g_d3dDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_DISABLE);

This is illegal. You must have an alphaop if you have a colorop. Also, you should set stage 1 COLOROP to disable to properly stop after stage 0.

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!