Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

SceneFont.h

00001 
00002 
00003 #ifndef __SCENEFONT_H_
00004 #define __SCENEFONT_H_
00005 /*
00006 Peon - Win32 Games Programming Library
00007 Copyright (C) 2002-2005 Erik Yuzwa
00008 
00009 This library is free software; you can redistribute it and/or
00010 modify it under the terms of the GNU Library General Public
00011 License as published by the Free Software Foundation; either
00012 version 2 of the License, or (at your option) any later version.
00013 
00014 This library is distributed in the hope that it will be useful,
00015 but WITHOUT ANY WARRANTY; without even the implied warranty of
00016 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00017 Library General Public License for more details.
00018 
00019 You should have received a copy of the GNU Library General Public
00020 License along with this library; if not, write to the Free
00021 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00022 
00023 Erik Yuzwa
00024 peon AT wazooinc DOT com
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 

Generated on Thu Dec 1 01:55:40 2005 for Peon by  doxygen 1.4.1