diff options
author | pixel <pixel> | 2007-06-23 14:28:18 +0000 |
---|---|---|
committer | pixel <pixel> | 2007-06-23 14:28:18 +0000 |
commit | f105764b8c77364608cb5a60c81aab7af414b60a (patch) | |
tree | d8eedf4b6ac6f04b70af44a657a9eefa47543505 /include | |
parent | cda8e426f609530062524bb43f103612d25cacc7 (diff) |
Adding FTGL support.
Diffstat (limited to 'include')
-rw-r--r-- | include/LuaFTGL.h | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/include/LuaFTGL.h b/include/LuaFTGL.h new file mode 100644 index 0000000..48a3016 --- /dev/null +++ b/include/LuaFTGL.h @@ -0,0 +1,69 @@ +#ifndef __LUAFTGL_H__ +#define __LUAFTGL_H__ + +#include <FTGLExtrdFont.h> +#include <FTGLOutlineFont.h> +#include <FTGLPolygonFont.h> +#include <FTGLTextureFont.h> +#include <FTGLPixmapFont.h> +#include <FTGLBitmapFont.h> + +#include <Exceptions.h> +#include <BLua.h> + +class EncapFTFont : public Base { + public: + EncapFTFont(FTFont * _f) : f(_f) { } + ~EncapFTFont() { delete f; } + FTFont * Get() { return f; } + private: + FTFont * f; +}; + +class EncapFTGLExtrdFont : public EncapFTFont { + public: + EncapFTGLExtrdFont(const char * path) : EncapFTFont(new FTGLExtrdFont(path)) { } + EncapFTGLExtrdFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLExtrdFont(buff, siz)) { } +}; + +class EncapFTGLOutlineFont : public EncapFTFont { + public: + EncapFTGLOutlineFont(const char * path) : EncapFTFont(new FTGLOutlineFont(path)) { } + EncapFTGLOutlineFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLOutlineFont(buff, siz)) { } +}; + +class EncapFTGLPolygonFont : public EncapFTFont { + public: + EncapFTGLPolygonFont(const char * path) : EncapFTFont(new FTGLPolygonFont(path)) { } + EncapFTGLPolygonFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLPolygonFont(buff, siz)) { } +}; + +class EncapFTGLTextureFont : public EncapFTFont { + public: + EncapFTGLTextureFont(const char * path) : EncapFTFont(new FTGLTextureFont(path)) { } + EncapFTGLTextureFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLTextureFont(buff, siz)) { } +}; + +class EncapFTGLPixmapFont : public EncapFTFont { + public: + EncapFTGLPixmapFont(const char * path) : EncapFTFont(new FTGLPixmapFont(path)) { } + EncapFTGLPixmapFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLPixmapFont(buff, siz)) { } +}; + +class EncapFTGLBitmapFont : public EncapFTFont { + public: + EncapFTGLBitmapFont(const char * path) : EncapFTFont(new FTGLBitmapFont(path)) { } + EncapFTGLBitmapFont(const unsigned char * buff, size_t siz) : EncapFTFont(new FTGLBitmapFont(buff, siz)) { } +}; + +class LuaFTFont : public LuaObject { + public: + static void pushstatics(Lua *) throw (GeneralException); + LuaFTFont(EncapFTFont * _f) : f(_f) { } + ~LuaFTFont() { } + private: + virtual void pushmembers(Lua *); + EncapFTFont * f; +}; + +#endif |