OGRE-Next
4.0.0unstable
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 | A2CSetting { A2cDisabled , A2cEnabled , A2cEnabledMsaaOnly } |
enum | BlendChannelMasks { BlendChannelRed = 0x01 , BlendChannelGreen = 0x02 , BlendChannelBlue = 0x04 , BlendChannelAlpha = 0x08 , BlendChannelAll = BlendChannelRed | BlendChannelGreen | BlendChannelBlue | BlendChannelAlpha , BlendChannelForceDisabled = 0x10 } |
Public Member Functions | |
HlmsBlendblock () | |
void | calculateSeparateBlendMode () |
Sets mSeparateBlend to true or false based on current settings. More... | |
bool | isAlphaToCoverage (const SampleDescription &sd) const |
bool | isAutoTransparent () const |
bool | isForcedTransparent () const |
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. More... | |
void | setBlendType (SceneBlendType colour, SceneBlendType alpha) |
Shortcut to set the blend factors to common blending operations. More... | |
void | setForceTransparentRenderOrder (bool bForceTransparent) |
Sometimes you want to force the RenderQueue to render back to front even if the object isn't alpha blended (e.g., you're rendering refractive materials) More... | |
Public Member Functions inherited from Ogre::BasicBlock | |
BasicBlock (uint8 blockType) | |
Public Attributes | |
uint8 | mAlphaToCoverage |
uint8 | mBlendChannelMask |
See A2CSetting. More... | |
SceneBlendOperation | mBlendOperation |
SceneBlendOperation | mBlendOperationAlpha |
SceneBlendFactor | mDestBlendFactor |
SceneBlendFactor | mDestBlendFactorAlpha |
uint8 | mIsTransparent |
bool | mSeparateBlend |
Used to determine if separate alpha blending should be used for color and alpha channels. More... | |
SceneBlendFactor | mSourceBlendFactor |
SceneBlendFactor | mSourceBlendFactorAlpha |
Public Attributes inherited from Ogre::BasicBlock | |
uint8 | mAllowGlobalDefaults |
When zero, HlmsManager cannot override the block's values with enforced global settings. More... | |
uint8 | mBlockType |
uint16 | mId |
The mId is only valid while mRefCount > 0; which means mRsData may contain valid data, else it's null. More... | |
uint16 | mLifetimeId |
Except for HlmsSamplerblocks, mLifetimeId is valid throghout the entire life of HlmsManager. More... | |
uint16 | mRefCount |
void * | mRsData |
Render-System specific data. More... | |
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:
Ogre::HlmsBlendblock::HlmsBlendblock | ( | ) |
void Ogre::HlmsBlendblock::calculateSeparateBlendMode | ( | ) |
Sets mSeparateBlend to true or false based on current settings.
|
inline |
References A2cDisabled, A2cEnabled, A2cEnabledMsaaOnly, and Ogre::SampleDescription::isMultisample().
|
inline |
|
inline |
|
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.
void Ogre::HlmsBlendblock::setForceTransparentRenderOrder | ( | bool | bForceTransparent | ) |
Sometimes you want to force the RenderQueue to render back to front even if the object isn't alpha blended (e.g., you're rendering refractive materials)
bForceTransparent | True to always render back to front, like any transparent. False for default behavior (opaque objects are rendered front to back, alpha blended objects are rendered back to front) |
uint8 Ogre::HlmsBlendblock::mAlphaToCoverage |
Referenced by operator!=().
uint8 Ogre::HlmsBlendblock::mBlendChannelMask |
See A2CSetting.
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).
Referenced by operator!=().
SceneBlendOperation Ogre::HlmsBlendblock::mBlendOperation |
Referenced by operator!=().
SceneBlendOperation Ogre::HlmsBlendblock::mBlendOperationAlpha |
Referenced by operator!=().
SceneBlendFactor Ogre::HlmsBlendblock::mDestBlendFactor |
Referenced by operator!=().
SceneBlendFactor Ogre::HlmsBlendblock::mDestBlendFactorAlpha |
Referenced by operator!=().
uint8 Ogre::HlmsBlendblock::mIsTransparent |
This value calculated by HlmsManager::getBlendblock.
Referenced by operator!=().
bool Ogre::HlmsBlendblock::mSeparateBlend |
Used to determine if separate alpha blending should be used for color and alpha channels.
Referenced by operator!=().
SceneBlendFactor Ogre::HlmsBlendblock::mSourceBlendFactor |
Referenced by operator!=().
SceneBlendFactor Ogre::HlmsBlendblock::mSourceBlendFactorAlpha |
Referenced by operator!=().