OGRE-Next  3.0.0
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 Member Functions inherited from Ogre::BasicBlock
 BasicBlock (uint8 blockType)
 

Public Attributes

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
 
PolygonMode mPolygonMode
 
bool mScissorTestEnabled
 
- 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...
 

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

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

◆ mDepthClamp

bool Ogre::HlmsMacroblock::mDepthClamp

Referenced by operator!=().

◆ mDepthFunc

CompareFunction Ogre::HlmsMacroblock::mDepthFunc

Referenced by operator!=().

◆ mDepthWrite

bool Ogre::HlmsMacroblock::mDepthWrite

Referenced by operator!=().

◆ mPolygonMode

PolygonMode Ogre::HlmsMacroblock::mPolygonMode

Referenced by operator!=().

◆ mScissorTestEnabled

bool Ogre::HlmsMacroblock::mScissorTestEnabled

Referenced by operator!=().


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