Cogs.Core
Classes | Public Member Functions | Public Attributes | Private Attributes | List of all members
Cogs::Core::RenderStates Struct Reference

Classes

struct  RasterizerStateInstance
 

Public Member Functions

void initialize (IGraphicsDevice *device)
 
void setupDepthStates (IGraphicsDevice *device)
 
void cleanup ()
 
uint16_t COGSCORE_DLL_API getRasterizerState (const Cogs::Core::RenderPassOptions &passOptions, RasterizerState::CullMode cullMode, bool wireFrame, bool counterClockWise)
 
COGSCORE_DLL_API uint16_t getRasterizerState (const RasterizerState &rs)
 
Cogs::DepthStencilStateHandle getDepthStencilState (const DepthStencilState &ds)
 
Cogs::SamplerStateHandle getSamplerState (const SamplerState &ss)
 

Public Attributes

bool reverseDepth = false
 
Cogs::RasterizerStateHandle defaultRasterizerStateHandle
 
Cogs::RasterizerStateHandle defaultCCWasterizerStateHandle
 
std::vector< Cogs::RasterizerStateHandlerasterizerStateHandles
 
struct {
   Cogs::BlendState   color = Cogs::BlendState::DefaultState()
 
   Cogs::BlendState   alpha = Cogs::BlendState::DefaultState()
 
