Skip to main content
gamedev.net
🔒 Locked

Texture rendering error

Started by feind Nov 25, 2003 at 10:52 AM 2 replies 300+ views
Original Post
feind
feind
I''m having some trouble rendering textures correctly. I have a polygon-strip forming a square with the size of 1x1. When I run my program, the texture is just horizontal, dark red lines. One of the textures is just a random doodle of various colours, and the second is a red car, viewed from above. This is what they look like (when rendered): Random doodle texture: http://www.imagestation.com/picture/sraid89/pf466ee6bd2cd4b36cfc3ce89d34e8e45/fa77ea69.jpg Car texture: http://www.imagestation.com/picture/sraid89/pe35ea6a159e06b9a397012f9c2e29047/fa77ea66.jpg Does anyone know what might be wrong? The textures are saved as 24-bit BMPs, but I''m running 32-bit mode; could that cause trouble? These are the settings for the texture stage (I''m following a tutorial, maybe I need to change something?): D3DTSS_COLOROP = D3DTOP_MODULATE D3DTSS_COLORARG1 = D3DTA_TEXTURE D3DTSS_COLORARG2 = D3DTA_DIFFUSE D3DTSS_ALPHAOP = D3DTOP_DISABLE I''ve tried using D3DXCreateTextureFromFileEx() instead of the normal one, but the result was the same. Anyone? =J
Dave Hunt
Dave Hunt
I would suspect your texture coordinates are off.
feind
feind
Ahhh. Problem solved. I had enabled the D3DFVF_DIFFUSE tag. I''m quite sure that was what the tutorial said, though (nexe.gamedev.net is the url. it seems to be down, or is for me at least, so i can''t check it right now)

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.