| 68 | } |
| 69 | |
| 70 | void Font::displayScreenText(int x, int y, float r, float g, float b, const char *string) |
| 71 | { |
| 72 | float w = charsXYWH.w * scaleValue; |
| 73 | float h = charsXYWH.h * scaleValue; |
| 74 | |
| 75 | int length = static_cast<int>(strlen(string)); |
| 76 | |
| 77 | glBindTexture(GL_TEXTURE_2D, *(atlas->texture)); |
| 78 | glColor4f(r, g, b, 1.0f); |
| 79 | for (int i = 0; i < length; i++) |
| 80 | { |
| 81 | BitmapCharacter(x, y - h, w, h, string[i]); |
| 82 | x += w + s_spacing[string[i]]; |
| 83 | } |
| 84 | } |
| 85 | |
| 86 | void Font::BitmapCharacter(float x, float y, float w, float h, int character) |
| 87 | { |
no outgoing calls
no test coverage detected