API Documentation
Public Member Functions | Static Public Member Functions | List of all members
nkGraphics::RasterState Class Referenceabstract

Holds information about a raster state. More...

Inheritance diagram for nkGraphics::RasterState:
nkGraphics::Resource nkExport::Exportable

Public Member Functions

virtual ~RasterState ()
 
virtual FILL_MODE getFillMode () const =0
 
virtual CULL_MODE getCullMode () const =0
 
virtual bool getFrontCounterClockwise () const =0
 
virtual int getDepthBias () const =0
 
virtual float getDepthBiasClamp () const =0
 
virtual float getSlopeScaledDepthBias () const =0
 
virtual bool getDepthClipEnabled () const =0
 
virtual bool getScissorEnabled () const =0
 
virtual bool getMultiSampleEnabled () const =0
 
virtual bool getAntiAliasedLineEnabled () const =0
 
virtual unsigned int getForcedSampleCount () const =0
 
virtual bool getConservativeRasterizationEnabled () const =0
 
virtual void setFillMode (FILL_MODE value)=0
 
virtual void setCullMode (CULL_MODE value)=0
 
virtual void setFrontCounterClockwise (bool value)=0
 
virtual void setDepthBias (int value)=0
 
virtual void setDepthBiasClamp (float value)=0
 
virtual void setSlopeScaledDepthBias (float value)=0
 
virtual void setDepthClipEnabled (bool value)=0
 
virtual void setScissorEnabled (bool value)=0
 
virtual void setMultiSampleEnabled (bool value)=0
 
virtual void setAntiAliasedLineEnabled (bool value)=0
 
virtual void setForcedSampleCount (unsigned int value)=0
 
virtual void setConservativeRasterizationEnabled (bool value)=0
 
virtual void resetToDefault ()=0
 
virtual void exportClassToTree (nkExport::Node *rootNode) override
 
virtual void importClassFromTree (nkExport::Node *rootNode) override
 
- Public Member Functions inherited from nkGraphics::Resource
virtual ~Resource ()
 
bool isReadyForRendering () const
 
bool isUnloaded () const
 
RESOURCE_LOAD_STATE getLoadState () const
 
nkMemory::StringView getPath () const
 
RESOURCE_TYPE getTypeName () const
 
nkMemory::StringView getName () const
 
SystemgetSystem () const
 
bool getHidden () const
 
bool getGpuUploadCanBeDeferred () const
 
virtual void setPath (nkMemory::StringView value)
 
void setName (nkMemory::StringView value)
 
void setHidden (bool value)
 
void setGpuUploadCanBeDeferred (bool value)
 
virtual bool load ()=0
 
virtual void unload ()=0
 
- Public Member Functions inherited from nkExport::Exportable
 Exportable () noexcept
 
virtual ~Exportable ()
 

Static Public Member Functions

static nkMemory::UniquePtr< RasterStatecreate (System *system=nullptr)
 

Detailed Description

Holds information about a raster state.

A raster state drives how the rasterization occur for primitives rendered.

See RasterStateManager::createOrRetrieve() or RasterState::create() for instantiation.

Constructor & Destructor Documentation

◆ ~RasterState()

virtual nkGraphics::RasterState::~RasterState ( )
virtual

Destructor.

Member Function Documentation

◆ getFillMode()

virtual FILL_MODE nkGraphics::RasterState::getFillMode ( ) const
pure virtual
Returns
The fill mode used.

◆ getCullMode()

virtual CULL_MODE nkGraphics::RasterState::getCullMode ( ) const
pure virtual
Returns
The cull mode used.

◆ getFrontCounterClockwise()

virtual bool nkGraphics::RasterState::getFrontCounterClockwise ( ) const
pure virtual
Returns
Whether the front side of primitives is chosen according to their point being counter clockwise (true) or not (false).

◆ getDepthBias()

virtual int nkGraphics::RasterState::getDepthBias ( ) const
pure virtual
Returns
The depth bias used.

◆ getDepthBiasClamp()

virtual float nkGraphics::RasterState::getDepthBiasClamp ( ) const
pure virtual
Returns
The depth bias clamp used.

◆ getSlopeScaledDepthBias()

virtual float nkGraphics::RasterState::getSlopeScaledDepthBias ( ) const
pure virtual
Returns
The slope scaled depth bias used.

◆ getDepthClipEnabled()

virtual bool nkGraphics::RasterState::getDepthClipEnabled ( ) const
pure virtual
Returns
Whether depth clip is enabled (true) or not (false).

◆ getScissorEnabled()

virtual bool nkGraphics::RasterState::getScissorEnabled ( ) const
pure virtual
Returns
Whether the scissor test is enabled (true) or not (false).