   Cogs::BlendStateHandle   handle = Cogs::BlendStateHandle::NoHandle
 
blendStates [size_t(BlendMode::Count)]
 
Cogs::DepthStencilStateHandle defaultDepthStencilStateHandle
 
Cogs::DepthStencilStateHandle noWriteDepthStencilStateHandle
 
Cogs::DepthStencilStateHandle noDepthStencilStateHandle
 
Cogs::DepthStencilStateHandle noTestDepthStencilStateHandle
 
Cogs::DepthStencilStateHandle commonDepthStates [(int) DepthMode::Count *(int) DepthFunc::Count]
 
Cogs::SamplerStateHandle defaultSampler
 
Cogs::SamplerStateHandle commonSamplerStates [4]
 
Cogs::SamplerStateHandle shadowSampler
 
Cogs::VertexBufferHandle fullScreenTriangle
 

Private Attributes

IGraphicsDevicedevice = nullptr
 
std::unordered_map< RasterizerState, RasterizerStateInstancerasterizerStates
 
std::unordered_map< DepthStencilState, Cogs::DepthStencilStateHandledepthStencilStates
 
std::unordered_map< SamplerState, Cogs::SamplerStateHandlesamplerStates
 

Detailed Description

Definition at line 23 of file RenderStates.h.

Member Function Documentation

◆ cleanup()

void Cogs::Core::RenderStates::cleanup ( )

Definition at line 263 of file RenderStates.cpp.

◆ getDepthStencilState()

Cogs::DepthStencilStateHandle Cogs::Core::RenderStates::getDepthStencilState ( const DepthStencilState ds)

Definition at line 344 of file RenderStates.cpp.

◆ getRasterizerState() [1/2]

uint16_t Cogs::Core::RenderStates::getRasterizerState ( const Cogs::Core::RenderPassOptions passOptions,
RasterizerState::CullMode  cullMode,
bool  wireFrame,
bool  counterClockWise 
)

Definition at line 293 of file RenderStates.cpp.

◆ getRasterizerState() [2/2]

uint16_t Cogs::Core::RenderStates::getRasterizerState ( const RasterizerState rs)

Definition at line 318 of file RenderStates.cpp.

◆ getSamplerState()

Cogs::SamplerStateHandle Cogs::Core::RenderStates::getSamplerState ( const SamplerState ss)

Definition at line 369 of file RenderStates.cpp.

◆ initialize()

void Cogs::Core::RenderStates::initialize ( IGraphicsDevice device)

Definition at line 21 of file RenderStates.cpp.

◆ setupDepthStates()

void Cogs::Core::RenderStates::setupDepthStates ( IGraphicsDevice device)

Definition at line 198 of file RenderStates.cpp.

Member Data Documentation

◆ alpha

Cogs::BlendState Cogs::Core::RenderStates::alpha = Cogs::BlendState::DefaultState()

Definition at line 38 of file RenderStates.h.

◆ color

Cogs::BlendState Cogs::Core::RenderStates::color = Cogs::BlendState::DefaultState()

Definition at line 37 of file RenderStates.h.

◆ commonDepthStates

Cogs::DepthStencilStateHandle Cogs::Core::RenderStates::commonDepthStates[(int) DepthMode::Count *(int) DepthFunc::Count]

Definition at line 47 of file RenderStates.h.

◆ commonSamplerStates

Cogs::SamplerStateHandle Cogs::Core::RenderStates::commonSamplerStates[4]

Definition at line 52 of file RenderStates.h.

◆ defaultCCWasterizerStateHandle

Cogs::RasterizerStateHandle Cogs::Core::RenderStates::defaultCCWasterizerStateHandle

Definition at line 32 of file RenderStates.h.

◆ defaultDepthStencilStateHandle

Cogs::DepthStencilStateHandle Cogs::Core::RenderStates::defaultDepthStencilStateHandle

Definition at line 42 of file RenderStates.h.

◆ defaultRasterizerStateHandle

Cogs::RasterizerStateHandle Cogs::Core::RenderStates::defaultRasterizerStateHandle

Definition at line 31 of file RenderStates.h.

◆ defaultSampler

Cogs::SamplerStateHandle Cogs::Core::RenderStates::defaultSampler

Definition at line 50 of file RenderStates.h.

◆ depthStencilStates

std::unordered_map<DepthStencilState, Cogs::DepthStencilStateHandle> Cogs::Core::RenderStates::depthStencilStates
private

Definition at line 79 of file RenderStates.h.

◆ device

IGraphicsDevice* Cogs::Core::RenderStates::device = nullptr
private

Definition at line 70 of file RenderStates.h.

◆ fullScreenTriangle

Cogs::VertexBufferHandle Cogs::Core::RenderStates::fullScreenTriangle

Definition at line 58 of file RenderStates.h.

◆ handle

Cogs::BlendStateHandle Cogs::Core::RenderStates::handle = Cogs::BlendStateHandle::NoHandle

Definition at line 39 of file RenderStates.h.

◆ noDepthStencilStateHandle

Cogs::DepthStencilStateHandle Cogs::Core::RenderStates::noDepthStencilStateHandle

Definition at line 44 of file RenderStates.h.

◆ noTestDepthStencilStateHandle

Cogs::DepthStencilStateHandle Cogs::Core::RenderStates::noTestDepthStencilStateHandle

Definition at line 45 of file RenderStates.h.

◆ noWriteDepthStencilStateHandle

Cogs::DepthStencilStateHandle Cogs::Core::RenderStates::noWriteDepthStencilStateHandle

Definition at line 43 of file RenderStates.h.

◆ rasterizerStateHandles

std::vector<Cogs::RasterizerStateHandle> Cogs::Core::RenderStates::rasterizerStateHandles

Definition at line 34 of file RenderStates.h.

◆ rasterizerStates

std::unordered_map<RasterizerState, RasterizerStateInstance> Cogs::Core::RenderStates::rasterizerStates
private

Definition at line 78 of file RenderStates.h.

◆ reverseDepth

bool Cogs::Core::RenderStates::reverseDepth = false

Definition at line 29 of file RenderStates.h.

◆ samplerStates

std::unordered_map<SamplerState, Cogs::SamplerStateHandle> Cogs::Core::RenderStates::samplerStates
private

Definition at line 80 of file RenderStates.h.

◆ shadowSampler

Cogs::SamplerStateHandle Cogs::Core::RenderStates::shadowSampler

Definition at line 55 of file RenderStates.h.


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