Jump to content
  • Advertisement
Sign in to follow this  
CableGuy

OpenGL glTexSubImage2D and power of 2

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

Ok, I'm trying my luck at a FreeType font renderer and I have a problem while packing the glyphs into a texture. I use glTexSubImage2D to upload each glyph into a big texture but when I use the glyph's actual size(not power of 2) the image gets distorted but when I expand it to the next power of 2 it is ok. So while this is not a big deal, looking at the OpenGL documentation provided with the MSDN it says nothing about the width and the height having to be power of 2 in glTexSubImage2D. So is this correct behavior or am I doing something wrong?

Share this post


Link to post
Share on other sites
Advertisement
Are you using the GL_RGB8 format? It could be a case of
http://www.opengl.org/wiki/index.php/Common_Mistakes#Texture_Upload

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!