Cocos Creator
手册文档
API 参考
Cocos Creator 3D
手册文档
API 参考
Cocos2d-x
手册文档
API 参考
Version: 3.0
Version: 3.5
Version: 3.4
Version: 3.3
Version: 3.2
Version: 3.1
Version: 2.4
Version: 2.3
Version: 2.2
Version: 2.1
Version: 2.0
Version: 1.10
Version: 1.9
Search
Preparing search index...
The search index is not available
CocosCreatorAPI
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
gfx
Shader
Class Shader
GFX 着色器。
Hierarchy
Obj
Shader
Index
Constructors
constructor
Properties
_attributes
_blocks
_device
_gfx
Type
_id
_name
_samplers
_stages
_shader
IdGen
Accessors
attributes
blocks
gfx
Type
id
name
samplers
Methods
destroy
initialize
Constructors
constructor
new
Shader
(
device
:
Device
)
:
Shader
Parameters
device:
Device
Returns
Shader
Properties
Protected
_attributes
_attributes
:
Attribute
[]
= []
Protected
_blocks
_blocks
:
UniformBlock
[]
= []
Protected
_device
_device
:
Device
Protected
_gfx
Type
_gfx
Type
:
ObjectType
= ObjectType.UNKNOWN
Protected
_id
_id
:
number
Protected
_name
_name
:
string
= ""
Protected
_samplers
_samplers
:
UniformSampler
[]
= []
Protected
_stages
_stages
:
ShaderStage
[]
= []
Static
Private
_shader
IdGen
_shader
IdGen
:
number
= 0
Accessors
attributes
get
attributes
(
)
:
Attribute
[]
Returns
Attribute
[]
blocks
get
blocks
(
)
:
UniformBlock
[]
Returns
UniformBlock
[]
gfx
Type
get
gfxType
(
)
:
ObjectType
Returns
ObjectType
id
get
id
(
)
:
number
着色器 id。
Returns
number
name
get
name
(
)
:
string
着色器名称。
Returns
string
samplers
get
samplers
(
)
:
UniformSampler
[]
Returns
UniformSampler
[]
Methods
Abstract
destroy
destroy
(
)
:
void
Returns
void
Abstract
initialize
initialize
(
info
:
ShaderInfo
)
:
boolean
Parameters
info:
ShaderInfo
Returns
boolean
Globals
gfx
Shader
constructor
_attributes
_blocks
_device
_gfx
Type
_id
_name
_samplers
_stages
_shader
IdGen
attributes
blocks
gfx
Type
id
name
samplers
destroy
initialize
Generated using
TypeDoc
GFX 着色器。