diff --git a/src/opengl.c b/src/opengl.c index 9c3501b..0b77408 100644 --- a/src/opengl.c +++ b/src/opengl.c @@ -35,7 +35,7 @@ static void gl_fontMakeDList(FT_Face face, char ch, GLuint list_base, GLuint* te // Get me the closest power of two plox. static int pot(int n) { int i = 1; - while( i < n) + while(i < n) i<<=1; return i; } @@ -78,6 +78,7 @@ static GLuint gl_loadSurface(SDL_Surface* surface, int* rw, int* rh) { Uint32 saved_flags; Uint8 saved_alpha; + // Make size power of two. if(rw)*rw = pot(surface->w); if(rh)*rh = pot(surface->h); @@ -378,6 +379,8 @@ static void gl_fontMakeDList(FT_Face face, char ch, GLuint list_base, GLuint* te glBegin(GL_QUADS); glTexCoord2d(0, 0); glVertex2f(0, bitmap.rows); + glTexCoord2d(0, y); + glVertex2f(0, 0); glTexCoord2d(x, y); glVertex2f(bitmap.width, 0); glTexCoord2d(x, 0);