Skip to main content
gamedev.net
🔒 Locked

Texture is colored wrong

Started by roel_v 3 replies 400+ views
Original Post
roel_v
roel_v
Hi all, I''m trying to use a texture but I can''t get the color of that texture right. I can see the pattern of the bitmap, but it looks like the light parts of the bitmap are colored dark purple, which gives the whole pattern a dark purple shine. I''ve tried to use the bitmap that comes with NeHe tutorial 6, and that works fine. I''ve tried to compare the two pictures with paintshop pro and as far as I can see things like the size and color depth are the same. Any ideas?
Leyder Dylan
Leyder Dylan
Need to see the source code for the texture generation.
========================Leyder Dylan (dylan.leyder@slug-production.be.tf http://users.skynet.be/fa550206/Slug-Production/Index.htm/
walshb
walshb
Yeah, would need to see some source before I knew definitely what the problem was, but here are some ideas.

1. Do you have and glColor{i/u/f}() commands beforehand, if so then you have to reset the color buffer before you draw anything with the texture. (Not sure what I''m talking about, check the Red Book for Color buffer, there''s an online version somewhere on this site under "Articles and Resources" at the top.)

2. Check material properties, if you don''t know what this is chances are you don''t have it in there.

3. Check any commands where you might not be sure what they do (apologies if you''re not a newbie). I just say this because now and then even I still get caught with a pointless command in my OpenGL code.

I need no signature... well, alright.http://www.derzwerg.net
roel_v
roel_v
Thanks for all your replies! walshb: you put me on the right track, I did make some glColor3d() calls before I used the texture and I did not reset the color buffer. I didn''t get the Color part of the red book yet, I shouldn''t have been so impatient It works now!

Topic Locked

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

Sign in to reply to this topic.