OGRE-Next
2.3
Object-Oriented Graphics Rendering Engine
|
A macro block contains settings that will rarely change, and thus are common to many materials. More...
#include <OgreHlmsDatablock.h>
Public Member Functions | |
HlmsMacroblock () | |
bool | operator!= (const HlmsMacroblock &_r) const |
bool | operator== (const HlmsMacroblock &_r) const |
Public Attributes | |
uint8 | mAllowGlobalDefaults |
When zero, HlmsManager cannot override the block's values with enforced global settings. More... | |
uint8 | mBlockType |
CullingMode | mCullMode |
Culling mode based on the 'vertex winding'. More... | |
float | mDepthBiasConstant |
When polygons are coplanar, you can get problems with 'depth fighting' where the pixels from the two polys compete for the same screen pixel. More... | |
float | mDepthBiasSlopeScale |
The slope-relative bias value, expressed as a factor of the depth slope. More... | |
bool | mDepthCheck |
bool | mDepthClamp |
CompareFunction | mDepthFunc |
bool | mDepthWrite |
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... | |
PolygonMode | mPolygonMode |
uint16 | mRefCount |
Render-System specific data. More... | |
void * | mRsData |
bool | mScissorTestEnabled |
A macro block contains settings that will rarely change, and thus are common to many materials.
This is very analogous to D3D11_RASTERIZER_DESC. See HlmsDatablock Up to 32 different blocks are allowed!
Ogre::HlmsMacroblock::HlmsMacroblock | ( | ) |
|
inline |
|
inline |
|
inherited |
When zero, HlmsManager cannot override the block's values with enforced global settings.
Referenced by Ogre::HlmsBlendblock::operator!=(), operator!=(), and Ogre::HlmsSamplerblock::operator!=().
|
inherited |
CullingMode Ogre::HlmsMacroblock::mCullMode |
Culling mode based on the 'vertex winding'.
A typical way for the rendering engine to cull triangles is based on the 'vertex winding' of triangles. Vertex winding refers to the direction in which the vertices are passed or indexed to in the rendering operation as viewed from the camera, and will wither be clockwise or anticlockwise (that's 'counterclockwise' for you Americans out there ;) The default is CULL_CLOCKWISE i.e. that only triangles whose vertices are passed/indexed in anticlockwise order are rendered - this is a common approach and is used in 3D studio models for example. You can alter this culling mode if you wish but it is not advised unless you know what you are doing. You may wish to use the CULL_NONE option for mesh data that you cull yourself where the vertex winding is uncertain.
Referenced by operator!=().
float Ogre::HlmsMacroblock::mDepthBiasConstant |
When polygons are coplanar, you can get problems with 'depth fighting' where the pixels from the two polys compete for the same screen pixel.
This is particularly a problem for decals (polys attached to another surface to represent details such as bulletholes etc.).
A way to combat this problem is to use a depth bias to adjust the depth buffer value used for the decal such that it is slightly higher than the true value, ensuring that the decal appears on top. There are two aspects to the biasing, a constant bias value and a slope-relative biasing value, which varies according to the maximum depth slope relative to the camera, ie:
finalBias = maxSlope * slopeScaleBias + constantBias
Note that slope scale bias, whilst more accurate, may be ignored by old hardware.
The constant bias value, expressed as a factor of the minimum observable depth
Referenced by operator!=().
float Ogre::HlmsMacroblock::mDepthBiasSlopeScale |
The slope-relative bias value, expressed as a factor of the depth slope.
Referenced by operator!=().
bool Ogre::HlmsMacroblock::mDepthCheck |
Referenced by operator!=().
bool Ogre::HlmsMacroblock::mDepthClamp |
Referenced by operator!=().
CompareFunction Ogre::HlmsMacroblock::mDepthFunc |
Referenced by operator!=().
bool Ogre::HlmsMacroblock::mDepthWrite |
Referenced by operator!=().
|
inherited |
The mId is only valid while mRefCount > 0; which means mRsData may contain valid data, else it's null.
|
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)
PolygonMode Ogre::HlmsMacroblock::mPolygonMode |
Referenced by operator!=().
|
inherited |
Render-System specific data.
|
inherited |
bool Ogre::HlmsMacroblock::mScissorTestEnabled |
Referenced by operator!=().