Jump to content
  • Advertisement
Sign in to follow this  
CableGuy

OpenGL glTexSubImage2D and power of 2

This topic is 3782 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.

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!