OLD | NEW |
(Empty) | |
| 1 |
| 2 class _WebGLRenderingContextImpl extends _CanvasRenderingContextImpl implements
WebGLRenderingContext { |
| 3 _WebGLRenderingContextImpl._wrap(ptr) : super._wrap(ptr); |
| 4 |
| 5 int get drawingBufferHeight() => _wrap(_ptr.drawingBufferHeight); |
| 6 |
| 7 int get drawingBufferWidth() => _wrap(_ptr.drawingBufferWidth); |
| 8 |
| 9 void activeTexture(int texture) { |
| 10 _ptr.activeTexture(_unwrap(texture)); |
| 11 return; |
| 12 } |
| 13 |
| 14 void attachShader(WebGLProgram program, WebGLShader shader) { |
| 15 _ptr.attachShader(_unwrap(program), _unwrap(shader)); |
| 16 return; |
| 17 } |
| 18 |
| 19 void bindAttribLocation(WebGLProgram program, int index, String name) { |
| 20 _ptr.bindAttribLocation(_unwrap(program), _unwrap(index), _unwrap(name)); |
| 21 return; |
| 22 } |
| 23 |
| 24 void bindBuffer(int target, WebGLBuffer buffer) { |
| 25 _ptr.bindBuffer(_unwrap(target), _unwrap(buffer)); |
| 26 return; |
| 27 } |
| 28 |
| 29 void bindFramebuffer(int target, WebGLFramebuffer framebuffer) { |
| 30 _ptr.bindFramebuffer(_unwrap(target), _unwrap(framebuffer)); |
| 31 return; |
| 32 } |
| 33 |
| 34 void bindRenderbuffer(int target, WebGLRenderbuffer renderbuffer) { |
| 35 _ptr.bindRenderbuffer(_unwrap(target), _unwrap(renderbuffer)); |
| 36 return; |
| 37 } |
| 38 |
| 39 void bindTexture(int target, WebGLTexture texture) { |
| 40 _ptr.bindTexture(_unwrap(target), _unwrap(texture)); |
| 41 return; |
| 42 } |
| 43 |
| 44 void blendColor(num red, num green, num blue, num alpha) { |
| 45 _ptr.blendColor(_unwrap(red), _unwrap(green), _unwrap(blue), _unwrap(alpha))
; |
| 46 return; |
| 47 } |
| 48 |
| 49 void blendEquation(int mode) { |
| 50 _ptr.blendEquation(_unwrap(mode)); |
| 51 return; |
| 52 } |
| 53 |
| 54 void blendEquationSeparate(int modeRGB, int modeAlpha) { |
| 55 _ptr.blendEquationSeparate(_unwrap(modeRGB), _unwrap(modeAlpha)); |
| 56 return; |
| 57 } |
| 58 |
| 59 void blendFunc(int sfactor, int dfactor) { |
| 60 _ptr.blendFunc(_unwrap(sfactor), _unwrap(dfactor)); |
| 61 return; |
| 62 } |
| 63 |
| 64 void blendFuncSeparate(int srcRGB, int dstRGB, int srcAlpha, int dstAlpha) { |
| 65 _ptr.blendFuncSeparate(_unwrap(srcRGB), _unwrap(dstRGB), _unwrap(srcAlpha),
_unwrap(dstAlpha)); |
| 66 return; |
| 67 } |
| 68 |
| 69 void bufferData(int target, var data_OR_size, int usage) { |
| 70 if (data_OR_size is ArrayBuffer) { |
| 71 _ptr.bufferData(_unwrap(target), _unwrap(data_OR_size), _unwrap(usage)); |
| 72 return; |
| 73 } else { |
| 74 if (data_OR_size is ArrayBufferView) { |
| 75 _ptr.bufferData(_unwrap(target), _unwrap(data_OR_size), _unwrap(usage)); |
| 76 return; |
| 77 } else { |
| 78 if (data_OR_size is int) { |
| 79 _ptr.bufferData(_unwrap(target), _unwrap(data_OR_size), _unwrap(usage)
); |
| 80 return; |
| 81 } |
| 82 } |
| 83 } |
| 84 throw "Incorrect number or type of arguments"; |
| 85 } |
| 86 |
| 87 void bufferSubData(int target, int offset, var data) { |
| 88 if (data is ArrayBuffer) { |
| 89 _ptr.bufferSubData(_unwrap(target), _unwrap(offset), _unwrap(data)); |
| 90 return; |
| 91 } else { |
| 92 if (data is ArrayBufferView) { |
| 93 _ptr.bufferSubData(_unwrap(target), _unwrap(offset), _unwrap(data)); |
| 94 return; |
| 95 } |
| 96 } |
| 97 throw "Incorrect number or type of arguments"; |
| 98 } |
| 99 |
| 100 int checkFramebufferStatus(int target) { |
| 101 return _wrap(_ptr.checkFramebufferStatus(_unwrap(target))); |
| 102 } |
| 103 |
| 104 void clear(int mask) { |
| 105 _ptr.clear(_unwrap(mask)); |
| 106 return; |
| 107 } |
| 108 |
| 109 void clearColor(num red, num green, num blue, num alpha) { |
| 110 _ptr.clearColor(_unwrap(red), _unwrap(green), _unwrap(blue), _unwrap(alpha))
; |
| 111 return; |
| 112 } |
| 113 |
| 114 void clearDepth(num depth) { |
| 115 _ptr.clearDepth(_unwrap(depth)); |
| 116 return; |
| 117 } |
| 118 |
| 119 void clearStencil(int s) { |
| 120 _ptr.clearStencil(_unwrap(s)); |
| 121 return; |
| 122 } |
| 123 |
| 124 void colorMask(bool red, bool green, bool blue, bool alpha) { |
| 125 _ptr.colorMask(_unwrap(red), _unwrap(green), _unwrap(blue), _unwrap(alpha)); |
| 126 return; |
| 127 } |
| 128 |
| 129 void compileShader(WebGLShader shader) { |
| 130 _ptr.compileShader(_unwrap(shader)); |
| 131 return; |
| 132 } |
| 133 |
| 134 void compressedTexImage2D(int target, int level, int internalformat, int width
, int height, int border, ArrayBufferView data) { |
| 135 _ptr.compressedTexImage2D(_unwrap(target), _unwrap(level), _unwrap(internalf
ormat), _unwrap(width), _unwrap(height), _unwrap(border), _unwrap(data)); |
| 136 return; |
| 137 } |
| 138 |
| 139 void compressedTexSubImage2D(int target, int level, int xoffset, int yoffset,
int width, int height, int format, ArrayBufferView data) { |
| 140 _ptr.compressedTexSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoffse
t), _unwrap(yoffset), _unwrap(width), _unwrap(height), _unwrap(format), _unwrap(
data)); |
| 141 return; |
| 142 } |
| 143 |
| 144 void copyTexImage2D(int target, int level, int internalformat, int x, int y, i
nt width, int height, int border) { |
| 145 _ptr.copyTexImage2D(_unwrap(target), _unwrap(level), _unwrap(internalformat)
, _unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height), _unwrap(border)); |
| 146 return; |
| 147 } |
| 148 |
| 149 void copyTexSubImage2D(int target, int level, int xoffset, int yoffset, int x,
int y, int width, int height) { |
| 150 _ptr.copyTexSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoffset), _u
nwrap(yoffset), _unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 151 return; |
| 152 } |
| 153 |
| 154 WebGLBuffer createBuffer() { |
| 155 return _wrap(_ptr.createBuffer()); |
| 156 } |
| 157 |
| 158 WebGLFramebuffer createFramebuffer() { |
| 159 return _wrap(_ptr.createFramebuffer()); |
| 160 } |
| 161 |
| 162 WebGLProgram createProgram() { |
| 163 return _wrap(_ptr.createProgram()); |
| 164 } |
| 165 |
| 166 WebGLRenderbuffer createRenderbuffer() { |
| 167 return _wrap(_ptr.createRenderbuffer()); |
| 168 } |
| 169 |
| 170 WebGLShader createShader(int type) { |
| 171 return _wrap(_ptr.createShader(_unwrap(type))); |
| 172 } |
| 173 |
| 174 WebGLTexture createTexture() { |
| 175 return _wrap(_ptr.createTexture()); |
| 176 } |
| 177 |
| 178 void cullFace(int mode) { |
| 179 _ptr.cullFace(_unwrap(mode)); |
| 180 return; |
| 181 } |
| 182 |
| 183 void deleteBuffer(WebGLBuffer buffer) { |
| 184 _ptr.deleteBuffer(_unwrap(buffer)); |
| 185 return; |
| 186 } |
| 187 |
| 188 void deleteFramebuffer(WebGLFramebuffer framebuffer) { |
| 189 _ptr.deleteFramebuffer(_unwrap(framebuffer)); |
| 190 return; |
| 191 } |
| 192 |
| 193 void deleteProgram(WebGLProgram program) { |
| 194 _ptr.deleteProgram(_unwrap(program)); |
| 195 return; |
| 196 } |
| 197 |
| 198 void deleteRenderbuffer(WebGLRenderbuffer renderbuffer) { |
| 199 _ptr.deleteRenderbuffer(_unwrap(renderbuffer)); |
| 200 return; |
| 201 } |
| 202 |
| 203 void deleteShader(WebGLShader shader) { |
| 204 _ptr.deleteShader(_unwrap(shader)); |
| 205 return; |
| 206 } |
| 207 |
| 208 void deleteTexture(WebGLTexture texture) { |
| 209 _ptr.deleteTexture(_unwrap(texture)); |
| 210 return; |
| 211 } |
| 212 |
| 213 void depthFunc(int func) { |
| 214 _ptr.depthFunc(_unwrap(func)); |
| 215 return; |
| 216 } |
| 217 |
| 218 void depthMask(bool flag) { |
| 219 _ptr.depthMask(_unwrap(flag)); |
| 220 return; |
| 221 } |
| 222 |
| 223 void depthRange(num zNear, num zFar) { |
| 224 _ptr.depthRange(_unwrap(zNear), _unwrap(zFar)); |
| 225 return; |
| 226 } |
| 227 |
| 228 void detachShader(WebGLProgram program, WebGLShader shader) { |
| 229 _ptr.detachShader(_unwrap(program), _unwrap(shader)); |
| 230 return; |
| 231 } |
| 232 |
| 233 void disable(int cap) { |
| 234 _ptr.disable(_unwrap(cap)); |
| 235 return; |
| 236 } |
| 237 |
| 238 void disableVertexAttribArray(int index) { |
| 239 _ptr.disableVertexAttribArray(_unwrap(index)); |
| 240 return; |
| 241 } |
| 242 |
| 243 void drawArrays(int mode, int first, int count) { |
| 244 _ptr.drawArrays(_unwrap(mode), _unwrap(first), _unwrap(count)); |
| 245 return; |
| 246 } |
| 247 |
| 248 void drawElements(int mode, int count, int type, int offset) { |
| 249 _ptr.drawElements(_unwrap(mode), _unwrap(count), _unwrap(type), _unwrap(offs
et)); |
| 250 return; |
| 251 } |
| 252 |
| 253 void enable(int cap) { |
| 254 _ptr.enable(_unwrap(cap)); |
| 255 return; |
| 256 } |
| 257 |
| 258 void enableVertexAttribArray(int index) { |
| 259 _ptr.enableVertexAttribArray(_unwrap(index)); |
| 260 return; |
| 261 } |
| 262 |
| 263 void finish() { |
| 264 _ptr.finish(); |
| 265 return; |
| 266 } |
| 267 |
| 268 void flush() { |
| 269 _ptr.flush(); |
| 270 return; |
| 271 } |
| 272 |
| 273 void framebufferRenderbuffer(int target, int attachment, int renderbuffertarge
t, WebGLRenderbuffer renderbuffer) { |
| 274 _ptr.framebufferRenderbuffer(_unwrap(target), _unwrap(attachment), _unwrap(r
enderbuffertarget), _unwrap(renderbuffer)); |
| 275 return; |
| 276 } |
| 277 |
| 278 void framebufferTexture2D(int target, int attachment, int textarget, WebGLText
ure texture, int level) { |
| 279 _ptr.framebufferTexture2D(_unwrap(target), _unwrap(attachment), _unwrap(text
arget), _unwrap(texture), _unwrap(level)); |
| 280 return; |
| 281 } |
| 282 |
| 283 void frontFace(int mode) { |
| 284 _ptr.frontFace(_unwrap(mode)); |
| 285 return; |
| 286 } |
| 287 |
| 288 void generateMipmap(int target) { |
| 289 _ptr.generateMipmap(_unwrap(target)); |
| 290 return; |
| 291 } |
| 292 |
| 293 WebGLActiveInfo getActiveAttrib(WebGLProgram program, int index) { |
| 294 return _wrap(_ptr.getActiveAttrib(_unwrap(program), _unwrap(index))); |
| 295 } |
| 296 |
| 297 WebGLActiveInfo getActiveUniform(WebGLProgram program, int index) { |
| 298 return _wrap(_ptr.getActiveUniform(_unwrap(program), _unwrap(index))); |
| 299 } |
| 300 |
| 301 List getAttachedShaders(WebGLProgram program) { |
| 302 return _wrap(_ptr.getAttachedShaders(_unwrap(program))); |
| 303 } |
| 304 |
| 305 int getAttribLocation(WebGLProgram program, String name) { |
| 306 return _wrap(_ptr.getAttribLocation(_unwrap(program), _unwrap(name))); |
| 307 } |
| 308 |
| 309 Object getBufferParameter(int target, int pname) { |
| 310 return _wrap(_ptr.getBufferParameter(_unwrap(target), _unwrap(pname))); |
| 311 } |
| 312 |
| 313 WebGLContextAttributes getContextAttributes() { |
| 314 return _wrap(_ptr.getContextAttributes()); |
| 315 } |
| 316 |
| 317 int getError() { |
| 318 return _wrap(_ptr.getError()); |
| 319 } |
| 320 |
| 321 Object getExtension(String name) { |
| 322 return _wrap(_ptr.getExtension(_unwrap(name))); |
| 323 } |
| 324 |
| 325 Object getFramebufferAttachmentParameter(int target, int attachment, int pname
) { |
| 326 return _wrap(_ptr.getFramebufferAttachmentParameter(_unwrap(target), _unwrap
(attachment), _unwrap(pname))); |
| 327 } |
| 328 |
| 329 Object getParameter(int pname) { |
| 330 return _wrap(_ptr.getParameter(_unwrap(pname))); |
| 331 } |
| 332 |
| 333 String getProgramInfoLog(WebGLProgram program) { |
| 334 return _wrap(_ptr.getProgramInfoLog(_unwrap(program))); |
| 335 } |
| 336 |
| 337 Object getProgramParameter(WebGLProgram program, int pname) { |
| 338 return _wrap(_ptr.getProgramParameter(_unwrap(program), _unwrap(pname))); |
| 339 } |
| 340 |
| 341 Object getRenderbufferParameter(int target, int pname) { |
| 342 return _wrap(_ptr.getRenderbufferParameter(_unwrap(target), _unwrap(pname)))
; |
| 343 } |
| 344 |
| 345 String getShaderInfoLog(WebGLShader shader) { |
| 346 return _wrap(_ptr.getShaderInfoLog(_unwrap(shader))); |
| 347 } |
| 348 |
| 349 Object getShaderParameter(WebGLShader shader, int pname) { |
| 350 return _wrap(_ptr.getShaderParameter(_unwrap(shader), _unwrap(pname))); |
| 351 } |
| 352 |
| 353 String getShaderSource(WebGLShader shader) { |
| 354 return _wrap(_ptr.getShaderSource(_unwrap(shader))); |
| 355 } |
| 356 |
| 357 Object getTexParameter(int target, int pname) { |
| 358 return _wrap(_ptr.getTexParameter(_unwrap(target), _unwrap(pname))); |
| 359 } |
| 360 |
| 361 Object getUniform(WebGLProgram program, WebGLUniformLocation location) { |
| 362 return _wrap(_ptr.getUniform(_unwrap(program), _unwrap(location))); |
| 363 } |
| 364 |
| 365 WebGLUniformLocation getUniformLocation(WebGLProgram program, String name) { |
| 366 return _wrap(_ptr.getUniformLocation(_unwrap(program), _unwrap(name))); |
| 367 } |
| 368 |
| 369 Object getVertexAttrib(int index, int pname) { |
| 370 return _wrap(_ptr.getVertexAttrib(_unwrap(index), _unwrap(pname))); |
| 371 } |
| 372 |
| 373 int getVertexAttribOffset(int index, int pname) { |
| 374 return _wrap(_ptr.getVertexAttribOffset(_unwrap(index), _unwrap(pname))); |
| 375 } |
| 376 |
| 377 void hint(int target, int mode) { |
| 378 _ptr.hint(_unwrap(target), _unwrap(mode)); |
| 379 return; |
| 380 } |
| 381 |
| 382 bool isBuffer(WebGLBuffer buffer) { |
| 383 return _wrap(_ptr.isBuffer(_unwrap(buffer))); |
| 384 } |
| 385 |
| 386 bool isContextLost() { |
| 387 return _wrap(_ptr.isContextLost()); |
| 388 } |
| 389 |
| 390 bool isEnabled(int cap) { |
| 391 return _wrap(_ptr.isEnabled(_unwrap(cap))); |
| 392 } |
| 393 |
| 394 bool isFramebuffer(WebGLFramebuffer framebuffer) { |
| 395 return _wrap(_ptr.isFramebuffer(_unwrap(framebuffer))); |
| 396 } |
| 397 |
| 398 bool isProgram(WebGLProgram program) { |
| 399 return _wrap(_ptr.isProgram(_unwrap(program))); |
| 400 } |
| 401 |
| 402 bool isRenderbuffer(WebGLRenderbuffer renderbuffer) { |
| 403 return _wrap(_ptr.isRenderbuffer(_unwrap(renderbuffer))); |
| 404 } |
| 405 |
| 406 bool isShader(WebGLShader shader) { |
| 407 return _wrap(_ptr.isShader(_unwrap(shader))); |
| 408 } |
| 409 |
| 410 bool isTexture(WebGLTexture texture) { |
| 411 return _wrap(_ptr.isTexture(_unwrap(texture))); |
| 412 } |
| 413 |
| 414 void lineWidth(num width) { |
| 415 _ptr.lineWidth(_unwrap(width)); |
| 416 return; |
| 417 } |
| 418 |
| 419 void linkProgram(WebGLProgram program) { |
| 420 _ptr.linkProgram(_unwrap(program)); |
| 421 return; |
| 422 } |
| 423 |
| 424 void pixelStorei(int pname, int param) { |
| 425 _ptr.pixelStorei(_unwrap(pname), _unwrap(param)); |
| 426 return; |
| 427 } |
| 428 |
| 429 void polygonOffset(num factor, num units) { |
| 430 _ptr.polygonOffset(_unwrap(factor), _unwrap(units)); |
| 431 return; |
| 432 } |
| 433 |
| 434 void readPixels(int x, int y, int width, int height, int format, int type, Arr
ayBufferView pixels) { |
| 435 _ptr.readPixels(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height), _un
wrap(format), _unwrap(type), _unwrap(pixels)); |
| 436 return; |
| 437 } |
| 438 |
| 439 void releaseShaderCompiler() { |
| 440 _ptr.releaseShaderCompiler(); |
| 441 return; |
| 442 } |
| 443 |
| 444 void renderbufferStorage(int target, int internalformat, int width, int height
) { |
| 445 _ptr.renderbufferStorage(_unwrap(target), _unwrap(internalformat), _unwrap(w
idth), _unwrap(height)); |
| 446 return; |
| 447 } |
| 448 |
| 449 void sampleCoverage(num value, bool invert) { |
| 450 _ptr.sampleCoverage(_unwrap(value), _unwrap(invert)); |
| 451 return; |
| 452 } |
| 453 |
| 454 void scissor(int x, int y, int width, int height) { |
| 455 _ptr.scissor(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 456 return; |
| 457 } |
| 458 |
| 459 void shaderSource(WebGLShader shader, String string) { |
| 460 _ptr.shaderSource(_unwrap(shader), _unwrap(string)); |
| 461 return; |
| 462 } |
| 463 |
| 464 void stencilFunc(int func, int ref, int mask) { |
| 465 _ptr.stencilFunc(_unwrap(func), _unwrap(ref), _unwrap(mask)); |
| 466 return; |
| 467 } |
| 468 |
| 469 void stencilFuncSeparate(int face, int func, int ref, int mask) { |
| 470 _ptr.stencilFuncSeparate(_unwrap(face), _unwrap(func), _unwrap(ref), _unwrap
(mask)); |
| 471 return; |
| 472 } |
| 473 |
| 474 void stencilMask(int mask) { |
| 475 _ptr.stencilMask(_unwrap(mask)); |
| 476 return; |
| 477 } |
| 478 |
| 479 void stencilMaskSeparate(int face, int mask) { |
| 480 _ptr.stencilMaskSeparate(_unwrap(face), _unwrap(mask)); |
| 481 return; |
| 482 } |
| 483 |
| 484 void stencilOp(int fail, int zfail, int zpass) { |
| 485 _ptr.stencilOp(_unwrap(fail), _unwrap(zfail), _unwrap(zpass)); |
| 486 return; |
| 487 } |
| 488 |
| 489 void stencilOpSeparate(int face, int fail, int zfail, int zpass) { |
| 490 _ptr.stencilOpSeparate(_unwrap(face), _unwrap(fail), _unwrap(zfail), _unwrap
(zpass)); |
| 491 return; |
| 492 } |
| 493 |
| 494 void texImage2D(int target, int level, int internalformat, int format_OR_width
, int height_OR_type, var border_OR_canvas_OR_image_OR_pixels_OR_video, [int for
mat = null, int type = null, ArrayBufferView pixels = null]) { |
| 495 if (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageData) { |
| 496 if (format === null) { |
| 497 if (type === null) { |
| 498 if (pixels === null) { |
| 499 _ptr.texImage2D(_unwrap(target), _unwrap(level), _unwrap(internalfor
mat), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(border_OR_canva
s_OR_image_OR_pixels_OR_video)); |
| 500 return; |
| 501 } |
| 502 } |
| 503 } |
| 504 } else { |
| 505 if (border_OR_canvas_OR_image_OR_pixels_OR_video is ImageElement) { |
| 506 if (format === null) { |
| 507 if (type === null) { |
| 508 if (pixels === null) { |
| 509 _ptr.texImage2D(_unwrap(target), _unwrap(level), _unwrap(internalf
ormat), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(border_OR_can
vas_OR_image_OR_pixels_OR_video)); |
| 510 return; |
| 511 } |
| 512 } |
| 513 } |
| 514 } else { |
| 515 if (border_OR_canvas_OR_image_OR_pixels_OR_video is CanvasElement) { |
| 516 if (format === null) { |
| 517 if (type === null) { |
| 518 if (pixels === null) { |
| 519 _ptr.texImage2D(_unwrap(target), _unwrap(level), _unwrap(interna
lformat), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(border_OR_c
anvas_OR_image_OR_pixels_OR_video)); |
| 520 return; |
| 521 } |
| 522 } |
| 523 } |
| 524 } else { |
| 525 if (border_OR_canvas_OR_image_OR_pixels_OR_video is VideoElement) { |
| 526 if (format === null) { |
| 527 if (type === null) { |
| 528 if (pixels === null) { |
| 529 _ptr.texImage2D(_unwrap(target), _unwrap(level), _unwrap(inter
nalformat), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(border_OR
_canvas_OR_image_OR_pixels_OR_video)); |
| 530 return; |
| 531 } |
| 532 } |
| 533 } |
| 534 } else { |
| 535 if (border_OR_canvas_OR_image_OR_pixels_OR_video is int) { |
| 536 _ptr.texImage2D(_unwrap(target), _unwrap(level), _unwrap(internalf
ormat), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(border_OR_can
vas_OR_image_OR_pixels_OR_video), _unwrap(format), _unwrap(type), _unwrap(pixels
)); |
| 537 return; |
| 538 } |
| 539 } |
| 540 } |
| 541 } |
| 542 } |
| 543 throw "Incorrect number or type of arguments"; |
| 544 } |
| 545 |
| 546 void texParameterf(int target, int pname, num param) { |
| 547 _ptr.texParameterf(_unwrap(target), _unwrap(pname), _unwrap(param)); |
| 548 return; |
| 549 } |
| 550 |
| 551 void texParameteri(int target, int pname, int param) { |
| 552 _ptr.texParameteri(_unwrap(target), _unwrap(pname), _unwrap(param)); |
| 553 return; |
| 554 } |
| 555 |
| 556 void texSubImage2D(int target, int level, int xoffset, int yoffset, int format
_OR_width, int height_OR_type, var canvas_OR_format_OR_image_OR_pixels_OR_video,
[int type = null, ArrayBufferView pixels = null]) { |
| 557 if (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageData) { |
| 558 if (type === null) { |
| 559 if (pixels === null) { |
| 560 _ptr.texSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoffset),
_unwrap(yoffset), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(can
vas_OR_format_OR_image_OR_pixels_OR_video)); |
| 561 return; |
| 562 } |
| 563 } |
| 564 } else { |
| 565 if (canvas_OR_format_OR_image_OR_pixels_OR_video is ImageElement) { |
| 566 if (type === null) { |
| 567 if (pixels === null) { |
| 568 _ptr.texSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoffset)
, _unwrap(yoffset), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap(c
anvas_OR_format_OR_image_OR_pixels_OR_video)); |
| 569 return; |
| 570 } |
| 571 } |
| 572 } else { |
| 573 if (canvas_OR_format_OR_image_OR_pixels_OR_video is CanvasElement) { |
| 574 if (type === null) { |
| 575 if (pixels === null) { |
| 576 _ptr.texSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoffse
t), _unwrap(yoffset), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap
(canvas_OR_format_OR_image_OR_pixels_OR_video)); |
| 577 return; |
| 578 } |
| 579 } |
| 580 } else { |
| 581 if (canvas_OR_format_OR_image_OR_pixels_OR_video is VideoElement) { |
| 582 if (type === null) { |
| 583 if (pixels === null) { |
| 584 _ptr.texSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoff
set), _unwrap(yoffset), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwr
ap(canvas_OR_format_OR_image_OR_pixels_OR_video)); |
| 585 return; |
| 586 } |
| 587 } |
| 588 } else { |
| 589 if (canvas_OR_format_OR_image_OR_pixels_OR_video is int) { |
| 590 _ptr.texSubImage2D(_unwrap(target), _unwrap(level), _unwrap(xoffse
t), _unwrap(yoffset), _unwrap(format_OR_width), _unwrap(height_OR_type), _unwrap
(canvas_OR_format_OR_image_OR_pixels_OR_video), _unwrap(type), _unwrap(pixels)); |
| 591 return; |
| 592 } |
| 593 } |
| 594 } |
| 595 } |
| 596 } |
| 597 throw "Incorrect number or type of arguments"; |
| 598 } |
| 599 |
| 600 void uniform1f(WebGLUniformLocation location, num x) { |
| 601 _ptr.uniform1f(_unwrap(location), _unwrap(x)); |
| 602 return; |
| 603 } |
| 604 |
| 605 void uniform1fv(WebGLUniformLocation location, Float32Array v) { |
| 606 _ptr.uniform1fv(_unwrap(location), _unwrap(v)); |
| 607 return; |
| 608 } |
| 609 |
| 610 void uniform1i(WebGLUniformLocation location, int x) { |
| 611 _ptr.uniform1i(_unwrap(location), _unwrap(x)); |
| 612 return; |
| 613 } |
| 614 |
| 615 void uniform1iv(WebGLUniformLocation location, Int32Array v) { |
| 616 _ptr.uniform1iv(_unwrap(location), _unwrap(v)); |
| 617 return; |
| 618 } |
| 619 |
| 620 void uniform2f(WebGLUniformLocation location, num x, num y) { |
| 621 _ptr.uniform2f(_unwrap(location), _unwrap(x), _unwrap(y)); |
| 622 return; |
| 623 } |
| 624 |
| 625 void uniform2fv(WebGLUniformLocation location, Float32Array v) { |
| 626 _ptr.uniform2fv(_unwrap(location), _unwrap(v)); |
| 627 return; |
| 628 } |
| 629 |
| 630 void uniform2i(WebGLUniformLocation location, int x, int y) { |
| 631 _ptr.uniform2i(_unwrap(location), _unwrap(x), _unwrap(y)); |
| 632 return; |
| 633 } |
| 634 |
| 635 void uniform2iv(WebGLUniformLocation location, Int32Array v) { |
| 636 _ptr.uniform2iv(_unwrap(location), _unwrap(v)); |
| 637 return; |
| 638 } |
| 639 |
| 640 void uniform3f(WebGLUniformLocation location, num x, num y, num z) { |
| 641 _ptr.uniform3f(_unwrap(location), _unwrap(x), _unwrap(y), _unwrap(z)); |
| 642 return; |
| 643 } |
| 644 |
| 645 void uniform3fv(WebGLUniformLocation location, Float32Array v) { |
| 646 _ptr.uniform3fv(_unwrap(location), _unwrap(v)); |
| 647 return; |
| 648 } |
| 649 |
| 650 void uniform3i(WebGLUniformLocation location, int x, int y, int z) { |
| 651 _ptr.uniform3i(_unwrap(location), _unwrap(x), _unwrap(y), _unwrap(z)); |
| 652 return; |
| 653 } |
| 654 |
| 655 void uniform3iv(WebGLUniformLocation location, Int32Array v) { |
| 656 _ptr.uniform3iv(_unwrap(location), _unwrap(v)); |
| 657 return; |
| 658 } |
| 659 |
| 660 void uniform4f(WebGLUniformLocation location, num x, num y, num z, num w) { |
| 661 _ptr.uniform4f(_unwrap(location), _unwrap(x), _unwrap(y), _unwrap(z), _unwra
p(w)); |
| 662 return; |
| 663 } |
| 664 |
| 665 void uniform4fv(WebGLUniformLocation location, Float32Array v) { |
| 666 _ptr.uniform4fv(_unwrap(location), _unwrap(v)); |
| 667 return; |
| 668 } |
| 669 |
| 670 void uniform4i(WebGLUniformLocation location, int x, int y, int z, int w) { |
| 671 _ptr.uniform4i(_unwrap(location), _unwrap(x), _unwrap(y), _unwrap(z), _unwra
p(w)); |
| 672 return; |
| 673 } |
| 674 |
| 675 void uniform4iv(WebGLUniformLocation location, Int32Array v) { |
| 676 _ptr.uniform4iv(_unwrap(location), _unwrap(v)); |
| 677 return; |
| 678 } |
| 679 |
| 680 void uniformMatrix2fv(WebGLUniformLocation location, bool transpose, Float32Ar
ray array) { |
| 681 _ptr.uniformMatrix2fv(_unwrap(location), _unwrap(transpose), _unwrap(array))
; |
| 682 return; |
| 683 } |
| 684 |
| 685 void uniformMatrix3fv(WebGLUniformLocation location, bool transpose, Float32Ar
ray array) { |
| 686 _ptr.uniformMatrix3fv(_unwrap(location), _unwrap(transpose), _unwrap(array))
; |
| 687 return; |
| 688 } |
| 689 |
| 690 void uniformMatrix4fv(WebGLUniformLocation location, bool transpose, Float32Ar
ray array) { |
| 691 _ptr.uniformMatrix4fv(_unwrap(location), _unwrap(transpose), _unwrap(array))
; |
| 692 return; |
| 693 } |
| 694 |
| 695 void useProgram(WebGLProgram program) { |
| 696 _ptr.useProgram(_unwrap(program)); |
| 697 return; |
| 698 } |
| 699 |
| 700 void validateProgram(WebGLProgram program) { |
| 701 _ptr.validateProgram(_unwrap(program)); |
| 702 return; |
| 703 } |
| 704 |
| 705 void vertexAttrib1f(int indx, num x) { |
| 706 _ptr.vertexAttrib1f(_unwrap(indx), _unwrap(x)); |
| 707 return; |
| 708 } |
| 709 |
| 710 void vertexAttrib1fv(int indx, Float32Array values) { |
| 711 _ptr.vertexAttrib1fv(_unwrap(indx), _unwrap(values)); |
| 712 return; |
| 713 } |
| 714 |
| 715 void vertexAttrib2f(int indx, num x, num y) { |
| 716 _ptr.vertexAttrib2f(_unwrap(indx), _unwrap(x), _unwrap(y)); |
| 717 return; |
| 718 } |
| 719 |
| 720 void vertexAttrib2fv(int indx, Float32Array values) { |
| 721 _ptr.vertexAttrib2fv(_unwrap(indx), _unwrap(values)); |
| 722 return; |
| 723 } |
| 724 |
| 725 void vertexAttrib3f(int indx, num x, num y, num z) { |
| 726 _ptr.vertexAttrib3f(_unwrap(indx), _unwrap(x), _unwrap(y), _unwrap(z)); |
| 727 return; |
| 728 } |
| 729 |
| 730 void vertexAttrib3fv(int indx, Float32Array values) { |
| 731 _ptr.vertexAttrib3fv(_unwrap(indx), _unwrap(values)); |
| 732 return; |
| 733 } |
| 734 |
| 735 void vertexAttrib4f(int indx, num x, num y, num z, num w) { |
| 736 _ptr.vertexAttrib4f(_unwrap(indx), _unwrap(x), _unwrap(y), _unwrap(z), _unwr
ap(w)); |
| 737 return; |
| 738 } |
| 739 |
| 740 void vertexAttrib4fv(int indx, Float32Array values) { |
| 741 _ptr.vertexAttrib4fv(_unwrap(indx), _unwrap(values)); |
| 742 return; |
| 743 } |
| 744 |
| 745 void vertexAttribPointer(int indx, int size, int type, bool normalized, int st
ride, int offset) { |
| 746 _ptr.vertexAttribPointer(_unwrap(indx), _unwrap(size), _unwrap(type), _unwra
p(normalized), _unwrap(stride), _unwrap(offset)); |
| 747 return; |
| 748 } |
| 749 |
| 750 void viewport(int x, int y, int width, int height) { |
| 751 _ptr.viewport(_unwrap(x), _unwrap(y), _unwrap(width), _unwrap(height)); |
| 752 return; |
| 753 } |
| 754 } |
OLD | NEW |