Jump to content
  • Advertisement


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


Wrong texture rendered whenever using more than one

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

For some reason, in my newest DirectX 8 program, all of my polygons render using the last texture i set. the flow of code is very basic, and i''m only drawing two quads. Basic psuedocode: Set first texture; draw first polygon; set second texture; draw second polygon; I really have no idea what could be causing this. Can anyone help? (Yes, i know this isn''t much to go on)

Share this post

Link to post
Share on other sites

Without more code, I can''t say for sure, but from your description, it seems as if your first texture has loaded fine, but something has happened to your second texture (maybe it didn''t load?), so directx can''t use it.

My experience is that DirectX will not raise an error if you tell it to use an invalid texture via .settexture, but will instead use the last good texture that you told it to use.

What your happen, for example, if you comment out the line that sets the texture that you know works? If your second polygon gets rendered as a white square, then this is a good sign that your second texture isn''t working and you should verify that directx is loading it properly.

Good luck


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!