Jump to content
  • Advertisement
Sign in to follow this  
fazekaim

OpenGL question about texture size

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

Hello! When I create a 3D creature and I unwrap it into 2D (with Lithunwrap), I arrange the projections and the result is a texture with 1000x750 or 800x600 size. Is it a problem? Have I force the square size(512x512,1024,1024)? What if I'm using gluBuild2DMipmaps? What is Opengl doing? In a game like (HL2, or Doom3) what is the texture size? Thanks, and sorry for the bad english:)

Share this post


Link to post
Share on other sites
Advertisement
When using basic OpenGL, no you do not need to have square textures, however, the sides DO have to be powers of two (64,128,256,512,1024,etc). So both sides can have a different number:
128x128
128x256
128x512
256x256
etc are all allowed.

There does exist an extension that can load non-power-of-two textures NV_render_texture_rectangle

Share this post


Link to post
Share on other sites
Note that gluBuild2DMipmaps will infact accept non power of two texture (ie. things like 800x600), but it will internally resize them to the nearest power of two.

This is a very common question, perhaps a detailed answer should go into the FAQ ?

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!