Jump to content
  • Advertisement
Sign in to follow this  
viper110110

Texturing a triangle, completely lost

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

I am trying to texture a triangle based on the rastertek tutorial 5, and I copied and pasted all the code (while reading through obviously) and then fixed the errors to work with windows 8. Once I got it running, I got a nasty texture problem, as seen in the screenshots. I have absolutely no idea whats going on. It looked like a uv mapping or wrapping issue, but I checked all the different wrap modes and the uv coordinates and they are all fine.

The first screenshot (the brown one) is the texture from the tutorial. The second screenshot (grey) is my own sample texture, which has a single pixel wide line down each of the 4 sides, one in each of red, green, blue, and black.

[attachment=11432:DXEngine 2012-09-23 23-50-36-08.bmp]
[attachment=11433:DXEngine 2012-09-23 23-50-47-91.bmp]

Share this post


Link to post
Share on other sites
Advertisement
So there it is, staring me right in the face like I am a complete idiot.

[source lang="cpp"]vertices[2].position = XMFLOAT3(3.0f, -3.0f, 0.0f); // Bottom right.
vertices[1].texture = XMFLOAT2(0.5f, 0.0f);[/source]

so I fix it.

Then this.

[attachment=11434:DXEngine 2012-09-24 01-20-48-95.bmp] Edited by viper110110

Share this post


Link to post
Share on other sites
Traditionally you don't: the usefulness of a forum comes from the fact that people can still learn from fixes well after the original poster fixed their own problem ;)

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.

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!