Python API 2.0 Reference: OpenMayaRender.MStateManager Class Reference

+ Inheritance diagram for OpenMayaRender.MStateManager:

Public Member Functions

__init__ ()
 
getBlendState ()
 
getDepthStencilState ()
 
getRasterizerState ()
 
getSamplerState ()
 
setBlendState ()
 
setDepthStencilState ()
 
setRasterizerState ()
 
setSamplerState ()
 

Static Public Member Functions

acquireBlendState ()
 
acquireDepthStencilState ()
 
acquireRasterizerState ()
 
acquireSamplerState ()
 
getMaxSamplerCount ()
 
releaseBlendState ()
 
releaseDepthStencilState ()
 
releaseRasterizerState ()
 
releaseSamplerState ()
 

Static Public Attributes

int kCompareAlways = 8
 
int kCompareEqual = 3
 
int kCompareGreater = 5
 
int kCompareGreaterEqual = 7
 
int kCompareLess = 2
 
int kCompareLessEqual = 4
 
int kCompareNever = 1
 
int kCompareNotEqual = 6
 
int kDomainShader = 5
 
int kGeometryShader = 2
 
int kHullShader = 4
 
int kNoShader = 0
 
int kPixelShader = 3
 
int kVertexShader = 1
 

Detailed Description

Class to allow efficient access to GPU state information.

Constructor & Destructor Documentation

OpenMayaRender.MStateManager.__init__ ( )
x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Member Function Documentation

OpenMayaRender.MStateManager.acquireBlendState ( )
static
acquireBlendState(MBlendStateDesc) -> MBlendState

Acquires an immutable unique blend state matching the blend state descriptor.
OpenMayaRender.MStateManager.acquireDepthStencilState ( )
static
acquireDepthStencilState(MDepthStencilStateDesc) -> MDepthStencilState

Acquires an immutable unique depth-stencil state matching the blend state descriptor.
OpenMayaRender.MStateManager.acquireRasterizerState ( )
static
acquireRasterizerState(MRasterizerStateDesc) -> MRasterizerState

Acquires an immutable unique rasterizer state matching the rasterizer state descriptor.
OpenMayaRender.MStateManager.acquireSamplerState ( )
static
acquireSamplerState(MSamplerStateDesc) -> MSamplerState

Acquires an immutable unique sampler state matching the blend state descriptor.
OpenMayaRender.MStateManager.getBlendState ( )
getBlendState() -> MBlendState

Gets the current active blend state from the device.
OpenMayaRender.MStateManager.getDepthStencilState ( )
getDepthStencilState() -> MDepthStencilState

Gets the current depth-stencil blend state from the device.
OpenMayaRender.MStateManager.getMaxSamplerCount ( )
static
getMaxSamplerCount() -> int

Get the maximum number of simulataneous texture coordinate interpolation channels.
OpenMayaRender.MStateManager.getRasterizerState ( )
getRasterizerState() -> MRasterizerState

Gets the current active rasterizer state from the device.
OpenMayaRender.MStateManager.getSamplerState ( )
getSamplerState(shader, samplerIndex) -> MSamplerState

Gets the current active sampler state from the device.
* shader (ShaderType) - The shader this sampler will apply to.
* samplerIndex (int) - The index of the sampler to set with the given shader state.
OpenMayaRender.MStateManager.releaseBlendState ( )
static
releaseBlendState(MBlendState) -> None

Deletes the MBlendState and releases the reference to the underlying state object which is held by the MBlendState object.
OpenMayaRender.MStateManager.releaseDepthStencilState ( )
static
releaseDepthStencilState(MDepthStencilState) -> None

Deletes the MDepthStencilState and releases the reference to the underlying state object which is held by the MDepthStencilState object.
OpenMayaRender.MStateManager.releaseRasterizerState ( )
static
releaseRasterizerState(MRasterizerState) -> None

Deletes the MRasterizerState and releases the reference to the underlying state object which is held by the MRasterizerState object.
OpenMayaRender.MStateManager.releaseSamplerState ( )
static
releaseSamplerState(MSamplerState) -> None

Deletes the MSamplerState and releases the reference to the underlying state object which is held by the MSamplerState object.
OpenMayaRender.MStateManager.setBlendState ( )
setBlendState(MBlendState) -> self

Sets the active blend state on the device.
OpenMayaRender.MStateManager.setDepthStencilState ( )
setDepthStencilState(MDepthStencilState) -> self

Sets the active depth-stencil state on the device.
OpenMayaRender.MStateManager.setRasterizerState ( )
setRasterizerState(MRasterizerState) -> self

Sets the active rasterizer state on the device.
OpenMayaRender.MStateManager.setSamplerState ( )
setSamplerState(shader, samplerIndex, samplerState) -> self

Sets the active sampler state for any of the texture samplers on the device.
* shader (ShaderType) - The shader this sampler will apply to, e.g. kPixelShader.
* samplerIndex (int) - The index of the sampler to set with the given shader state.
* samplerState (MSamplerState) - The sampler state container object that was previously acquired.