summaryrefslogtreecommitdiff
path: root/meta/3rd/Cocos4.0/library/cc/Renderer.lua
blob: 0e00c762eab9a3acaf213ecd171a385d99aef839 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
---@meta

---@class cc.Renderer 
local Renderer={ }
cc.Renderer=Renderer




---* Get winding mode.<br>
---* return The winding mode.
---@return int
function Renderer:getWinding () end
---* 
---@return int
function Renderer:getDrawnVertices () end
---*  Renders into the GLView all the queued `RenderCommand` objects 
---@return self
function Renderer:render () end
---*  Creates a render queue and returns its Id 
---@return int
function Renderer:createRenderQueue () end
---* Get whether stencil test is enabled or not.<br>
---* return true if stencil test is enabled, false otherwise.
---@return boolean
function Renderer:getStencilTest () end
---* Get the render target flag.<br>
---* return The render target flag.
---@return int
function Renderer:getRenderTargetFlag () end
---* Get the clear flag.<br>
---* return The clear flag.
---@return int
function Renderer:getClearFlag () end
---* Get stencil reference value set by `setStencilCompareFunction`. <br>
---* return Stencil reference value.<br>
---* see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)`
---@return unsigned_int
function Renderer:getStencilReferenceValue () end
---* Get stencil attachment.<br>
---* return Stencil attachment.
---@return cc.Texture2D
function Renderer:getStencilAttachment () end
---* Fixed-function state<br>
---* param x The x coordinate of the upper-left corner of the viewport.<br>
---* param y The y coordinate of the upper-left corner of the viewport.<br>
---* param w The width of the viewport, in pixels.<br>
---* param h The height of the viewport, in pixels.
---@param x int
---@param y int
---@param w unsigned_int
---@param h unsigned_int
---@return self
function Renderer:setViewPort (x,y,w,h) end
---* Get the stencil readMask.<br>
---* return Stencil read mask.<br>
---* see `setStencilCompareFunction(backend::CompareFunction func, unsigned int ref, unsigned int readMask)`
---@return unsigned_int
function Renderer:getStencilReadMask () end
---* Get depth clear value.<br>
---* return Depth clear value. 
---@return float
function Renderer:getClearDepth () end
---* Set front and back function and reference value for stencil testing.<br>
---* param func Specifies the stencil test function.<br>
---* param ref Specifies the reference value for the stencil test. <br>
---* readMask Specifies a mask that is ANDed with both the reference value and the stored stencil value when the test is done. 
---@param func int
---@param ref unsigned_int
---@param readMask unsigned_int
---@return self
function Renderer:setStencilCompareFunction (func,ref,readMask) end
---* / Get viewport.
---@return cc.Viewport
function Renderer:getViewport () end
---* Get the index when the stencil buffer is cleared. <br>
---* return The index used when the stencil buffer is cleared. 
---@return unsigned_int
function Renderer:getClearStencil () end
---* Enable/disable stencil test. <br>
---* param value true means enable stencil test, otherwise false.
---@param value boolean
---@return self
function Renderer:setStencilTest (value) end
---* / Get the action to take when the stencil test fails. 
---@return int
function Renderer:getStencilFailureOperation () end
---* Get color attachment.<br>
---* return Color attachment.
---@return cc.Texture2D
function Renderer:getColorAttachment () end
---@overload fun(cc.RenderCommand:cc.RenderCommand,int:int):self
---@overload fun(cc.RenderCommand:cc.RenderCommand):self
---@param command cc.RenderCommand
---@param renderQueueID int
---@return self
function Renderer:addCommand (command,renderQueueID) end
---* Enable/disable depth test. <br>
---* param value true means enable depth test, otherwise false.
---@param value boolean
---@return self
function Renderer:setDepthTest (value) end
---* Fixed-function state<br>
---* param x, y Specifies the lower left corner of the scissor box<br>
---* param wdith Specifies the width of the scissor box<br>
---* param height Specifies the height of the scissor box
---@param x float
---@param y float
---@param width float
---@param height float
---@return self
function Renderer:setScissorRect (x,y,width,height) end
---* Get whether depth test state is enabled or disabled.<br>
---* return true if depth test is enabled, otherwise false.
---@return boolean
function Renderer:getDepthTest () end
---* 
---@return self
function Renderer:init () end
---* Enable/disable to update depth buffer. <br>
---* param value true means enable writing into the depth buffer, otherwise false.
---@param value boolean
---@return self
function Renderer:setDepthWrite (value) end
---* / Get the stencil action when the stencil test passes, but the depth test fails. 
---@return int
function Renderer:getStencilPassDepthFailureOperation () end
---* Fixed-function state<br>
---* param mode Controls if primitives are culled when front facing, back facing, or not culled at all.
---@param mode int
---@return self
function Renderer:setCullMode (mode) end
---*  Pops a group from the render queue 
---@return self
function Renderer:popGroup () end
---*  Pushes a group into the render queue 
---@param renderQueueID int
---@return self
function Renderer:pushGroup (renderQueueID) end
---* 
---@return cc.ScissorRect
function Renderer:getScissorRect () end
---* 
---@return boolean
function Renderer:getScissorTest () end
---* Get the stencil write mask.<br>
---* return Stencil write mask.<br>
---* see `setStencilWriteMask(unsigned int mask)`
---@return unsigned_int
function Renderer:getStencilWriteMask () end
---* 
---@param number int
---@return self
function Renderer:addDrawnBatches (number) end
---*  returns whether or not a rectangle is visible or not 
---@param transform mat4_table
---@param size size_table
---@return boolean
function Renderer:checkVisibility (transform,size) end
---* Set front and back stencil test actions.<br>
---* param stencilFailureOp Specifies the action to take when the stencil test fails. <br>
---* param depthFailureOp Specifies the stencil action when the stencil test passes, but the depth test fails. <br>
---* param stencilDepthPassOp Specifies the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. 
---@param stencilFailureOp int
---@param depthFailureOp int
---@param stencilDepthPassOp int
---@return self
function Renderer:setStencilOperation (stencilFailureOp,depthFailureOp,stencilDepthPassOp) end
---* Get whether writing to depth buffer is enabled or not.<br>
---* return true if enable writing into the depth buffer, false otherwise.
---@return boolean
function Renderer:getDepthWrite () end
---* Get cull mode.<br>
---* return The cull mode.
---@return int
function Renderer:getCullMode () end
---* / Get the stencil test function.
---@return int
function Renderer:getStencilCompareFunction () end
---* Get color clear value.<br>
---* return Color clear value.
---@return color4f_table
function Renderer:getClearColor () end
---* Set depth compare function.<br>
---* param func Specifies the value used for depth buffer comparisons.
---@param func int
---@return self
function Renderer:setDepthCompareFunction (func) end
---* Control the front and back writing of individual bits in the stencil planes.<br>
---* param mask Specifies a bit mask to enable and disable writing of individual bits in the stencil planes.
---@param mask unsigned_int
---@return self
function Renderer:setStencilWriteMask (mask) end
---* / Get the stencil action when both the stencil test and the depth test pass, or when the stencil test passes and either there is no depth buffer or depth testing is not enabled. 
---@return int
function Renderer:getStencilDepthPassOperation () end
---* Enable/disable scissor test. <br>
---* param enabled true if enable scissor test, false otherwise.
---@param enabled boolean
---@return self
function Renderer:setScissorTest (enabled) end
---* Fixed-function state<br>
---* param winding The winding order of front-facing primitives.
---@param winding int
---@return self
function Renderer:setWinding (winding) end
---* Set clear values for each attachment.<br>
---* flags Flags to indicate which attachment clear value to be modified.<br>
---* color The clear color value.<br>
---* depth The clear depth value.<br>
---* stencil The clear stencil value.
---@param flags int
---@param color color4f_table
---@param depth float
---@param stencil unsigned_int
---@param globalOrder float
---@return self
function Renderer:clear (flags,color,depth,stencil,globalOrder) end
---* Set render targets. If not set, will use default render targets. It will effect all commands.<br>
---* flags Flags to indicate which attachment to be replaced.<br>
---* colorAttachment The value to replace color attachment, only one color attachment supported now.<br>
---* depthAttachment The value to repalce depth attachment.<br>
---* stencilAttachment The value to replace stencil attachment. Depth attachment and stencil attachment<br>
---* can be the same value.
---@param flags int
---@param colorAttachment cc.Texture2D
---@param depthAttachment cc.Texture2D
---@param stencilAttachment cc.Texture2D
---@return self
function Renderer:setRenderTarget (flags,colorAttachment,depthAttachment,stencilAttachment) end
---* Get depth attachment.<br>
---* return Depth attachment.
---@return cc.Texture2D
function Renderer:getDepthAttachment () end
---* 
---@param number int
---@return self
function Renderer:addDrawnVertices (number) end
---*  Cleans all `RenderCommand`s in the queue 
---@return self
function Renderer:clean () end
---* 
---@return int
function Renderer:getDrawnBatches () end
---* 
---@return self
function Renderer:clearDrawStats () end
---* Get depth compare function.<br>
---* return Depth compare function.
---@return int
function Renderer:getDepthCompareFunction () end
---* Constructor.
---@return self
function Renderer:Renderer () end