00001
00002
00003 #ifndef __SCENEFONT_H_
00004 #define __SCENEFONT_H_
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #include "IUnknown.h"
00028
00029 namespace peon
00030 {
00042 class PEONMAIN_API SceneFont : public IUnknown
00043 {
00044
00045 protected:
00047 GLuint m_display_list;
00048
00050 int m_char_width;
00051
00053 int m_char_height;
00054
00056 int m_char_spacing;
00057
00059 int m_fxCount;
00060
00062 int m_fyCount;
00063
00065 float m_r;
00066
00068 float m_g;
00069
00071 float m_b;
00072
00074 float m_a;
00075
00077 bool m_font_batching;
00078
00079
00080 public:
00084 SceneFont();
00085
00089 ~SceneFont();
00090
00099 bool loadFont(int width = 16, int height = 16, int spacing = 14);
00100
00104 void unloadFont();
00105
00115 void renderText(float xpos, float ypos, const String& strText);
00116
00126 void setColor( float r = 1.0f, float g = 1.0f, float b = 1.0f, float a = 1.0f);
00127
00135 bool beginBatchFont();
00136
00140 void endBatchFont();
00141
00142
00143 };
00144
00145 }
00146
00147 #endif
00148