1 /* 2 * Copyright 2009 Paul Wise 3 * 4 * "Chromium B.S.U." is free software; you can redistribute 5 * it and/or use it and/or modify it under the terms of the 6 * "Clarified Artistic License" 7 */ 8 #ifndef TextGLC_h 9 #define TextGLC_h 10 11 #ifdef HAVE_CONFIG_H 12 #include <chromium-bsu-config.h> 13 #endif 14 15 #ifdef TEXT_GLC 16 17 #if defined(HAVE_APPLE_OPENGL_FRAMEWORK) || defined(HAVE_OPENGL_GL_H) 18 #include <OpenGL/gl.h> 19 #else 20 #include <GL/gl.h> 21 #endif 22 23 #ifdef HAVE_GL_GLC_H 24 #include <GL/glc.h> 25 #endif 26 27 #ifdef HAVE_QUESOGLC_GLC_H 28 #include <QuesoGLC/glc.h> 29 #endif 30 31 #include "Text.h" 32 33 /** 34 * Use GLC for rendering text in OpenGL 35 */ 36 //==================================================================== 37 class TextGLC : public Text 38 { 39 public: 40 41 TextGLC(); 42 virtual ~TextGLC(); 43 44 virtual void Render(const char*, const int = -1); 45 virtual float Advance(const char*, const int = -1); 46 47 virtual float LineHeight(const char*, const int = -1); 48 49 private: 50 GLint context; 51 GLint defaultFont; 52 GLint distroFont; 53 GLint userFont; 54 55 }; 56 57 #endif // TEXT_GLC 58 59 #endif // TextGLC_h 60