Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/render/TextureUnit.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _TEXTURE_UNIT_H_
00004 #define _TEXTURE_UNIT_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <render/BlendMode.h>
00009 #include <render/Color.h>
00010 
00011 #include <string>
00012 
00013 namespace render
00014 {
00015 
00016 class Texture;
00017 
00024 class ENGINE_PUBLIC_EXPORT TextureUnit
00025 {
00026 public:
00027 
00028         TextureUnit();
00029 
00031         void setTexture(const std::string& filename);
00032         void setTexture(Texture* texture);
00033 
00035         Texture* getTexture() const;
00036 
00038         void setTextureCoordSet(u32 set);
00039 
00041         u32 getTextureCoordSet() const;
00042 
00043         void setColorOperation(LayerBlendOperation op, LayerBlendSource source1 = LBS_TEXTURE, LayerBlendSource source2 = LBS_CURRENT,
00044                                 const Color& arg1 = Color::White, const Color& arg2 = Color::White, f32 manualBlend = 0.0f);
00045 
00046         void setAlphaOperation(LayerBlendOperation op, LayerBlendSource source1 = LBS_TEXTURE, LayerBlendSource source2 = LBS_CURRENT,
00047                                 f32 arg1 = 1.0f, f32 arg2 = 1.0f, f32 manualBlend = 0.0f);
00048 
00050         LayerBlendMode getColorBlendMode() const;
00051 
00053         LayerBlendMode getAlphaBlendMode() const;
00054 
00055 protected:
00056 
00057         Texture* mTexture;
00058 
00063         u32 mTextureCoordSetIndex;
00064 
00065         LayerBlendMode colorBlendMode;
00066         //SceneBlendFactor colorBlendFallbackSrc;
00067         //SceneBlendFactor colorBlendFallbackDest;
00068 
00069         LayerBlendMode alphaBlendMode;
00070 };
00071 
00072 } //namespace render
00073 
00074 #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)