Jump to content
  • Advertisement

Archived

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

WebsiteWill

New Graphics card and texture errors

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

Hey all I just upgraded from a GeForce 4 MX to an ATI 9800 Pro and put in another 512 ram. Now my interface code is not doing so well. I have 3 textures. One is a background I am placing ove rthen entire screen. The next is a bitmap that has the widget images for the interface and the other is a bitmap that makes up the background for the interface windows. Pretty much everything is showing blue (the color I clear the screen to. However, some of the icons laid out on the widget bitmap are showing but completely black and others are showing as if they are lit from the top left corner. The rest are not showing at all. I have checked my device caps and I was only requiring the minimum caps from before. This card has those and then some to say the least. Anyone have some ideas off the top of their heads? NO matrix code or texture coordinates have changed. In fact, nothing in the code has changed since I installed the card. I have uninstalled/reinstalled the DX SDK and have created a brand new Visual C++ project and moved over my files just in case it was some strange error there but the problem persists. Can post code in snippets if anyone needs to see how I am doing certain things but otherwise it''s too darn much code to post it all. Thanks for any replies, Webby

Share this post


Link to post
Share on other sites
Advertisement
have you turned lighting off?
are the diffuse colors for the verticies white

check TextureStates and see if the coloroperation = modulate or something of the sort and make sure the right colorargument is set to the texture color

Share this post


Link to post
Share on other sites
Here is the way it has been set up for a few months now. It was working fine until I installed the new card last week. Is something missing that the other card would not have cared about?

Webby


GetCurrentDisplayDevice()->SetTransform(D3DTS_PROJECTION, &m_Ortho2D);
GetCurrentDisplayDevice()->SetTransform(D3DTS_WORLD, &m_Identity);
GetCurrentDisplayDevice()->SetTransform(D3DTS_VIEW, &m_Identity);


GetCurrentDisplayDevice()->SetRenderState(D3DRS_LIGHTING, FALSE);
GetCurrentDisplayDevice()->SetRenderState(D3DRS_ALPHABLENDENABLE, TRUE);
GetCurrentDisplayDevice()->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
GetCurrentDisplayDevice()->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);

GetCurrentDisplayDevice()->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
GetCurrentDisplayDevice()->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
GetCurrentDisplayDevice()->SetTextureStageState( 0, D3DTSS_ALPHAARG2, D3DTA_TFACTOR );

GetCurrentDisplayDevice()->SetVertexShader(NULL);
GetCurrentDisplayDevice()->SetStreamSource(0, m_pUIVB, 0, sizeof(CUSTOMUIVERTEX) );
GetCurrentDisplayDevice()->SetIndices(m_pUIIB);
GetCurrentDisplayDevice()->SetFVF(D3DFVF_CUSTOMUIVERTEX);

Share this post


Link to post
Share on other sites
Have run many times in Debug mode and can''t seem to figure it out. The correct texture is getting loaded from the correct directory.

About the texture color, I am doing this
GetCurrentDisplayDevice()->SetRenderState(D3DRS_TEXTUREFACTOR, D3DCOLOR_ARGB(m_ucAlpha, 255, 255, 255) );

I''ve tried giving it an alpha value of 0 and of 255. Have also changes RGB from 0 to 255 and all 4 combinations of full/no alpha with full/no texture color.

It''s gotta be something simple since I can see some parts of the interface but not others so I know that the textures are getting loaded, just something petty isn''t correct.

Off to the debugging board.
Webby

Share this post


Link to post
Share on other sites
You have SetTextureStageStates for Alpha, but not for Colour. This isn''t a good thing.

Try:
GetCurrentDisplayDevice()->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
GetCurrentDisplayDevice()->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
GetCurrentDisplayDevice()->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_TFACTOR );

Stay Casual,

Ken
Drunken Hyena

Share this post


Link to post
Share on other sites
Thanks I''ll give it a try but I am slowly working it out.
Funny thing is, I now have some icons showing up in glorious color and others not showing up at all. Even though they are using the same path to the same texture and are rendering with the exact same function... It''s boggling. Think I might relieve some anxiety in FarCry

Webby

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Have you tried Upgrading to that GeForce4 Mx I mean really. The Radeon seems to be doing you no good in its current ATI state.

Not trying to all you ATI users but this thread jumps out and screams ATI driver bug, didn''t they say they fixed those. Well anyway I wish you luck in you Endeavors.

Share this post


Link to post
Share on other sites
quote:
Original post by Anonymous Poster
Not trying to all you ATI users but this thread jumps out and screams ATI driver bug, didn''t they say they fixed those.
I seriously doubt this is a driver bug, since ATI''s maintains exceptional quality in their drivers nowadays. Also, if they had a bug in their texturing pipeline, I''m sure they would know about it by now. If anything, nvidia are the ones behind on their product quality (compared to ati''s) now.


Dustin Franklin
Mircrosoft DirectX MVP

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!