Cocos2d-x  v3.12
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Groups
Technique Class Reference

Material contains one or more techniques. More...

Inherits RenderState.

Public Member Functions

void addPass (Pass *pass)
 Adds a new pass to the Technique. More...
 
std::string getName () const
 Gets the name of the Technique Technique name.
 
var getName ()
 Gets the name of the Technique Technique name.
 
local getName ()
 Gets the name of the Technique Technique name.
 
PassgetPassByIndex (ssize_t index) const
 Gets the Pass at given index. More...
 
ssize_t getPassCount () const
 Gets the number of Passes in the Technique. More...
 
var getPassCount ()
 Gets the number of Passes in the Technique. More...
 
local getPassCount ()
 Gets the number of Passes in the Technique. More...
 
const Vector< Pass * > & getPasses () const
 Gets the list of passes. More...
 
local getPasses ()
 Gets the list of passes. More...
 
Techniqueclone () const
 Gets a new clone of the Technique. More...
 
var clone ()
 Gets a new clone of the Technique. More...
 
local clone ()
 Gets a new clone of the Technique. More...
 
- Public Member Functions inherited from RenderState
std::string getName () const
 Get name Name.
 
void setTexture (Texture2D *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. More...
 
RenderStategetTopmost (RenderState *below)
 Returns the topmost RenderState in the hierarchy below the given RenderState. More...
 
var getTopmost ( var below)
 Returns the topmost RenderState in the hierarchy below the given RenderState. More...
 
local getTopmost ( local below)
 Returns the topmost RenderState in the hierarchy below the given RenderState. More...
 
- Public Member Functions inherited from Ref
void retain ()
 Retains the ownership. More...
 
local retain ()
 Retains the ownership. More...
 
void 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.
 

Static Public Member Functions

static TechniquecreateWithGLProgramState (Material *parent, GLProgramState *state)
 Creates a new Technique with a GLProgramState. More...
 
var createWithGLProgramState ( var parent, var state)
 Creates a new Technique with a GLProgramState. More...
 
local createWithGLProgramState ( local parent, local state)
 Creates a new Technique with a GLProgramState. More...
 
static Techniquecreate (Material *parent)
 Create Technique. More...
 
local create ( local parent)
 Create Technique. More...
 
- Static Public Member Functions inherited from RenderState
static void initialize ()
 Static initializer that is called during game startup.
 
static void finalize ()
 Static finalizer that is called during game shutdown.
 

Additional Inherited Members

- Public Types inherited from RenderState
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 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.
 
bool _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 
local _scriptOwned
 The life of the object is scrolled by the scripting engine. More...
 

Detailed Description

Material contains one or more techniques.

Each technique can contains one or more passes. And material can active one technique for drawing.

Member Function Documentation

static Technique*
createWithGLProgramState
( Material parent,
GLProgramState state 
)
static

Creates a new Technique with a GLProgramState.

Method added to support legacy code. Material who owns this technique. GLProgramState used to create the technique. Created Technique.

var createWithGLProgramState ( var  parent,
var  state 
)
static

Creates a new Technique with a GLProgramState.

Method added to support legacy code. Material who owns this technique. GLProgramState used to create the technique. Created Technique.

local createWithGLProgramState ( local  parent,
local  state 
)
static

Creates a new Technique with a GLProgramState.

Method added to support legacy code. Material who owns this technique. GLProgramState used to create the technique. Created Technique.

static Technique* create ( Material parent)
static

Create Technique.

Material who owns this technique. Created Technique.

var create ( var  parent)
static

Create Technique.

Material who owns this technique. Created Technique.

local create ( local  parent)
static

Create Technique.

Material who owns this technique. Created Technique.

void addPass ( Pass pass)

Adds a new pass to the Technique.

Order matters. First added, first rendered Added pass.

var addPass ( var  pass)

Adds a new pass to the Technique.

Order matters. First added, first rendered Added pass.

local addPass ( local  pass)

Adds a new pass to the Technique.

Order matters. First added, first rendered Added pass.

Pass* getPassByIndex ( ssize_t  index) const

Gets the Pass at given index.

Pass at specific index.

var getPassByIndex ( var  index)

Gets the Pass at given index.

Pass at specific index.

local getPassByIndex ( local  index)

Gets the Pass at given index.

Pass at specific index.

ssize_t getPassCount ( ) const

Gets the number of Passes in the Technique.

Number of Pass.

var getPassCount ( )

Gets the number of Passes in the Technique.

Number of Pass.

local getPassCount ( )

Gets the number of Passes in the Technique.

Number of Pass.

const Vector<Pass*>& getPasses ( ) const

Gets the list of passes.

List of Pass.

var getPasses ( )

Gets the list of passes.

List of Pass.

local getPasses ( )

Gets the list of passes.

List of Pass.

Technique* clone ( ) const

Gets a new clone of the Technique.

Copy of Technique.

var clone ( )

Gets a new clone of the Technique.

Copy of Technique.

local clone ( )

Gets a new clone of the Technique.

Copy of Technique.


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