OGRE  2.2.4
Object-Oriented Graphics Rendering Engine
Ogre::HlmsMacroblock Struct Reference

A macro block contains settings that will rarely change, and thus are common to many materials. More...

#include <OgreHlmsDatablock.h>

+ Inheritance diagram for Ogre::HlmsMacroblock:

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
 
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
 

Detailed Description

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!

Constructor & Destructor Documentation

◆ HlmsMacroblock()

Ogre::HlmsMacroblock::HlmsMacroblock ( )

Member Function Documentation

◆ operator!=()

◆ operator==()

bool Ogre::HlmsMacroblock::operator== ( const HlmsMacroblock _r) const
inline

Member Data Documentation

◆ mAllowGlobalDefaults

uint8 Ogre::BasicBlock::mAllowGlobalDefaults
inherited

When zero, HlmsManager cannot override the block's values with enforced global settings.

See also
HlmsBasicBlock (such as lower quality texture filtering or turning off depth checks for debugging)

Referenced by Ogre::HlmsSamplerblock::operator!=(), operator!=(), and Ogre::HlmsBlendblock::operator!=().

◆ mBlockType

uint8 Ogre::BasicBlock::mBlockType
inherited

◆ mCullMode

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!=().

◆ mDepthBiasConstant

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!=().

◆ mDepthBiasSlopeScale

float Ogre::HlmsMacroblock::mDepthBiasSlopeScale

The slope-relative bias value, expressed as a factor of the depth slope.

Referenced by operator!=().

◆ mDepthCheck

bool Ogre::HlmsMacroblock::mDepthCheck

Referenced by operator!=().

◆ mDepthFunc

CompareFunction Ogre::HlmsMacroblock::mDepthFunc

Referenced by operator!=().

◆ mDepthWrite

bool Ogre::HlmsMacroblock::mDepthWrite

Referenced by operator!=().

◆ mId

uint16 Ogre::BasicBlock::mId
inherited

The mId is only valid while mRefCount > 0; which means mRsData may contain valid data, else it's null.

◆ mLifetimeId

uint16 Ogre::BasicBlock::mLifetimeId
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)

◆ mPolygonMode

PolygonMode Ogre::HlmsMacroblock::mPolygonMode

Referenced by operator!=().

◆ mRefCount

uint16 Ogre::BasicBlock::mRefCount
inherited

Render-System specific data.

◆ mRsData

void* Ogre::BasicBlock::mRsData
inherited

◆ mScissorTestEnabled

bool Ogre::HlmsMacroblock::mScissorTestEnabled

Referenced by operator!=().


The documentation for this struct was generated from the following file: