Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/render/Texture.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _TEXTURE_H_
00004 #define _TEXTURE_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <render/TextureDefines.h>
00009 #include <resource/Resource.h>
00010 
00011 #include <string>
00012 
00013 namespace resource
00014 {
00015 class Serializer;
00016 enum PixelFormat;
00017 }
00018 
00019 namespace render
00020 {
00021 
00026 class ENGINE_PUBLIC_EXPORT Texture : public resource::Resource
00027 {
00028 public:
00029 
00030         Texture(const std::string& name, resource::Serializer* serializer);
00031         virtual ~Texture();
00032 
00034         void setTextureType(const TextureType& type);
00035 
00037         TextureType getTextureType();
00038 
00040         void setBuffer(u8* buffer, u32 size);
00041 
00043         void setWidth(u32 width);
00044 
00046         u32 getWidth();
00047 
00049         void setHeight(u32 height);
00050 
00052         u32 getHeight();
00053 
00055         void setDepth(u32 depth);
00056 
00058         u32 getDepth();
00059 
00061         void setFlags(s32 flags);
00062 
00064         s32 getFlags();
00065 
00067         void setPixelSize(u8 size);
00068 
00070         u8 getPixelSize();
00071 
00073         void setNumMipMaps(u32 num);
00074 
00076         u32 getNumMipMaps();
00077 
00079         void setPixelFormat(const resource::PixelFormat& format);
00080 
00082         resource::PixelFormat getPixelFormat() const;
00083 
00085         void hasAlpha(bool alpha);
00086 
00088         bool hasAlpha();
00089 
00090 protected:
00091 
00092         void initProperties();
00093         virtual void unloadImpl();
00094 
00095         TextureType mTextureType;
00096 
00097         resource::PixelFormat mPixelFormat;
00098 
00099         u8* mBuffer;
00100         u32 mSize;
00101 
00102         u32 mWidth;
00103         u32 mHeight;
00104         u32 mDepth;
00105 
00106         s32 mFlags;                     
00107         u8 mPixelSize;          
00108 
00109         u32 mNumMipmaps;
00110 
00111         bool mHasAlpha;
00112 };
00113 
00114 } // end namespace render
00115 
00116 #endif

The KG Game Engine
The KG Game Engine Documentation © 2006-2011 by Kat'Oun. Generated on Sat Jul 2 2011 00:50:05 by Doxygen (1.7.4)