| 84 | } |
| 85 | |
| 86 | void Font::BitmapCharacter(float x, float y, float w, float h, int character) |
| 87 | { |
| 88 | WorldRect dstRect(x, y, w, h); |
| 89 | ScreenRect* psrcRect; |
| 90 | psrcRect = &atlas->sourceRectangles[character]; |
| 91 | glBegin(GL_QUADS); |
| 92 | { |
| 93 | glTexCoord2d(psrcRect->fLeft(), psrcRect->fTop()); glVertex2f(dstRect.iLeft(), dstRect.iBottom()); |
| 94 | glTexCoord2d(psrcRect->fRight(), psrcRect->fTop()); glVertex2f(dstRect.iRight(), dstRect.iBottom()); |
| 95 | glTexCoord2d(psrcRect->fRight(), psrcRect->fBottom()); glVertex2f(dstRect.iRight(), dstRect.iTop()); |
| 96 | glTexCoord2d(psrcRect->fLeft(), psrcRect->fBottom()); glVertex2f(dstRect.iLeft(), dstRect.iTop()); |
| 97 | } |
| 98 | glEnd(); |
| 99 | } |
| 100 | |
| 101 | void InitSpacings() |
| 102 | { |