OGRE 2.1
Object-Oriented Graphics Rendering Engine
|
A blend block contains settings that rarely change, and thus are common to many materials. More...
#include <OgreHlmsDatablock.h>
Public Types | |
enum | BlendChannelMasks { BlendChannelRed = 0x01 , BlendChannelGreen = 0x02 , BlendChannelBlue = 0x04 , BlendChannelAlpha = 0x08 , BlendChannelAll } |
Public Member Functions | |
HlmsBlendblock () | |
void | calculateSeparateBlendMode () |
Sets mSeparateBlend to true or false based on current settings. | |
bool | operator!= (const HlmsBlendblock &_r) const |
bool | operator== (const HlmsBlendblock &_r) const |
void | setBlendType (SceneBlendType blendType) |
Shortcut to set the blend factors to common blending operations. | |
void | setBlendType (SceneBlendType colour, SceneBlendType alpha) |
Shortcut to set the blend factors to common blending operations. | |
Public Attributes | |
uint8 | mAllowGlobalDefaults |
When zero, HlmsManager cannot override the block's values with enforced global settings. | |
bool | mAlphaToCoverageEnabled |
uint8 | mBlendChannelMask |
Masks which colour channels will be writing to. | |
SceneBlendOperation | mBlendOperation |
SceneBlendOperation | mBlendOperationAlpha |
uint8 | mBlockType |
SceneBlendFactor | mDestBlendFactor |
SceneBlendFactor | mDestBlendFactorAlpha |
uint16 | mId |
The mId is only valid while mRefCount > 0; which means mRsData may contain valid data, else it's null. | |
bool | mIsTransparent |
This value calculated by HlmsManager::getBlendblock. | |
uint16 | mLifetimeId |
Except for HlmsSamplerblocks, mLifetimeId is valid throghout the entire life of HlmsManager. | |
uint16 | mRefCount |
Render-System specific data. | |
void * | mRsData |
bool | mSeparateBlend |
Used to determine if separate alpha blending should be used for color and alpha channels. | |
SceneBlendFactor | mSourceBlendFactor |
SceneBlendFactor | mSourceBlendFactorAlpha |
A blend block contains settings that rarely change, and thus are common to many materials.
The reasons this structure isn't joined with HlmsMacroblock is that: The D3D11 API makes this distinction (much higher API overhead if we change i.e. depth settings) due to D3D11_RASTERIZER_DESC. This block contains information of whether the material is transparent. Transparent materials are sorted differently than opaque ones. Up to 32 different blocks are allowed!
Ogre::HlmsBlendblock::HlmsBlendblock | ( | ) |
void Ogre::HlmsBlendblock::calculateSeparateBlendMode | ( | ) |
Sets mSeparateBlend to true or false based on current settings.
|
inline |
|
inline |
void Ogre::HlmsBlendblock::setBlendType | ( | SceneBlendType | blendType | ) |
Shortcut to set the blend factors to common blending operations.
Sets both blend and alpha to the same value and mSeparateBlend is turned off.
void Ogre::HlmsBlendblock::setBlendType | ( | SceneBlendType | colour, |
SceneBlendType | alpha | ||
) |
Shortcut to set the blend factors to common blending operations.
Sets colour and alpha individually, turns mSeparateBlend on.
|
inherited |
When zero, HlmsManager cannot override the block's values with enforced global settings.
bool Ogre::HlmsBlendblock::mAlphaToCoverageEnabled |
uint8 Ogre::HlmsBlendblock::mBlendChannelMask |
Masks which colour channels will be writing to.
Default: BlendChannelAll For some advanced effects, you may wish to turn off the writing of certain colour channels, or even all of the colour channels so that only the depth buffer is updated in a rendering pass (if depth writes are on; may be you want to only update the stencil buffer).
SceneBlendOperation Ogre::HlmsBlendblock::mBlendOperation |
SceneBlendOperation Ogre::HlmsBlendblock::mBlendOperationAlpha |
|
inherited |
SceneBlendFactor Ogre::HlmsBlendblock::mDestBlendFactor |
SceneBlendFactor Ogre::HlmsBlendblock::mDestBlendFactorAlpha |
|
inherited |
The mId is only valid while mRefCount > 0; which means mRsData may contain valid data, else it's null.
bool Ogre::HlmsBlendblock::mIsTransparent |
This value calculated by HlmsManager::getBlendblock.
|
inherited |
Except for HlmsSamplerblocks, mLifetimeId is valid throghout the entire life of HlmsManager.
This guarantees HlmsMacroblock & HlmsBlendblock pointers are always valid, although they may be inactive (i.e. mId invalid, mRefCount = 0 and mRsData = 0)
|
inherited |
Render-System specific data.
|
inherited |
bool Ogre::HlmsBlendblock::mSeparateBlend |
Used to determine if separate alpha blending should be used for color and alpha channels.
SceneBlendFactor Ogre::HlmsBlendblock::mSourceBlendFactor |
SceneBlendFactor Ogre::HlmsBlendblock::mSourceBlendFactorAlpha |