Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErwin Coumans <blender@erwincoumans.com>2006-01-08 12:37:15 +0300
committerErwin Coumans <blender@erwincoumans.com>2006-01-08 12:37:15 +0300
commitc94455c14d28221f6e05f33ba42e23a5d3245a28 (patch)
tree733dfaccbbcd71cf66e2d33b1868f64f78189eeb /source/gameengine/Ketsji/BL_Texture.h
parent88a8508b347dda050557e72dfad105023e5095aa (diff)
more linux game engine work. hopefully works now!
Diffstat (limited to 'source/gameengine/Ketsji/BL_Texture.h')
-rw-r--r--source/gameengine/Ketsji/BL_Texture.h53
1 files changed, 53 insertions, 0 deletions
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 <vector>
+// --
+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::vector<EnvMap*>mCubeMem;
+ // -----------------------------------
+ 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__