| 67 | wxFont font; ///< Font used for this glyph |
| 68 | |
| 69 | OpenGLTextGlyph(int value, wxFont const& font) |
| 70 | : str(wxChar(value)) |
| 71 | , font(font) |
| 72 | { |
| 73 | wxCoord desc,lead; |
| 74 | |
| 75 | wxBitmap tempBmp(32, 32, 24); |
| 76 | wxMemoryDC dc(tempBmp); |
| 77 | dc.SetFont(font); |
| 78 | dc.GetTextExtent(str, &w, &h, &desc, &lead); |
| 79 | } |
| 80 | |
| 81 | void Draw(float x, float y) const { |
| 82 | glBindTexture(GL_TEXTURE_2D, tex); |