OpenGL Texture Mapping problem

Started by
3 comments, last by WymsicalWyvern 23 years, 12 months ago
Hi, I loaded a bitmap, and tried to map it on to a square, but all it showed was grey (the bitmap was a turkey). Thinking this was just a loading problem i used glDrawPixels() to draw what i had of a bitmap, it was fine except for the top half was grey, why doesn''t it do the same for the square? Is it a bitmap loading problem or am i forgetting something? Do i need to calculate normals for texture mapping? Is there a special size i need? Thanks in advance The Wymsical Wyvern
Advertisement
I believe your texture must be a power of 2. Common sizes include 64 and 128.

Ben
Did you try it with glBitmap()?? In OpenGL a bitmap is a "real" bitmap, I mean, each bit is interpreted as one pixel.
If you used glTexImage2D(),look at pr0teus'' post.

Visit our homepage: www.rarebyte.de.st

GA
Visit our homepage: www.rarebyte.de.stGA
I remembered something like that ( power of 2 thingy ), but when you search glTexImage2D(), the dimensions of the texture has to be 2^n + 2, the + 2 being for a border. My turkey right now is 66x66 because of what it said, i''ll try 64x64....


heh, ok i tried it this is weird. Now that i changed the bmp file to be 64x64 (resampled it in corel) glDrawPixels along now draws 75% grey, and 25% picture, and when i call glTexImage2d() aswell, the screen is goes blank, I''ll try calling glTexImage2D without glDrawPixels()... nothing...
this is screwed up, has anyone had any problems like this before?
OK, the grey is from my flawed bitmap loader, the problem is getting the tex.map mapped on the polygon

The Wymsical Wyvern

This topic is closed to new replies.

Advertisement