Jump to content
  • Advertisement

Archived

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

WymsicalWyvern

OpenGL OpenGL Texture Mapping problem

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

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

Share this post


Link to post
Share on other sites
Advertisement
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

Share this post


Link to post
Share on other sites
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?

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!