OGRE  1.8
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
OgreBlendMode.h
Go to the documentation of this file.
1 /*
2 -----------------------------------------------------------------------------
3 This source file is part of OGRE
4  (Object-oriented Graphics Rendering Engine)
5 For the latest info, see http://www.ogre3d.org/
6 
7 Copyright (c) 2000-2013 Torus Knot Software Ltd
8 
9 Permission is hereby granted, free of charge, to any person obtaining a copy
10 of this software and associated documentation files (the "Software"), to deal
11 in the Software without restriction, including without limitation the rights
12 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
13 copies of the Software, and to permit persons to whom the Software is
14 furnished to do so, subject to the following conditions:
15 
16 The above copyright notice and this permission notice shall be included in
17 all copies or substantial portions of the Software.
18 
19 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
20 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
21 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
22 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
23 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
24 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
25 THE SOFTWARE.
26 -----------------------------------------------------------------------------
27 */
28 #ifndef __BLENDMODE_H__
29 #define __BLENDMODE_H__
30 
31 #include "OgrePrerequisites.h"
32 #include "OgreColourValue.h"
33 
34 namespace Ogre {
45  {
48  };
49 
66 
67  };
68 
106  };
107 
113  {
124  };
140  {
141  public:
150 
161 
162  bool operator==(const LayerBlendModeEx& rhs) const
163  {
164  if (blendType != rhs.blendType) return false;
165 
166  if (blendType == LBT_COLOUR)
167  {
168 
169  if (operation == rhs.operation &&
170  source1 == rhs.source1 &&
171  source2 == rhs.source2 &&
172  colourArg1 == rhs.colourArg1 &&
173  colourArg2 == rhs.colourArg2 &&
174  factor == rhs.factor)
175  {
176  return true;
177  }
178  }
179  else // if (blendType == LBT_ALPHA)
180  {
181  if (operation == rhs.operation &&
182  source1 == rhs.source1 &&
183  source2 == rhs.source2 &&
184  alphaArg1 == rhs.alphaArg1 &&
185  alphaArg2 == rhs.alphaArg2 &&
186  factor == rhs.factor)
187  {
188  return true;
189  }
190  }
191  return false;
192  }
193 
194  bool operator!=(const LayerBlendModeEx& rhs) const
195  {
196  return !(*this == rhs);
197  }
198 
199 
200 
201  };
202 
216  {
227  // TODO : more
228  };
229 
235  {
246 
247  };
248 
254  {
260  };
264 }
265 
266 #endif
as LBX_BLEND_DIFFUSE_ALPHA, but use current alpha from previous stages
Definition: OgreBlendMode.h:99
float Real
Software floating point type.
LayerBlendType
Type of texture blend mode.
Definition: OgreBlendMode.h:44
#define _OgreExport
Definition: OgrePlatform.h:233
a colour supplied manually as a separate argument
ColourValue colourArg1
Manual colour value for manual source1.
the interpolated diffuse colour from the vertices
dot product of color1 and color2
the interpolated specular colour from the vertices
as LBX_ADD, but subtract product from the sum
Definition: OgreBlendMode.h:91
Class representing colour.
use source2 without modification
Definition: OgreBlendMode.h:79
Make the object transparent based on the colour values in the texture (brighter = more opaque) ...
ColourValue colourArg2
Manual colour value for manual source2.
SceneBlendType
Types of blending that you can specify between an object and the existing contents of the scene...
use interpolated alpha value from vertices to scale source1, then add source2 scaled by (1-alpha) ...
Definition: OgreBlendMode.h:95
multiply source1 and source2 together
Definition: OgreBlendMode.h:81
SceneBlendFactor
Blending factors for manually blending objects with the scene.
Blend based on texture alpha.
Definition: OgreBlendMode.h:65
as LBX_BLEND_DIFFUSE_ALPHA but use a constant manual blend value (0.0-1.0)
the colour derived from the texture assigned to this layer
LayerBlendSource source1
The first source of colour/alpha.
Add colour components together.
Definition: OgreBlendMode.h:61
subtract source2 from source1
Definition: OgreBlendMode.h:93
Multiply the 2 colours together.
LayerBlendOperation
List of valid texture blending operations, for use with TextureUnitState::setColourOperation.
Definition: OgreBlendMode.h:57
LayerBlendSource source2
The second source of colour/alpha.
Real alphaArg1
Manual alpha value for manual source1.
use source1 without modification
Definition: OgreBlendMode.h:77
add source1 and source2 together
Definition: OgreBlendMode.h:87
Make the object transparent based on the final alpha values in the texture.
Multiply colour components together.
Definition: OgreBlendMode.h:63
LayerBlendSource
List of valid sources of values for blending operations used in TextureUnitState::setColourOperation ...
as LBX_ADD, but subtract 0.5 from the result
Definition: OgreBlendMode.h:89
Replace all colour with texture with no adjustment.
Definition: OgreBlendMode.h:59
Add the texture values to the existing scene content.
the colour as built up from previous stages
SceneBlendOperation
Blending operations controls how objects are blended into the scene.
bool operator==(const LayerBlendModeEx &rhs) const
The default blend mode where source replaces destination.
LayerBlendOperationEx operation
The operation to be applied.
LayerBlendType blendType
The type of blending (colour or alpha)
LayerBlendOperationEx
Expert list of valid texture blending operations, for use with TextureUnitState::setColourOperationEx...
Definition: OgreBlendMode.h:75
Real factor
Manual blending factor.
as LBX_MODULATE but brighten afterwards (x2)
Definition: OgreBlendMode.h:83
use interpolated color values from vertices to scale source1, then add source2 scaled by (1-color) ...
Real alphaArg2
Manual alpha value for manual source2.
Class which manages blending of both colour and alpha components.
bool operator!=(const LayerBlendModeEx &rhs) const
as LBX_BLEND_DIFFUSE_ALPHA, but use alpha from texture
Definition: OgreBlendMode.h:97
as LBX_MODULATE but brighten more afterwards (x4)
Definition: OgreBlendMode.h:85