[Fix] Quad int fontMakeDList was messed!
This commit is contained in:
parent
e8ed98b69d
commit
978df483bf
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user