From ce480b07335d8f7d380ac302a1a6422c4fa3742b Mon Sep 17 00:00:00 2001 From: Yaniv Kamay Date: Mon, 28 Dec 2009 00:31:35 +0200 Subject: client: add soft renderer and cegui --- client/gui/softtexture.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 client/gui/softtexture.h (limited to 'client/gui/softtexture.h') diff --git a/client/gui/softtexture.h b/client/gui/softtexture.h new file mode 100644 index 00000000..37617f29 --- /dev/null +++ b/client/gui/softtexture.h @@ -0,0 +1,40 @@ + +#ifndef _softtexture_h_ +#define _softtexture_h_ + +#include +#include "CEGUIBase.h" +#include "CEGUITexture.h" + +namespace CEGUI +{ + class SoftTexture : public Texture + { + public: + SoftTexture(Renderer* owner); + SoftTexture(Renderer* owner, uint size); + SoftTexture(Renderer* owner, const String& filename, + const String& resourceGroup); + virtual ~SoftTexture(); + + virtual ushort getWidth(void) const { return _width;} + virtual ushort getHeight(void) const { return _height;} + + virtual void loadFromFile(const String& filename, const String& resourceGroup); + virtual void loadFromMemory(const void* buffPtr, uint buffWidth, uint buffHeight, + PixelFormat pixelFormat); + + private: + void freeSurf(); + + private: + uint32_t* _surf; + ushort _width; + ushort _height; + + friend class SoftRenderer; + }; +} + +#endif + -- cgit