Cocos2d-x  v3.17
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups Pages
RenderState Class Reference

Defines the rendering state of the graphics device. More...

Inherits Ref.

Inherited by Material, Pass, and Technique.

Classes

class  StateBlock
 Defines a block of fixed-function render states that can be applied to a RenderState object. More...
 

Public Types

enum  DepthFunction
 Defines the supported depth compare functions. More...
 
enum  CullFaceSide
 Defines culling criteria for front-facing, back-facing and both-side facets.
 
enum  FrontFace
 Defines the winding of vertices in faces that are considered front facing. More...
 
enum  StencilFunction
 Defines the supported stencil compare functions. More...
 
enum  StencilOperation
 Defines the supported stencil operations to perform. More...
 

Public Member Functions

void setTexture (Texture2D *texture)
 Texture that will use in the CC_Texture0 uniform. More...
 
var setTexture ( var texture)
 Texture that will use in the CC_Texture0 uniform. More...
 
local setTexture ( local texture)
 Texture that will use in the CC_Texture0 uniform. More...
 
Texture2DgetTexture () const
 Returns the texture that is going to be used for CC_Texture0. More...
 
void bind (Pass *pass)
 Binds the render state for this RenderState and any of its parents, top-down, for the given pass.
 
RenderStategetTopmost (RenderState *below)
 Returns the topmost RenderState in the hierarchy below the given RenderState.
 
var getTopmost ( var below)
 Returns the topmost RenderState in the hierarchy below the given RenderState.
 
local getTopmost ( local below)
 Returns the topmost RenderState in the hierarchy below the given RenderState.
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
void release ()
 Releases the ownership immediately. More...
 
local release ()
 Releases the ownership immediately. More...
 
Refautorelease ()
 Releases the ownership sometime soon automatically. More...
 
unsigned int getReferenceCount () const
 Returns the Ref's current reference count. More...
 
local getReferenceCount ()
 Returns the Ref's current reference count. More...
 
virtual ~Ref ()
 Destructor. More...
 

Static Public Member Functions

static void initialize ()
 Static initializer that is called during game startup.
 
var initialize ()
 Static initializer that is called during game startup.
 
local initialize ()
 Static initializer that is called during game startup.
 
static void finalize ()
 Static finalizer that is called during game shutdown.
 
local finalize ()
 Static finalizer that is called during game shutdown.
 

Additional Inherited Members

- Public Attributes inherited from Ref
unsigned int _ID
 object id, ScriptSupport need public _ID
 
local _ID
 object id, ScriptSupport need public _ID
 
int _luaID
 Lua reference id.
 
local _luaID
 Lua reference id.
 
void * _scriptObject
 scriptObject, support for swift
 
local _scriptObject
 scriptObject, support for swift
 
bool _rooted
 When true, it means that the object was already rooted.
 
local _rooted
 When true, it means that the object was already rooted.
 

Detailed Description

Defines the rendering state of the graphics device.

Member Enumeration Documentation

Defines the supported depth compare functions.

Depth compare functions specify the comparison that takes place between the incoming pixel's depth value and the depth value already in the depth buffer. If the compare function passes, the new pixel will be drawn.

The initial depth compare function is DEPTH_LESS.

Defines the supported depth compare functions.

Depth compare functions specify the comparison that takes place between the incoming pixel's depth value and the depth value already in the depth buffer. If the compare function passes, the new pixel will be drawn.

The initial depth compare function is DEPTH_LESS.

Defines the supported depth compare functions.

Depth compare functions specify the comparison that takes place between the incoming pixel's depth value and the depth value already in the depth buffer. If the compare function passes, the new pixel will be drawn.

The initial depth compare function is DEPTH_LESS.

enum FrontFace

Defines the winding of vertices in faces that are considered front facing.

The initial front face mode is set to FRONT_FACE_CCW.

var FrontFace

Defines the winding of vertices in faces that are considered front facing.

The initial front face mode is set to FRONT_FACE_CCW.

local FrontFace

Defines the winding of vertices in faces that are considered front facing.

The initial front face mode is set to FRONT_FACE_CCW.

Defines the supported stencil compare functions.

Stencil compare functions determine if a new pixel will be drawn.

The initial stencil compare function is STENCIL_ALWAYS.

Defines the supported stencil compare functions.

Stencil compare functions determine if a new pixel will be drawn.

The initial stencil compare function is STENCIL_ALWAYS.

Defines the supported stencil compare functions.

Stencil compare functions determine if a new pixel will be drawn.

The initial stencil compare function is STENCIL_ALWAYS.

Defines the supported stencil operations to perform.

Stencil operations determine what should happen to the pixel if the stencil test fails, passes, or passes but fails the depth test.

The initial stencil operation is STENCIL_OP_KEEP.

Defines the supported stencil operations to perform.

Stencil operations determine what should happen to the pixel if the stencil test fails, passes, or passes but fails the depth test.

The initial stencil operation is STENCIL_OP_KEEP.

Defines the supported stencil operations to perform.

Stencil operations determine what should happen to the pixel if the stencil test fails, passes, or passes but fails the depth test.

The initial stencil operation is STENCIL_OP_KEEP.

Member Function Documentation

void setTexture ( Texture2D texture)

Texture that will use in the CC_Texture0 uniform.

Added to be backwards compatible. Use Samplers from .material instead.

var setTexture ( var  texture)

Texture that will use in the CC_Texture0 uniform.

Added to be backwards compatible. Use Samplers from .material instead.

local setTexture ( local  texture)

Texture that will use in the CC_Texture0 uniform.

Added to be backwards compatible. Use Samplers from .material instead.

Texture2D* getTexture ( ) const

Returns the texture that is going to be used for CC_Texture0.

Added to be backwards compatible.

var getTexture ( )

Returns the texture that is going to be used for CC_Texture0.

Added to be backwards compatible.

local getTexture ( )

Returns the texture that is going to be used for CC_Texture0.

Added to be backwards compatible.


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