[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Beginner Questions
From: |
Christian Demmer |
Subject: |
Re: [ft] Beginner Questions |
Date: |
Thu, 08 May 2008 18:00:08 +0200 |
Patrick Rutkowski wrote:
>I wrote a test app to render Courier New onto a square 64x64 texture
>to see
glTexImage2D
(
GL_TEXTURE_2D,
0,
GL_RGBA,
face->glyph->bitmap.width,
face->glyph->bitmap.rows,
0,
GL_LUMINANCE,
GL_UNSIGNED_BYTE,
face->glyph->bitmap.buffer
);
I see a problem here: bitmap.width and bitmap.rows have to be 64 or
another power of 2 to satisfy OpenGL requirements. I don't see how you
can expect this. I would suggest to use a 64 by 64 texture and use
glTexSubImage2D to render the actual content into the texture.
Another option is the texture rectangle extension if available.
Greetings, Christian