work.c (19163B)
1 // Copyright 2015 The Go Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style 3 // license that can be found in the LICENSE file. 4 5 // +build darwin linux openbsd 6 7 #include <stdlib.h> 8 #include "_cgo_export.h" 9 #include "work.h" 10 11 #if defined(GL_ES_VERSION_3_0) && GL_ES_VERSION_3_0 12 #else 13 #include <stdio.h> 14 static void gles3missing() { 15 printf("GLES3 function is missing\n"); 16 exit(2); 17 } 18 static void glUniformMatrix2x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { gles3missing(); } 19 static void glUniformMatrix3x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { gles3missing(); } 20 static void glUniformMatrix2x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { gles3missing(); } 21 static void glUniformMatrix4x2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { gles3missing(); } 22 static void glUniformMatrix3x4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { gles3missing(); } 23 static void glUniformMatrix4x3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) { gles3missing(); } 24 static void glBlitFramebuffer(GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter) { gles3missing(); } 25 static void glUniform1ui(GLint location, GLuint v0) { gles3missing(); } 26 static void glUniform2ui(GLint location, GLuint v0, GLuint v1) { gles3missing(); } 27 static void glUniform3ui(GLint location, GLuint v0, GLuint v1, GLuint v2) { gles3missing(); } 28 static void glUniform4ui(GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3) { gles3missing(); } 29 static void glUniform1uiv(GLint location, GLsizei count, const GLuint *value) { gles3missing(); } 30 static void glUniform2uiv(GLint location, GLsizei count, const GLuint *value) { gles3missing(); } 31 static void glUniform3uiv(GLint location, GLsizei count, const GLuint *value) { gles3missing(); } 32 static void glUniform4uiv(GLint location, GLsizei count, const GLuint *value) { gles3missing(); } 33 static void glBindVertexArray(GLuint array) { gles3missing(); } 34 static void glGenVertexArrays(GLsizei n, GLuint *arrays) { gles3missing(); } 35 static void glDeleteVertexArrays(GLsizei n, const GLuint *arrays) { gles3missing(); } 36 #endif 37 38 uintptr_t processFn(struct fnargs* args, char* parg) { 39 uintptr_t ret = 0; 40 switch (args->fn) { 41 case glfnUNDEFINED: 42 abort(); // bad glfn 43 break; 44 case glfnActiveTexture: 45 glActiveTexture((GLenum)args->a0); 46 break; 47 case glfnAttachShader: 48 glAttachShader((GLint)args->a0, (GLint)args->a1); 49 break; 50 case glfnBindAttribLocation: 51 glBindAttribLocation((GLint)args->a0, (GLint)args->a1, (GLchar*)args->a2); 52 break; 53 case glfnBindBuffer: 54 glBindBuffer((GLenum)args->a0, (GLuint)args->a1); 55 break; 56 case glfnBindFramebuffer: 57 glBindFramebuffer((GLenum)args->a0, (GLint)args->a1); 58 break; 59 case glfnBindRenderbuffer: 60 glBindRenderbuffer((GLenum)args->a0, (GLint)args->a1); 61 break; 62 case glfnBindTexture: 63 glBindTexture((GLenum)args->a0, (GLint)args->a1); 64 break; 65 case glfnBindVertexArray: 66 glBindVertexArray((GLenum)args->a0); 67 break; 68 case glfnBlendColor: 69 glBlendColor(*(GLfloat*)&args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2, *(GLfloat*)&args->a3); 70 break; 71 case glfnBlendEquation: 72 glBlendEquation((GLenum)args->a0); 73 break; 74 case glfnBlendEquationSeparate: 75 glBlendEquationSeparate((GLenum)args->a0, (GLenum)args->a1); 76 break; 77 case glfnBlendFunc: 78 glBlendFunc((GLenum)args->a0, (GLenum)args->a1); 79 break; 80 case glfnBlendFuncSeparate: 81 glBlendFuncSeparate((GLenum)args->a0, (GLenum)args->a1, (GLenum)args->a2, (GLenum)args->a3); 82 break; 83 case glfnBlitFramebuffer: 84 glBlitFramebuffer((GLint)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3, (GLint)args->a4, (GLint)args->a5, (GLint)args->a6, (GLint)args->a7, (GLbitfield)args->a8, (GLenum)args->a9); 85 break; 86 case glfnBufferData: 87 glBufferData((GLenum)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg, (GLenum)args->a2); 88 break; 89 case glfnBufferSubData: 90 glBufferSubData((GLenum)args->a0, (GLint)args->a1, (GLsizeiptr)args->a2, (GLvoid*)parg); 91 break; 92 case glfnCheckFramebufferStatus: 93 ret = glCheckFramebufferStatus((GLenum)args->a0); 94 break; 95 case glfnClear: 96 glClear((GLenum)args->a0); 97 break; 98 case glfnClearColor: 99 glClearColor(*(GLfloat*)&args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2, *(GLfloat*)&args->a3); 100 break; 101 case glfnClearDepthf: 102 glClearDepthf(*(GLfloat*)&args->a0); 103 break; 104 case glfnClearStencil: 105 glClearStencil((GLint)args->a0); 106 break; 107 case glfnColorMask: 108 glColorMask((GLboolean)args->a0, (GLboolean)args->a1, (GLboolean)args->a2, (GLboolean)args->a3); 109 break; 110 case glfnCompileShader: 111 glCompileShader((GLint)args->a0); 112 break; 113 case glfnCompressedTexImage2D: 114 glCompressedTexImage2D((GLenum)args->a0, (GLint)args->a1, (GLenum)args->a2, (GLint)args->a3, (GLint)args->a4, (GLint)args->a5, (GLsizeiptr)args->a6, (GLvoid*)parg); 115 break; 116 case glfnCompressedTexSubImage2D: 117 glCompressedTexSubImage2D((GLenum)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3, (GLint)args->a4, (GLint)args->a5, (GLenum)args->a6, (GLsizeiptr)args->a7, (GLvoid*)parg); 118 break; 119 case glfnCopyTexImage2D: 120 glCopyTexImage2D((GLenum)args->a0, (GLint)args->a1, (GLenum)args->a2, (GLint)args->a3, (GLint)args->a4, (GLint)args->a5, (GLint)args->a6, (GLint)args->a7); 121 break; 122 case glfnCopyTexSubImage2D: 123 glCopyTexSubImage2D((GLenum)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3, (GLint)args->a4, (GLint)args->a5, (GLint)args->a6, (GLint)args->a7); 124 break; 125 case glfnCreateProgram: 126 ret = glCreateProgram(); 127 break; 128 case glfnCreateShader: 129 ret = glCreateShader((GLenum)args->a0); 130 break; 131 case glfnCullFace: 132 glCullFace((GLenum)args->a0); 133 break; 134 case glfnDeleteBuffer: 135 glDeleteBuffers(1, (const GLuint*)(&args->a0)); 136 break; 137 case glfnDeleteFramebuffer: 138 glDeleteFramebuffers(1, (const GLuint*)(&args->a0)); 139 break; 140 case glfnDeleteProgram: 141 glDeleteProgram((GLint)args->a0); 142 break; 143 case glfnDeleteRenderbuffer: 144 glDeleteRenderbuffers(1, (const GLuint*)(&args->a0)); 145 break; 146 case glfnDeleteShader: 147 glDeleteShader((GLint)args->a0); 148 break; 149 case glfnDeleteTexture: 150 glDeleteTextures(1, (const GLuint*)(&args->a0)); 151 break; 152 case glfnDeleteVertexArray: 153 glDeleteVertexArrays(1, (const GLuint*)(&args->a0)); 154 break; 155 case glfnDepthFunc: 156 glDepthFunc((GLenum)args->a0); 157 break; 158 case glfnDepthMask: 159 glDepthMask((GLboolean)args->a0); 160 break; 161 case glfnDepthRangef: 162 glDepthRangef(*(GLfloat*)&args->a0, *(GLfloat*)&args->a1); 163 break; 164 case glfnDetachShader: 165 glDetachShader((GLint)args->a0, (GLint)args->a1); 166 break; 167 case glfnDisable: 168 glDisable((GLenum)args->a0); 169 break; 170 case glfnDisableVertexAttribArray: 171 glDisableVertexAttribArray((GLint)args->a0); 172 break; 173 case glfnDrawArrays: 174 glDrawArrays((GLenum)args->a0, (GLint)args->a1, (GLint)args->a2); 175 break; 176 case glfnDrawElements: 177 glDrawElements((GLenum)args->a0, (GLint)args->a1, (GLenum)args->a2, (void*)args->a3); 178 break; 179 case glfnEnable: 180 glEnable((GLenum)args->a0); 181 break; 182 case glfnEnableVertexAttribArray: 183 glEnableVertexAttribArray((GLint)args->a0); 184 break; 185 case glfnFinish: 186 glFinish(); 187 break; 188 case glfnFlush: 189 glFlush(); 190 break; 191 case glfnFramebufferRenderbuffer: 192 glFramebufferRenderbuffer((GLenum)args->a0, (GLenum)args->a1, (GLenum)args->a2, (GLint)args->a3); 193 break; 194 case glfnFramebufferTexture2D: 195 glFramebufferTexture2D((GLenum)args->a0, (GLenum)args->a1, (GLenum)args->a2, (GLint)args->a3, (GLint)args->a4); 196 break; 197 case glfnFrontFace: 198 glFrontFace((GLenum)args->a0); 199 break; 200 case glfnGenBuffer: 201 glGenBuffers(1, (GLuint*)&ret); 202 break; 203 case glfnGenFramebuffer: 204 glGenFramebuffers(1, (GLuint*)&ret); 205 break; 206 case glfnGenRenderbuffer: 207 glGenRenderbuffers(1, (GLuint*)&ret); 208 break; 209 case glfnGenTexture: 210 glGenTextures(1, (GLuint*)&ret); 211 break; 212 case glfnGenVertexArray: 213 glGenVertexArrays(1, (GLuint*)&ret); 214 break; 215 case glfnGenerateMipmap: 216 glGenerateMipmap((GLenum)args->a0); 217 break; 218 case glfnGetActiveAttrib: 219 glGetActiveAttrib( 220 (GLuint)args->a0, 221 (GLuint)args->a1, 222 (GLsizei)args->a2, 223 NULL, 224 (GLint*)&ret, 225 (GLenum*)args->a3, 226 (GLchar*)parg); 227 break; 228 case glfnGetActiveUniform: 229 glGetActiveUniform( 230 (GLuint)args->a0, 231 (GLuint)args->a1, 232 (GLsizei)args->a2, 233 NULL, 234 (GLint*)&ret, 235 (GLenum*)args->a3, 236 (GLchar*)parg); 237 break; 238 case glfnGetAttachedShaders: 239 glGetAttachedShaders((GLuint)args->a0, (GLsizei)args->a1, (GLsizei*)&ret, (GLuint*)parg); 240 break; 241 case glfnGetAttribLocation: 242 ret = glGetAttribLocation((GLint)args->a0, (GLchar*)args->a1); 243 break; 244 case glfnGetBooleanv: 245 glGetBooleanv((GLenum)args->a0, (GLboolean*)parg); 246 break; 247 case glfnGetBufferParameteri: 248 glGetBufferParameteriv((GLenum)args->a0, (GLenum)args->a1, (GLint*)&ret); 249 break; 250 case glfnGetFloatv: 251 glGetFloatv((GLenum)args->a0, (GLfloat*)parg); 252 break; 253 case glfnGetIntegerv: 254 glGetIntegerv((GLenum)args->a0, (GLint*)parg); 255 break; 256 case glfnGetError: 257 ret = glGetError(); 258 break; 259 case glfnGetFramebufferAttachmentParameteriv: 260 glGetFramebufferAttachmentParameteriv((GLenum)args->a0, (GLenum)args->a1, (GLenum)args->a2, (GLint*)&ret); 261 break; 262 case glfnGetProgramiv: 263 glGetProgramiv((GLint)args->a0, (GLenum)args->a1, (GLint*)&ret); 264 break; 265 case glfnGetProgramInfoLog: 266 glGetProgramInfoLog((GLuint)args->a0, (GLsizei)args->a1, 0, (GLchar*)parg); 267 break; 268 case glfnGetRenderbufferParameteriv: 269 glGetRenderbufferParameteriv((GLenum)args->a0, (GLenum)args->a1, (GLint*)&ret); 270 break; 271 case glfnGetShaderiv: 272 glGetShaderiv((GLint)args->a0, (GLenum)args->a1, (GLint*)&ret); 273 break; 274 case glfnGetShaderInfoLog: 275 glGetShaderInfoLog((GLuint)args->a0, (GLsizei)args->a1, 0, (GLchar*)parg); 276 break; 277 case glfnGetShaderPrecisionFormat: 278 glGetShaderPrecisionFormat((GLenum)args->a0, (GLenum)args->a1, (GLint*)parg, &((GLint*)parg)[2]); 279 break; 280 case glfnGetShaderSource: 281 glGetShaderSource((GLuint)args->a0, (GLsizei)args->a1, 0, (GLchar*)parg); 282 break; 283 case glfnGetString: 284 ret = (uintptr_t)glGetString((GLenum)args->a0); 285 break; 286 case glfnGetTexParameterfv: 287 glGetTexParameterfv((GLenum)args->a0, (GLenum)args->a1, (GLfloat*)parg); 288 break; 289 case glfnGetTexParameteriv: 290 glGetTexParameteriv((GLenum)args->a0, (GLenum)args->a1, (GLint*)parg); 291 break; 292 case glfnGetUniformfv: 293 glGetUniformfv((GLuint)args->a0, (GLint)args->a1, (GLfloat*)parg); 294 break; 295 case glfnGetUniformiv: 296 glGetUniformiv((GLuint)args->a0, (GLint)args->a1, (GLint*)parg); 297 break; 298 case glfnGetUniformLocation: 299 ret = glGetUniformLocation((GLint)args->a0, (GLchar*)args->a1); 300 break; 301 case glfnGetVertexAttribfv: 302 glGetVertexAttribfv((GLuint)args->a0, (GLenum)args->a1, (GLfloat*)parg); 303 break; 304 case glfnGetVertexAttribiv: 305 glGetVertexAttribiv((GLuint)args->a0, (GLenum)args->a1, (GLint*)parg); 306 break; 307 case glfnHint: 308 glHint((GLenum)args->a0, (GLenum)args->a1); 309 break; 310 case glfnIsBuffer: 311 ret = glIsBuffer((GLint)args->a0); 312 break; 313 case glfnIsEnabled: 314 ret = glIsEnabled((GLenum)args->a0); 315 break; 316 case glfnIsFramebuffer: 317 ret = glIsFramebuffer((GLint)args->a0); 318 break; 319 case glfnIsProgram: 320 ret = glIsProgram((GLint)args->a0); 321 break; 322 case glfnIsRenderbuffer: 323 ret = glIsRenderbuffer((GLint)args->a0); 324 break; 325 case glfnIsShader: 326 ret = glIsShader((GLint)args->a0); 327 break; 328 case glfnIsTexture: 329 ret = glIsTexture((GLint)args->a0); 330 break; 331 case glfnLineWidth: 332 glLineWidth(*(GLfloat*)&args->a0); 333 break; 334 case glfnLinkProgram: 335 glLinkProgram((GLint)args->a0); 336 break; 337 case glfnPixelStorei: 338 glPixelStorei((GLenum)args->a0, (GLint)args->a1); 339 break; 340 case glfnPolygonOffset: 341 glPolygonOffset(*(GLfloat*)&args->a0, *(GLfloat*)&args->a1); 342 break; 343 case glfnReadPixels: 344 glReadPixels((GLint)args->a0, (GLint)args->a1, (GLsizei)args->a2, (GLsizei)args->a3, (GLenum)args->a4, (GLenum)args->a5, (void*)parg); 345 break; 346 case glfnReleaseShaderCompiler: 347 glReleaseShaderCompiler(); 348 break; 349 case glfnRenderbufferStorage: 350 glRenderbufferStorage((GLenum)args->a0, (GLenum)args->a1, (GLint)args->a2, (GLint)args->a3); 351 break; 352 case glfnSampleCoverage: 353 glSampleCoverage(*(GLfloat*)&args->a0, (GLboolean)args->a1); 354 break; 355 case glfnScissor: 356 glScissor((GLint)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3); 357 break; 358 case glfnShaderSource: 359 #if defined(os_ios) || defined(os_osx) 360 glShaderSource((GLuint)args->a0, (GLsizei)args->a1, (const GLchar *const *)args->a2, NULL); 361 #else 362 glShaderSource((GLuint)args->a0, (GLsizei)args->a1, (const GLchar **)args->a2, NULL); 363 #endif 364 break; 365 case glfnStencilFunc: 366 glStencilFunc((GLenum)args->a0, (GLint)args->a1, (GLuint)args->a2); 367 break; 368 case glfnStencilFuncSeparate: 369 glStencilFuncSeparate((GLenum)args->a0, (GLenum)args->a1, (GLint)args->a2, (GLuint)args->a3); 370 break; 371 case glfnStencilMask: 372 glStencilMask((GLuint)args->a0); 373 break; 374 case glfnStencilMaskSeparate: 375 glStencilMaskSeparate((GLenum)args->a0, (GLuint)args->a1); 376 break; 377 case glfnStencilOp: 378 glStencilOp((GLenum)args->a0, (GLenum)args->a1, (GLenum)args->a2); 379 break; 380 case glfnStencilOpSeparate: 381 glStencilOpSeparate((GLenum)args->a0, (GLenum)args->a1, (GLenum)args->a2, (GLenum)args->a3); 382 break; 383 case glfnTexImage2D: 384 glTexImage2D( 385 (GLenum)args->a0, 386 (GLint)args->a1, 387 (GLint)args->a2, 388 (GLsizei)args->a3, 389 (GLsizei)args->a4, 390 0, // border 391 (GLenum)args->a5, 392 (GLenum)args->a6, 393 (const GLvoid*)parg); 394 break; 395 case glfnTexSubImage2D: 396 glTexSubImage2D( 397 (GLenum)args->a0, 398 (GLint)args->a1, 399 (GLint)args->a2, 400 (GLint)args->a3, 401 (GLsizei)args->a4, 402 (GLsizei)args->a5, 403 (GLenum)args->a6, 404 (GLenum)args->a7, 405 (const GLvoid*)parg); 406 break; 407 case glfnTexParameterf: 408 glTexParameterf((GLenum)args->a0, (GLenum)args->a1, *(GLfloat*)&args->a2); 409 break; 410 case glfnTexParameterfv: 411 glTexParameterfv((GLenum)args->a0, (GLenum)args->a1, (GLfloat*)parg); 412 break; 413 case glfnTexParameteri: 414 glTexParameteri((GLenum)args->a0, (GLenum)args->a1, (GLint)args->a2); 415 break; 416 case glfnTexParameteriv: 417 glTexParameteriv((GLenum)args->a0, (GLenum)args->a1, (GLint*)parg); 418 break; 419 case glfnUniform1f: 420 glUniform1f((GLint)args->a0, *(GLfloat*)&args->a1); 421 break; 422 case glfnUniform1fv: 423 glUniform1fv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 424 break; 425 case glfnUniform1i: 426 glUniform1i((GLint)args->a0, (GLint)args->a1); 427 break; 428 case glfnUniform1ui: 429 glUniform1ui((GLint)args->a0, (GLuint)args->a1); 430 break; 431 case glfnUniform1uiv: 432 glUniform1uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); 433 break; 434 case glfnUniform1iv: 435 glUniform1iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 436 break; 437 case glfnUniform2f: 438 glUniform2f((GLint)args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2); 439 break; 440 case glfnUniform2fv: 441 glUniform2fv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 442 break; 443 case glfnUniform2i: 444 glUniform2i((GLint)args->a0, (GLint)args->a1, (GLint)args->a2); 445 break; 446 case glfnUniform2ui: 447 glUniform2ui((GLint)args->a0, (GLuint)args->a1, (GLuint)args->a2); 448 break; 449 case glfnUniform2uiv: 450 glUniform2uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); 451 break; 452 case glfnUniform2iv: 453 glUniform2iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 454 break; 455 case glfnUniform3f: 456 glUniform3f((GLint)args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2, *(GLfloat*)&args->a3); 457 break; 458 case glfnUniform3fv: 459 glUniform3fv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 460 break; 461 case glfnUniform3i: 462 glUniform3i((GLint)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3); 463 break; 464 case glfnUniform3ui: 465 glUniform3ui((GLint)args->a0, (GLuint)args->a1, (GLuint)args->a2, (GLuint)args->a3); 466 break; 467 case glfnUniform3uiv: 468 glUniform3uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); 469 break; 470 case glfnUniform3iv: 471 glUniform3iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 472 break; 473 case glfnUniform4f: 474 glUniform4f((GLint)args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2, *(GLfloat*)&args->a3, *(GLfloat*)&args->a4); 475 break; 476 case glfnUniform4fv: 477 glUniform4fv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 478 break; 479 case glfnUniform4i: 480 glUniform4i((GLint)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3, (GLint)args->a4); 481 break; 482 case glfnUniform4ui: 483 glUniform4ui((GLint)args->a0, (GLuint)args->a1, (GLuint)args->a2, (GLuint)args->a3, (GLuint)args->a4); 484 break; 485 case glfnUniform4uiv: 486 glUniform4uiv((GLint)args->a0, (GLsizeiptr)args->a1, (GLuint*)parg); 487 break; 488 case glfnUniform4iv: 489 glUniform4iv((GLint)args->a0, (GLsizeiptr)args->a1, (GLvoid*)parg); 490 break; 491 case glfnUniformMatrix2fv: 492 glUniformMatrix2fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 493 break; 494 case glfnUniformMatrix3fv: 495 glUniformMatrix3fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 496 break; 497 case glfnUniformMatrix4fv: 498 glUniformMatrix4fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 499 break; 500 case glfnUniformMatrix2x3fv: 501 glUniformMatrix2x3fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 502 break; 503 case glfnUniformMatrix3x2fv: 504 glUniformMatrix3x2fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 505 break; 506 case glfnUniformMatrix2x4fv: 507 glUniformMatrix2x4fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 508 break; 509 case glfnUniformMatrix4x2fv: 510 glUniformMatrix4x2fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 511 break; 512 case glfnUniformMatrix3x4fv: 513 glUniformMatrix3x4fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 514 break; 515 case glfnUniformMatrix4x3fv: 516 glUniformMatrix4x3fv((GLint)args->a0, (GLsizeiptr)args->a1, 0, (GLvoid*)parg); 517 break; 518 case glfnUseProgram: 519 glUseProgram((GLint)args->a0); 520 break; 521 case glfnValidateProgram: 522 glValidateProgram((GLint)args->a0); 523 break; 524 case glfnVertexAttrib1f: 525 glVertexAttrib1f((GLint)args->a0, *(GLfloat*)&args->a1); 526 break; 527 case glfnVertexAttrib1fv: 528 glVertexAttrib1fv((GLint)args->a0, (GLfloat*)parg); 529 break; 530 case glfnVertexAttrib2f: 531 glVertexAttrib2f((GLint)args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2); 532 break; 533 case glfnVertexAttrib2fv: 534 glVertexAttrib2fv((GLint)args->a0, (GLfloat*)parg); 535 break; 536 case glfnVertexAttrib3f: 537 glVertexAttrib3f((GLint)args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2, *(GLfloat*)&args->a3); 538 break; 539 case glfnVertexAttrib3fv: 540 glVertexAttrib3fv((GLint)args->a0, (GLfloat*)parg); 541 break; 542 case glfnVertexAttrib4f: 543 glVertexAttrib4f((GLint)args->a0, *(GLfloat*)&args->a1, *(GLfloat*)&args->a2, *(GLfloat*)&args->a3, *(GLfloat*)&args->a4); 544 break; 545 case glfnVertexAttrib4fv: 546 glVertexAttrib4fv((GLint)args->a0, (GLfloat*)parg); 547 break; 548 case glfnVertexAttribPointer: 549 glVertexAttribPointer((GLuint)args->a0, (GLint)args->a1, (GLenum)args->a2, (GLboolean)args->a3, (GLsizei)args->a4, (const GLvoid*)args->a5); 550 break; 551 case glfnViewport: 552 glViewport((GLint)args->a0, (GLint)args->a1, (GLint)args->a2, (GLint)args->a3); 553 break; 554 } 555 return ret; 556 }