Jump to content
  • Advertisement
Sign in to follow this  
celestis_genesis

OpenGL OpenGL units

This topic is 4844 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 all! This question has been asked many times, but I cant seem to get a clear answer out of it. When reading NeHe's tutorial for texture -mapping, they have a 256x256 BMP, and a cube with the size of 2.0f each side. when drawing the texture-mapped cube, i see the texture in its original size, 256x256 pixels. The thing is, before drawing the cube, there's this line: glTranslatef(0.0f,0.0f,-5.0f); i'm not quite sure what the purpose of it is, except that it moves teh cube 5.0f into the screen. When i try to make my own texture, say, 32x32, it gets streched out. So, my question is, how would I know what size the cube would need to be in order to look 32x32, with the texture not being streched? Also, how would I know how much I would need to go into the screen in that case? In general, I suppose I'd like (if possible) to see a sample code that, say.., draws a cube 32x32 with a 32x32 texture mapped to it; and a, say , 128x128 cube with a 128x128 texture maped to it that looks the correct size too. I dont know if that made sence, I cant really explain what I want to know....

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
It is the size of the cube as it appears on screen that determines the needed resolution for a good texture. If you open your 32x32 texture in Paint or Gimp, you can try to resize it to different sizes and see the results. That will give you an impression of how much screenspace it can fill while still looking good.

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!