X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_FreeGlut_Tools%2FINC%2FGLUTTextRenderers.h;fp=WCudaMSE%2FAPI_Bilat_FreeGlut_Tools%2FINC%2FGLUTTextRenderers.h;h=7aa6f7c3f8bb770413e905d3c3b04acaf3823d8d;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_FreeGlut_Tools/INC/GLUTTextRenderers.h b/WCudaMSE/API_Bilat_FreeGlut_Tools/INC/GLUTTextRenderers.h new file mode 100755 index 0000000..7aa6f7c --- /dev/null +++ b/WCudaMSE/API_Bilat_FreeGlut_Tools/INC/GLUTTextRenderers.h @@ -0,0 +1,36 @@ +#ifndef GLUT_TEXT_RENDERERS_H +#define GLUT_TEXT_RENDERERS_H + +#include "TextRenderer_A.h" +#include "envFreeGlutTools.h" + +#include +using std::string; + +class CBI_FREEGLUT_TOOLS GLUTTextRenderers: public TextRenderer_A + { + public: + GLUTTextRenderers(); + virtual ~GLUTTextRenderers(); + + /*--------------------------------------*\ + |* Surcharge *| + \*-------------------------------------*/ + + int charWidth(int character, const Font_A &font); + int textWidth(const char* text, const Font_A &font); + int textHeight(const char* text, const Font_A &font); + + /** + * If font is NULL use the default font! + */ + void renderText(float x, float y, const char* text, const Font_A &font); + + + /** + * all value are relative to viewport, ie not in pixels ! + */ + //static void renderBitmapStringCentered(float x, float y, int frameWidth, int frameHight, string title, const Fonts& font); + }; + +#endif