◆ getMultiSampleEnabled()

virtual bool nkGraphics::RasterState::getMultiSampleEnabled ( ) const
pure virtual
Returns
Whether the multi sampling is enabled (true) or not (false).

◆ getAntiAliasedLineEnabled()

virtual bool nkGraphics::RasterState::getAntiAliasedLineEnabled ( ) const
pure virtual
Returns
Whether the lines are anti aliased (true) or not (false).

◆ getForcedSampleCount()

virtual unsigned int nkGraphics::RasterState::getForcedSampleCount ( ) const
pure virtual
Returns
The forced sample count used.

◆ getConservativeRasterizationEnabled()

virtual bool nkGraphics::RasterState::getConservativeRasterizationEnabled ( ) const
pure virtual
Returns
If conservative rasterization is enabled (true) or not (false).

◆ setFillMode()

virtual void nkGraphics::RasterState::setFillMode ( FILL_MODE  value)
pure virtual

Sets the fill mode when rasterizing.

Parameters
valueThe mode to use.

◆ setCullMode()

virtual void nkGraphics::RasterState::setCullMode ( CULL_MODE  value)
pure virtual

Sets the cull mode when rasterizing.

Parameters
valueThe mode to use.

◆ setFrontCounterClockwise()

virtual void nkGraphics::RasterState::setFrontCounterClockwise ( bool  value)
pure virtual

Sets whether the front of primitives should be chosen according to their points being declared counter clockwise or not.

Parameters
valueWhether the front is counter clockwise (true) or not (false).

◆ setDepthBias()

virtual void nkGraphics::RasterState::setDepthBias ( int  value)
pure virtual

Sets the depth bias used when rasterizing.

Parameters
valueThe value used.

◆ setDepthBiasClamp()

virtual void nkGraphics::RasterState::setDepthBiasClamp ( float  value)
pure virtual

Sets the bias clamp to use.

Parameters
valueThe value used.

◆ setSlopeScaledDepthBias()

virtual void nkGraphics::RasterState::setSlopeScaledDepthBias ( float  value)
pure virtual

Sets the slope scaled depth bias to use.

Parameters
valueThe value used.

◆ setDepthClipEnabled()

virtual void nkGraphics::RasterState::setDepthClipEnabled ( bool  value)
pure virtual

Sets whether the depth clipping is enabled or not.

Parameters
valueIf the clipping should be enabled (true) or not (false).

◆ setScissorEnabled()

virtual void nkGraphics::RasterState::setScissorEnabled ( bool  value)
pure virtual

Sets whether the scissor test should be enabled or not.

Parameters
valueIf the test should be enabled (true) or not (false).

◆ setMultiSampleEnabled()

virtual void nkGraphics::RasterState::setMultiSampleEnabled ( bool  value)
pure virtual

Sets whether multi sampling is enabled.

Parameters
valueIf multi sampling is enabled (true) or not (false).

◆ setAntiAliasedLineEnabled()

virtual void nkGraphics::RasterState::setAntiAliasedLineEnabled ( bool  value)
pure virtual

Sets whether the lines should be anti aliased.

Parameters
valueIf anti aliasing of lines is enabled (true) or not (false).

◆ setForcedSampleCount()

virtual void nkGraphics::RasterState::setForcedSampleCount ( unsigned int  value)
pure virtual

Sets the forced sample count used.

Parameters
valueThe value to use.

◆ setConservativeRasterizationEnabled()

virtual void nkGraphics::RasterState::setConservativeRasterizationEnabled ( bool  value)
pure virtual

Sets whether conservative rasterization is enabled or not.

Parameters
valueIf the option is enabled (true) or not (false).

◆ resetToDefault()

virtual void nkGraphics::RasterState::resetToDefault ( )
pure virtual

Resets the state to its default.

◆ exportClassToTree()

virtual void nkGraphics::RasterState::exportClassToTree ( nkExport::Node rootNode)
overridevirtual

Exports an item into a tree describing its structure and its data.

Parameters
rootNodeThe node into which the object has to write its related information.

Implements nkExport::Exportable.

◆ importClassFromTree()

virtual void nkGraphics::RasterState::importClassFromTree ( nkExport::Node rootNode)
overridevirtual

Imports information from a tree which is supposed to describe its structure and data.

Parameters
rootNodeThe root node of the tree holding the information.

Implements nkExport::Exportable.

◆ create()

static nkMemory::UniquePtr<RasterState> nkGraphics::RasterState::create ( System system = nullptr)
static

Creates a standalone resource, linking it to a system, but no manager. This method can be used to allocate a resource and manually manage its lifetime.

Parameters
systemThe system to create the resource into. If left to nullptr, then the Singleton instance will be used.
Returns
The created resource instance.

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