2014-05-20 19:46:42 +08:00
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @module GLProgramState
|
|
|
|
-- @extend Ref
|
2014-06-25 17:36:50 +08:00
|
|
|
-- @parent_module cc
|
2014-05-20 19:46:42 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- Get the flag of vertex attribs used by OR operation.
|
|
|
|
-- @function [parent=#GLProgramState] getVertexAttribsFlags
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @return unsigned int#unsigned int ret (return value: unsigned int)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @overload self, int, vec4_table
|
|
|
|
-- @overload self, string, vec4_table
|
|
|
|
-- @function [parent=#GLProgramState] setUniformVec4
|
|
|
|
-- @param self
|
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #vec4_table value
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-05-20 19:46:42 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, int, vec2_table
|
|
|
|
-- @overload self, string, vec2_table
|
|
|
|
-- @function [parent=#GLProgramState] setUniformVec2
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string uniformName
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #vec2_table value
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-27 16:31:17 +08:00
|
|
|
|
2014-06-29 16:45:14 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, int, vec3_table
|
|
|
|
-- @overload self, string, vec3_table
|
|
|
|
-- @function [parent=#GLProgramState] setUniformVec3
|
|
|
|
-- @param self
|
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #vec3_table value
|
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- Apply GLProgram, attributes and uniforms.<br>
|
|
|
|
-- param modelView The applied modelView matrix to shader.
|
|
|
|
-- @function [parent=#GLProgramState] apply
|
2014-06-29 16:45:14 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #mat4_table modelView
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-29 16:45:14 +08:00
|
|
|
|
2015-05-06 09:07:26 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, int, vec4_table, long
|
|
|
|
-- @overload self, string, vec4_table, long
|
|
|
|
-- @function [parent=#GLProgramState] setUniformVec4v
|
|
|
|
-- @param self
|
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #vec4_table pointer
|
|
|
|
-- @param #long size
|
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
|
|
|
|
2014-06-29 16:45:14 +08:00
|
|
|
--------------------------------
|
2015-03-27 13:46:01 +08:00
|
|
|
-- Apply GLProgram, and built in uniforms.<br>
|
|
|
|
-- param modelView The applied modelView matrix to shader.
|
2014-06-29 16:45:14 +08:00
|
|
|
-- @function [parent=#GLProgramState] applyGLProgram
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #mat4_table modelView
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-29 16:45:14 +08:00
|
|
|
|
2015-05-06 09:07:26 +08:00
|
|
|
--------------------------------
|
|
|
|
-- @overload self, int, int
|
|
|
|
-- @overload self, string, int
|
|
|
|
-- @function [parent=#GLProgramState] setUniformInt
|
|
|
|
-- @param self
|
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #int value
|
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
|
|
|
|
|
|
|
--------------------------------
|
|
|
|
-- @overload self, int, vec2_table, long
|
|
|
|
-- @overload self, string, vec2_table, long
|
|
|
|
-- @function [parent=#GLProgramState] setUniformVec2v
|
|
|
|
-- @param self
|
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #vec2_table pointer
|
|
|
|
-- @param #long size
|
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-03-24 11:25:31 +08:00
|
|
|
-- Get the number of user defined uniform count.
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @function [parent=#GLProgramState] getUniformCount
|
|
|
|
-- @param self
|
|
|
|
-- @return long#long ret (return value: long)
|
|
|
|
|
2014-06-29 16:45:14 +08:00
|
|
|
--------------------------------
|
2015-03-27 13:46:01 +08:00
|
|
|
-- Apply attributes.<br>
|
|
|
|
-- param applyAttribFlags Call GL::enableVertexAttribs(_vertexAttribsFlags) or not.
|
2014-06-29 16:45:14 +08:00
|
|
|
-- @function [parent=#GLProgramState] applyAttributes
|
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-29 16:45:14 +08:00
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- Returns a new copy of the GLProgramState. The GLProgram is reused
|
|
|
|
-- @function [parent=#GLProgramState] clone
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
|
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @{ <br>
|
|
|
|
-- Setter and Getter of the owner GLProgram binded in this program state.
|
|
|
|
-- @function [parent=#GLProgramState] setGLProgram
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #cc.GLProgram glprogram
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2015-05-06 09:07:26 +08:00
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, int, float, long
|
|
|
|
-- @overload self, string, float, long
|
|
|
|
-- @function [parent=#GLProgramState] setUniformFloatv
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string uniformName
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #float pointer
|
|
|
|
-- @param #long size
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-27 16:31:17 +08:00
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
--
|
|
|
|
-- @function [parent=#GLProgramState] getGLProgram
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @return GLProgram#GLProgram ret (return value: cc.GLProgram)
|
2014-05-20 19:46:42 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, string, unsigned int
|
|
|
|
-- @overload self, string, cc.Texture2D
|
|
|
|
-- @overload self, int, cc.Texture2D
|
|
|
|
-- @overload self, int, unsigned int
|
|
|
|
-- @function [parent=#GLProgramState] setUniformTexture
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #int uniformLocation
|
|
|
|
-- @param #unsigned int textureId
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-27 16:31:17 +08:00
|
|
|
|
2014-06-29 16:45:14 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- Apply user defined uniforms.
|
|
|
|
-- @function [parent=#GLProgramState] applyUniforms
|
2014-06-29 16:45:14 +08:00
|
|
|
-- @param self
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-29 16:45:14 +08:00
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, int, float
|
|
|
|
-- @overload self, string, float
|
|
|
|
-- @function [parent=#GLProgramState] setUniformFloat
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string uniformName
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #float value
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2014-06-27 16:31:17 +08:00
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, int, mat4_table
|
|
|
|
-- @overload self, string, mat4_table
|
|
|
|
-- @function [parent=#GLProgramState] setUniformMat4
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #mat4_table value
|
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @overload self, int, vec3_table, long
|
|
|
|
-- @overload self, string, vec3_table, long
|
|
|
|
-- @function [parent=#GLProgramState] setUniformVec3v
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @param #string uniformName
|
|
|
|
-- @param #vec3_table pointer
|
|
|
|
-- @param #long size
|
2015-01-21 17:33:26 +08:00
|
|
|
-- @return GLProgramState#GLProgramState self (return value: cc.GLProgramState)
|
2015-05-06 09:07:26 +08:00
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
--------------------------------
|
2015-05-06 09:07:26 +08:00
|
|
|
-- Get the number of vertex attributes.
|
|
|
|
-- @function [parent=#GLProgramState] getVertexAttribCount
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @param self
|
2015-05-06 09:07:26 +08:00
|
|
|
-- @return long#long ret (return value: long)
|
2014-05-20 19:46:42 +08:00
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- returns a new instance of GLProgramState for a given GLProgram
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @function [parent=#GLProgramState] create
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.GLProgram glprogram
|
|
|
|
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- gets-or-creates an instance of GLProgramState for a given GLProgramName
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @function [parent=#GLProgramState] getOrCreateWithGLProgramName
|
|
|
|
-- @param self
|
2014-09-02 13:45:07 +08:00
|
|
|
-- @param #string glProgramName
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
|
|
|
|
|
|
|
|
--------------------------------
|
2014-09-02 13:45:07 +08:00
|
|
|
-- gets-or-creates an instance of GLProgramState for a given GLProgram
|
2014-05-20 19:46:42 +08:00
|
|
|
-- @function [parent=#GLProgramState] getOrCreateWithGLProgram
|
|
|
|
-- @param self
|
|
|
|
-- @param #cc.GLProgram glprogram
|
|
|
|
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
|
|
|
|
|
2015-05-06 09:07:26 +08:00
|
|
|
--------------------------------
|
|
|
|
-- gets-or-creates an instance of GLProgramState for given shaders
|
|
|
|
-- @function [parent=#GLProgramState] getOrCreateWithShaders
|
|
|
|
-- @param self
|
|
|
|
-- @param #string vertexShader
|
|
|
|
-- @param #string fragShader
|
|
|
|
-- @param #string compileTimeDefines
|
|
|
|
-- @return GLProgramState#GLProgramState ret (return value: cc.GLProgramState)
|
|
|
|
|
2014-05-20 19:46:42 +08:00
|
|
|
return nil
|