Home | Namespaces | Hierarchy | Alphabetical List | Class list | Files | Namespace Members | Class members | File members
E:/Programming/MyProject/K_Game_hg/GameEngine/include/render/BlendMode.h
Go to the documentation of this file.
00001 // Copyright 2006-2011 by Kat'Oun
00002 
00003 #ifndef _BLEND_MODE_H_
00004 #define _BLEND_MODE_H_
00005 
00006 #include <EngineConfig.h>
00007 #include <core/Types.h>
00008 #include <render/Color.h>
00009 
00010 namespace render
00011 {
00012 
00020 enum SceneBlendType
00021 { 
00022         SBT_TRANSPARENT_ALPHA,  
00023         SBT_TRANSPARENT_COLOR,  
00024         SBT_ADD,                                
00025         SBT_MODULATE,                   
00026         SBT_REPLACE                             
00027         // TODO : more
00028 };
00029 
00033 enum SceneBlendFactor
00034 {
00035         SBF_ONE,
00036         SBF_ZERO,
00037         SBF_DEST_COLOR,
00038         SBF_SOURCE_COLOR,
00039         SBF_ONE_MINUS_DEST_COLOR,
00040         SBF_ONE_MINUS_SOURCE_COLOR,
00041         SBF_DEST_ALPHA,
00042         SBF_SOURCE_ALPHA,
00043         SBF_ONE_MINUS_DEST_ALPHA,
00044         SBF_ONE_MINUS_SOURCE_ALPHA
00045 };
00046 
00048 enum LayerBlendType
00049 {
00050         LBT_COLOR,
00051         LBT_ALPHA
00052 };
00053 
00057 enum LayerBlendOperation
00058 {
00059         LBX_SOURCE1,                            
00060         LBX_SOURCE2,                            
00061         LBX_MODULATE,                           
00062         LBX_MODULATE_X2,                        
00063         LBX_MODULATE_X4,                        
00064         LBX_ADD,                                        
00065         LBX_ADD_SIGNED,                         
00066         LBX_ADD_SMOOTH,                         
00067         LBX_SUBTRACT,                           
00068         LBX_BLEND_DIFFUSE_ALPHA,        
00069         LBX_BLEND_TEXTURE_ALPHA,        
00070         LBX_BLEND_CURRENT_ALPHA,        
00071         LBX_BLEND_MANUAL,                       
00072         LBX_DOTPRODUCT,                         
00073         LBX_BLEND_DIFFUSE_COLOR         
00074 };
00075 
00077 enum LayerBlendSource
00078 {
00079         LBS_CURRENT,    
00080         LBS_TEXTURE,    
00081         LBS_DIFFUSE,    
00082         LBS_SPECULAR,   
00083         LBS_MANUAL              
00084 };
00085 
00095 class ENGINE_PUBLIC_EXPORT LayerBlendMode
00096 {
00097 public:
00098 
00099         LayerBlendType blendType;                       
00100         LayerBlendOperation operation;          
00101 
00102         LayerBlendSource source1;                       
00103         LayerBlendSource source2;                       
00104 
00105         Color colorArg1;                                        
00106         Color colorArg2;                                        
00107 
00108         f32 alphaArg1;                                          
00109         f32 alphaArg2;                                          
00110 
00111         f32 factor;                                                     
00112 
00113         bool operator==(const LayerBlendMode& rhs) const;
00114 
00115         bool operator!=(const LayerBlendMode& rhs) const;
00116 };
00117 
00118 } //namespace render
00119 
00120 #endif

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