From c94455c14d28221f6e05f33ba42e23a5d3245a28 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Sun, 8 Jan 2006 09:37:15 +0000 Subject: more linux game engine work. hopefully works now! --- source/gameengine/Ketsji/BL_Texture.h | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 source/gameengine/Ketsji/BL_Texture.h (limited to 'source/gameengine/Ketsji/BL_Texture.h') diff --git a/source/gameengine/Ketsji/BL_Texture.h b/source/gameengine/Ketsji/BL_Texture.h new file mode 100644 index 00000000000..51bf7270d2d --- /dev/null +++ b/source/gameengine/Ketsji/BL_Texture.h @@ -0,0 +1,53 @@ +#ifndef __BL_TEXTURE_H__ +#define __BL_TEXTURE_H__ +#include +// -- +struct Image; +struct EnvMap; +// -- +#include "STR_String.h" + +class BL_Texture +{ +private: + // ----------------------------------- + unsigned int* mTexture; + bool mError; + bool mOk; + bool mNeedsDeleted; + unsigned int mType; + STR_String mName; + static unsigned int mBlankTexture; + std::vectormCubeMem; + // ----------------------------------- + void InitNonPow2Tex(unsigned int *p,int x,int y,bool mipmap ); + void InitGLTex(unsigned int *p,int x,int y,bool mipmap ); + +public: + BL_Texture(); + ~BL_Texture( ); + + operator const unsigned int () const; + bool Ok(); + + STR_String GetName() const; + + unsigned int GetTextureType() const; + void DeleteTex(); + bool InitFromImage( Image *img, bool mipmap); + bool InitCubeMap( EnvMap *cubemap ); + // + bool SetGLTex(unsigned int tex); + + void PopCubeMap(); + bool IsValid(); + void Validate(); +}; + +enum TexType{ + BL_TEX2D = 1, + BL_TEXCUBE = 2 +}; + + +#endif//__BL_TEXTURE_H__ -- cgit v1.2.3