1/* 2* Copyright (C) 2011 The Android Open Source Project 3* 4* Licensed under the Apache License, Version 2.0 (the "License"); 5* you may not use this file except in compliance with the License. 6* You may obtain a copy of the License at 7* 8* http://www.apache.org/licenses/LICENSE-2.0 9* 10* Unless required by applicable law or agreed to in writing, software 11* distributed under the License is distributed on an "AS IS" BASIS, 12* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13* See the License for the specific language governing permissions and 14* limitations under the License. 15*/ 16#include <stdio.h> 17#include <stdlib.h> 18#include <string.h> 19#include "gles_dispatch.h" 20#include "gles_ftable.h" 21#include <EGL/egl.h> 22#include <cutils/log.h> 23 24static struct gles_dispatch *s_dispatch = NULL; 25 26void init_gles(void *gles_android) 27{ 28 s_dispatch = create_gles_dispatch(gles_android); 29 if (s_dispatch == NULL) { 30 ALOGE("failed to create gles dispatch\n"); 31 } 32} 33 34static struct gles_dispatch *getDispatch() 35{ 36 if (!s_dispatch) { 37 fprintf(stderr,"FATAL ERROR: GLES has not been initialized\n"); 38 exit(-1); 39 } 40 41 return s_dispatch; 42} 43 44__eglMustCastToProperFunctionPointerType gles_getProcAddress(const char *procname) 45{ 46 for (int i=0; i<gles_num_funcs; i++) { 47 if (!strcmp(gles_funcs_by_name[i].name, procname)) { 48 return (__eglMustCastToProperFunctionPointerType)gles_funcs_by_name[i].proc; 49 } 50 } 51 52 return NULL; 53} 54 55///////////// Path-through functions /////////////// 56void glAlphaFunc(GLenum func, GLclampf ref) 57{ 58 getDispatch()->glAlphaFunc(func, ref); 59} 60 61void glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) 62{ 63 getDispatch()->glClearColor(red, green, blue, alpha); 64} 65 66void glClearDepthf(GLclampf depth) 67{ 68 getDispatch()->glClearDepthf(depth); 69} 70 71void glClipPlanef(GLenum plane, const GLfloat *equation) 72{ 73 getDispatch()->glClipPlanef(plane, equation); 74} 75 76void glColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha) 77{ 78 getDispatch()->glColor4f(red, green, blue, alpha); 79} 80 81void glDepthRangef(GLclampf zNear, GLclampf zFar) 82{ 83 getDispatch()->glDepthRangef(zNear, zFar); 84} 85 86void glFogf(GLenum pname, GLfloat param) 87{ 88 getDispatch()->glFogf(pname, param); 89} 90 91void glFogfv(GLenum pname, const GLfloat *params) 92{ 93 getDispatch()->glFogfv(pname, params); 94} 95 96void glFrustumf(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) 97{ 98 getDispatch()->glFrustumf(left, right, bottom, top, zNear, zFar); 99} 100 101void glGetClipPlanef(GLenum pname, GLfloat eqn[4]) 102{ 103 getDispatch()->glGetClipPlanef(pname, eqn); 104} 105 106void glGetFloatv(GLenum pname, GLfloat *params) 107{ 108 getDispatch()->glGetFloatv(pname, params); 109} 110 111void glGetLightfv(GLenum light, GLenum pname, GLfloat *params) 112{ 113 getDispatch()->glGetLightfv(light, pname, params); 114} 115 116void glGetMaterialfv(GLenum face, GLenum pname, GLfloat *params) 117{ 118 getDispatch()->glGetMaterialfv(face, pname, params); 119} 120 121void glGetTexEnvfv(GLenum env, GLenum pname, GLfloat *params) 122{ 123 getDispatch()->glGetTexEnvfv(env, pname, params); 124} 125 126void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params) 127{ 128 getDispatch()->glGetTexParameterfv(target, pname, params); 129} 130 131void glLightModelf(GLenum pname, GLfloat param) 132{ 133 getDispatch()->glLightModelf(pname, param); 134} 135 136void glLightModelfv(GLenum pname, const GLfloat *params) 137{ 138 getDispatch()->glLightModelfv(pname, params); 139} 140 141void glLightf(GLenum light, GLenum pname, GLfloat param) 142{ 143 getDispatch()->glLightf(light, pname, param); 144} 145 146void glLightfv(GLenum light, GLenum pname, const GLfloat *params) 147{ 148 getDispatch()->glLightfv(light, pname, params); 149} 150 151void glLineWidth(GLfloat width) 152{ 153 getDispatch()->glLineWidth(width); 154} 155 156void glLoadMatrixf(const GLfloat *m) 157{ 158 getDispatch()->glLoadMatrixf(m); 159} 160 161void glMaterialf(GLenum face, GLenum pname, GLfloat param) 162{ 163 getDispatch()->glMaterialf(face, pname, param); 164} 165 166void glMaterialfv(GLenum face, GLenum pname, const GLfloat *params) 167{ 168 getDispatch()->glMaterialfv(face, pname, params); 169} 170 171void glMultMatrixf(const GLfloat *m) 172{ 173 getDispatch()->glMultMatrixf(m); 174} 175 176void glMultiTexCoord4f(GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) 177{ 178 getDispatch()->glMultiTexCoord4f(target, s, t, r, q); 179} 180 181void glNormal3f(GLfloat nx, GLfloat ny, GLfloat nz) 182{ 183 getDispatch()->glNormal3f(nx, ny, nz); 184} 185 186void glOrthof(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) 187{ 188 getDispatch()->glOrthof(left, right, bottom, top, zNear, zFar); 189} 190 191void glPointParameterf(GLenum pname, GLfloat param) 192{ 193 getDispatch()->glPointParameterf(pname, param); 194} 195 196void glPointParameterfv(GLenum pname, const GLfloat *params) 197{ 198 getDispatch()->glPointParameterfv(pname, params); 199} 200 201void glPointSize(GLfloat size) 202{ 203 getDispatch()->glPointSize(size); 204} 205 206void glPolygonOffset(GLfloat factor, GLfloat units) 207{ 208 getDispatch()->glPolygonOffset(factor, units); 209} 210 211void glRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z) 212{ 213 getDispatch()->glRotatef(angle, x, y, z); 214} 215 216void glScalef(GLfloat x, GLfloat y, GLfloat z) 217{ 218 getDispatch()->glScalef(x, y, z); 219} 220 221void glTexEnvf(GLenum target, GLenum pname, GLfloat param) 222{ 223 getDispatch()->glTexEnvf(target, pname, param); 224} 225 226void glTexEnvfv(GLenum target, GLenum pname, const GLfloat *params) 227{ 228 getDispatch()->glTexEnvfv(target, pname, params); 229} 230 231void glTexParameterf(GLenum target, GLenum pname, GLfloat param) 232{ 233 getDispatch()->glTexParameterf(target, pname, param); 234} 235 236void glTexParameterfv(GLenum target, GLenum pname, const GLfloat *params) 237{ 238 getDispatch()->glTexParameterfv(target, pname, params); 239} 240 241void glTranslatef(GLfloat x, GLfloat y, GLfloat z) 242{ 243 getDispatch()->glTranslatef(x, y, z); 244} 245 246void glActiveTexture(GLenum texture) 247{ 248 getDispatch()->glActiveTexture(texture); 249} 250 251void glAlphaFuncx(GLenum func, GLclampx ref) 252{ 253 getDispatch()->glAlphaFuncx(func, ref); 254} 255 256void glBindBuffer(GLenum target, GLuint buffer) 257{ 258 getDispatch()->glBindBuffer(target, buffer); 259} 260 261void glBindTexture(GLenum target, GLuint texture) 262{ 263 getDispatch()->glBindTexture(target, texture); 264} 265 266void glBlendFunc(GLenum sfactor, GLenum dfactor) 267{ 268 getDispatch()->glBlendFunc(sfactor, dfactor); 269} 270 271void glBufferData(GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) 272{ 273 getDispatch()->glBufferData(target, size, data, usage); 274} 275 276void glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) 277{ 278 getDispatch()->glBufferSubData(target, offset, size, data); 279} 280 281void glClear(GLbitfield mask) 282{ 283 getDispatch()->glClear(mask); 284} 285 286void glClearColorx(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) 287{ 288 getDispatch()->glClearColorx(red, green, blue, alpha); 289} 290 291void glClearDepthx(GLclampx depth) 292{ 293 getDispatch()->glClearDepthx(depth); 294} 295 296void glClearStencil(GLint s) 297{ 298 getDispatch()->glClearStencil(s); 299} 300 301void glClientActiveTexture(GLenum texture) 302{ 303 getDispatch()->glClientActiveTexture(texture); 304} 305 306void glClipPlanex(GLenum plane, const GLfixed *equation) 307{ 308 getDispatch()->glClipPlanex(plane, equation); 309} 310 311void glColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha) 312{ 313 getDispatch()->glColor4ub(red, green, blue, alpha); 314} 315 316void glColor4x(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) 317{ 318 getDispatch()->glColor4x(red, green, blue, alpha); 319} 320 321void glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) 322{ 323 getDispatch()->glColorMask(red, green, blue, alpha); 324} 325 326void glColorPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) 327{ 328 getDispatch()->glColorPointer(size, type, stride, pointer); 329} 330 331void glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) 332{ 333 getDispatch()->glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); 334} 335 336void glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) 337{ 338 getDispatch()->glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); 339} 340 341void glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) 342{ 343 getDispatch()->glCopyTexImage2D(target, level, internalformat, x, y, width, height, border); 344} 345 346void glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) 347{ 348 getDispatch()->glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height); 349} 350 351void glCullFace(GLenum mode) 352{ 353 getDispatch()->glCullFace(mode); 354} 355 356void glDeleteBuffers(GLsizei n, const GLuint *buffers) 357{ 358 getDispatch()->glDeleteBuffers(n, buffers); 359} 360 361void glDeleteTextures(GLsizei n, const GLuint *textures) 362{ 363 getDispatch()->glDeleteTextures(n, textures); 364} 365 366void glDepthFunc(GLenum func) 367{ 368 getDispatch()->glDepthFunc(func); 369} 370 371void glDepthMask(GLboolean flag) 372{ 373 getDispatch()->glDepthMask(flag); 374} 375 376void glDepthRangex(GLclampx zNear, GLclampx zFar) 377{ 378 getDispatch()->glDepthRangex(zNear, zFar); 379} 380 381void glDisable(GLenum cap) 382{ 383 getDispatch()->glDisable(cap); 384} 385 386void glDisableClientState(GLenum array) 387{ 388 getDispatch()->glDisableClientState(array); 389} 390 391void glDrawArrays(GLenum mode, GLint first, GLsizei count) 392{ 393 getDispatch()->glDrawArrays(mode, first, count); 394} 395 396void glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices) 397{ 398 getDispatch()->glDrawElements(mode, count, type, indices); 399} 400 401void glEnable(GLenum cap) 402{ 403 getDispatch()->glEnable(cap); 404} 405 406void glEnableClientState(GLenum array) 407{ 408 getDispatch()->glEnableClientState(array); 409} 410 411void glFinish() 412{ 413 getDispatch()->glFinish(); 414} 415 416void glFlush() 417{ 418 getDispatch()->glFlush(); 419} 420 421void glFogx(GLenum pname, GLfixed param) 422{ 423 getDispatch()->glFogx(pname, param); 424} 425 426void glFogxv(GLenum pname, const GLfixed *params) 427{ 428 getDispatch()->glFogxv(pname, params); 429} 430 431void glFrontFace(GLenum mode) 432{ 433 getDispatch()->glFrontFace(mode); 434} 435 436void glFrustumx(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) 437{ 438 getDispatch()->glFrustumx(left, right, bottom, top, zNear, zFar); 439} 440 441void glGetBooleanv(GLenum pname, GLboolean *params) 442{ 443 getDispatch()->glGetBooleanv(pname, params); 444} 445 446void glGetBufferParameteriv(GLenum target, GLenum pname, GLint *params) 447{ 448 getDispatch()->glGetBufferParameteriv(target, pname, params); 449} 450 451void glGetClipPlanex(GLenum pname, GLfixed eqn[4]) 452{ 453 getDispatch()->glGetClipPlanex(pname, eqn); 454} 455 456void glGenBuffers(GLsizei n, GLuint *buffers) 457{ 458 getDispatch()->glGenBuffers(n, buffers); 459} 460 461void glGenTextures(GLsizei n, GLuint *textures) 462{ 463 getDispatch()->glGenTextures(n, textures); 464} 465 466GLenum glGetError() 467{ 468 return getDispatch()->glGetError(); 469} 470 471void glGetFixedv(GLenum pname, GLfixed *params) 472{ 473 getDispatch()->glGetFixedv(pname, params); 474} 475 476void glGetIntegerv(GLenum pname, GLint *params) 477{ 478 getDispatch()->glGetIntegerv(pname, params); 479} 480 481void glGetLightxv(GLenum light, GLenum pname, GLfixed *params) 482{ 483 getDispatch()->glGetLightxv(light, pname, params); 484} 485 486void glGetMaterialxv(GLenum face, GLenum pname, GLfixed *params) 487{ 488 getDispatch()->glGetMaterialxv(face, pname, params); 489} 490 491void glGetPointerv(GLenum pname, GLvoid **params) 492{ 493 getDispatch()->glGetPointerv(pname, params); 494} 495 496const GLubyte* glGetString(GLenum name) 497{ 498 return getDispatch()->glGetString(name); 499} 500 501void glGetTexEnviv(GLenum env, GLenum pname, GLint *params) 502{ 503 getDispatch()->glGetTexEnviv(env, pname, params); 504} 505 506void glGetTexEnvxv(GLenum env, GLenum pname, GLfixed *params) 507{ 508 getDispatch()->glGetTexEnvxv(env, pname, params); 509} 510 511void glGetTexParameteriv(GLenum target, GLenum pname, GLint *params) 512{ 513 getDispatch()->glGetTexParameteriv(target, pname, params); 514} 515 516void glGetTexParameterxv(GLenum target, GLenum pname, GLfixed *params) 517{ 518 getDispatch()->glGetTexParameterxv(target, pname, params); 519} 520 521void glHint(GLenum target, GLenum mode) 522{ 523 getDispatch()->glHint(target, mode); 524} 525 526GLboolean glIsBuffer(GLuint buffer) 527{ 528 return getDispatch()->glIsBuffer(buffer); 529} 530 531GLboolean glIsEnabled(GLenum cap) 532{ 533 return getDispatch()->glIsEnabled(cap); 534} 535 536GLboolean glIsTexture(GLuint texture) 537{ 538 return getDispatch()->glIsTexture(texture); 539} 540 541void glLightModelx(GLenum pname, GLfixed param) 542{ 543 getDispatch()->glLightModelx(pname, param); 544} 545 546void glLightModelxv(GLenum pname, const GLfixed *params) 547{ 548 getDispatch()->glLightModelxv(pname, params); 549} 550 551void glLightx(GLenum light, GLenum pname, GLfixed param) 552{ 553 getDispatch()->glLightx(light, pname, param); 554} 555 556void glLightxv(GLenum light, GLenum pname, const GLfixed *params) 557{ 558 getDispatch()->glLightxv(light, pname, params); 559} 560 561void glLineWidthx(GLfixed width) 562{ 563 getDispatch()->glLineWidthx(width); 564} 565 566void glLoadIdentity() 567{ 568 getDispatch()->glLoadIdentity(); 569} 570 571void glLoadMatrixx(const GLfixed *m) 572{ 573 getDispatch()->glLoadMatrixx(m); 574} 575 576void glLogicOp(GLenum opcode) 577{ 578 getDispatch()->glLogicOp(opcode); 579} 580 581void glMaterialx(GLenum face, GLenum pname, GLfixed param) 582{ 583 getDispatch()->glMaterialx(face, pname, param); 584} 585 586void glMaterialxv(GLenum face, GLenum pname, const GLfixed *params) 587{ 588 getDispatch()->glMaterialxv(face, pname, params); 589} 590 591void glMatrixMode(GLenum mode) 592{ 593 getDispatch()->glMatrixMode(mode); 594} 595 596void glMultMatrixx(const GLfixed *m) 597{ 598 getDispatch()->glMultMatrixx(m); 599} 600 601void glMultiTexCoord4x(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) 602{ 603 getDispatch()->glMultiTexCoord4x(target, s, t, r, q); 604} 605 606void glNormal3x(GLfixed nx, GLfixed ny, GLfixed nz) 607{ 608 getDispatch()->glNormal3x(nx, ny, nz); 609} 610 611void glNormalPointer(GLenum type, GLsizei stride, const GLvoid *pointer) 612{ 613 getDispatch()->glNormalPointer(type, stride, pointer); 614} 615 616void glOrthox(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) 617{ 618 getDispatch()->glOrthox(left, right, bottom, top, zNear, zFar); 619} 620 621void glPixelStorei(GLenum pname, GLint param) 622{ 623 getDispatch()->glPixelStorei(pname, param); 624} 625 626void glPointParameterx(GLenum pname, GLfixed param) 627{ 628 getDispatch()->glPointParameterx(pname, param); 629} 630 631void glPointParameterxv(GLenum pname, const GLfixed *params) 632{ 633 getDispatch()->glPointParameterxv(pname, params); 634} 635 636void glPointSizex(GLfixed size) 637{ 638 getDispatch()->glPointSizex(size); 639} 640 641void glPolygonOffsetx(GLfixed factor, GLfixed units) 642{ 643 getDispatch()->glPolygonOffsetx(factor, units); 644} 645 646void glPopMatrix() 647{ 648 getDispatch()->glPopMatrix(); 649} 650 651void glPushMatrix() 652{ 653 getDispatch()->glPushMatrix(); 654} 655 656void glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels) 657{ 658 getDispatch()->glReadPixels(x, y, width, height, format, type, pixels); 659} 660 661void glRotatex(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) 662{ 663 getDispatch()->glRotatex(angle, x, y, z); 664} 665 666void glSampleCoverage(GLclampf value, GLboolean invert) 667{ 668 getDispatch()->glSampleCoverage(value, invert); 669} 670 671void glSampleCoveragex(GLclampx value, GLboolean invert) 672{ 673 getDispatch()->glSampleCoveragex(value, invert); 674} 675 676void glScalex(GLfixed x, GLfixed y, GLfixed z) 677{ 678 getDispatch()->glScalex(x, y, z); 679} 680 681void glScissor(GLint x, GLint y, GLsizei width, GLsizei height) 682{ 683 getDispatch()->glScissor(x, y, width, height); 684} 685 686void glShadeModel(GLenum mode) 687{ 688 getDispatch()->glShadeModel(mode); 689} 690 691void glStencilFunc(GLenum func, GLint ref, GLuint mask) 692{ 693 getDispatch()->glStencilFunc(func, ref, mask); 694} 695 696void glStencilMask(GLuint mask) 697{ 698 getDispatch()->glStencilMask(mask); 699} 700 701void glStencilOp(GLenum fail, GLenum zfail, GLenum zpass) 702{ 703 getDispatch()->glStencilOp(fail, zfail, zpass); 704} 705 706void glTexCoordPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) 707{ 708 getDispatch()->glTexCoordPointer(size, type, stride, pointer); 709} 710 711void glTexEnvi(GLenum target, GLenum pname, GLint param) 712{ 713 getDispatch()->glTexEnvi(target, pname, param); 714} 715 716void glTexEnvx(GLenum target, GLenum pname, GLfixed param) 717{ 718 getDispatch()->glTexEnvx(target, pname, param); 719} 720 721void glTexEnviv(GLenum target, GLenum pname, const GLint *params) 722{ 723 getDispatch()->glTexEnviv(target, pname, params); 724} 725 726void glTexEnvxv(GLenum target, GLenum pname, const GLfixed *params) 727{ 728 getDispatch()->glTexEnvxv(target, pname, params); 729} 730 731void glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels) 732{ 733 getDispatch()->glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels); 734} 735 736void glTexParameteri(GLenum target, GLenum pname, GLint param) 737{ 738 getDispatch()->glTexParameteri(target, pname, param); 739} 740 741void glTexParameterx(GLenum target, GLenum pname, GLfixed param) 742{ 743 getDispatch()->glTexParameterx(target, pname, param); 744} 745 746void glTexParameteriv(GLenum target, GLenum pname, const GLint *params) 747{ 748 getDispatch()->glTexParameteriv(target, pname, params); 749} 750 751void glTexParameterxv(GLenum target, GLenum pname, const GLfixed *params) 752{ 753 getDispatch()->glTexParameterxv(target, pname, params); 754} 755 756void glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) 757{ 758 getDispatch()->glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); 759} 760 761void glTranslatex(GLfixed x, GLfixed y, GLfixed z) 762{ 763 getDispatch()->glTranslatex(x, y, z); 764} 765 766void glVertexPointer(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) 767{ 768 getDispatch()->glVertexPointer(size, type, stride, pointer); 769} 770 771void glViewport(GLint x, GLint y, GLsizei width, GLsizei height) 772{ 773 getDispatch()->glViewport(x, y, width, height); 774} 775 776void glPointSizePointerOES(GLenum type, GLsizei stride, const GLvoid *pointer) 777{ 778 getDispatch()->glPointSizePointerOES(type, stride, pointer); 779} 780 781void glBlendEquationSeparateOES(GLenum modeRGB, GLenum modeAlpha) 782{ 783 getDispatch()->glBlendEquationSeparateOES(modeRGB, modeAlpha); 784} 785 786void glBlendFuncSeparateOES(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha) 787{ 788 getDispatch()->glBlendFuncSeparateOES(srcRGB, dstRGB, srcAlpha, dstAlpha); 789} 790 791void glBlendEquationOES(GLenum mode) 792{ 793 getDispatch()->glBlendEquationOES(mode); 794} 795 796void glDrawTexsOES(GLshort x, GLshort y, GLshort z, GLshort width, GLshort height) 797{ 798 getDispatch()->glDrawTexsOES(x, y, z, width, height); 799} 800 801void glDrawTexiOES(GLint x, GLint y, GLint z, GLint width, GLint height) 802{ 803 getDispatch()->glDrawTexiOES(x, y, z, width, height); 804} 805 806void glDrawTexxOES(GLfixed x, GLfixed y, GLfixed z, GLfixed width, GLfixed height) 807{ 808 getDispatch()->glDrawTexxOES(x, y, z, width, height); 809} 810 811void glDrawTexsvOES(const GLshort *coords) 812{ 813 getDispatch()->glDrawTexsvOES(coords); 814} 815 816void glDrawTexivOES(const GLint *coords) 817{ 818 getDispatch()->glDrawTexivOES(coords); 819} 820 821void glDrawTexxvOES(const GLfixed *coords) 822{ 823 getDispatch()->glDrawTexxvOES(coords); 824} 825 826void glDrawTexfOES(GLfloat x, GLfloat y, GLfloat z, GLfloat width, GLfloat height) 827{ 828 getDispatch()->glDrawTexfOES(x, y, z, width, height); 829} 830 831void glDrawTexfvOES(const GLfloat *coords) 832{ 833 getDispatch()->glDrawTexfvOES(coords); 834} 835 836void glEGLImageTargetTexture2DOES(GLenum target, GLeglImageOES image) 837{ 838 getDispatch()->glEGLImageTargetTexture2DOES(target, image); 839} 840 841void glEGLImageTargetRenderbufferStorageOES(GLenum target, GLeglImageOES image) 842{ 843 getDispatch()->glEGLImageTargetRenderbufferStorageOES(target, image); 844} 845 846void glAlphaFuncxOES(GLenum func, GLclampx ref) 847{ 848 getDispatch()->glAlphaFuncxOES(func, ref); 849} 850 851void glClearColorxOES(GLclampx red, GLclampx green, GLclampx blue, GLclampx alpha) 852{ 853 getDispatch()->glClearColorxOES(red, green, blue, alpha); 854} 855 856void glClearDepthxOES(GLclampx depth) 857{ 858 getDispatch()->glClearDepthxOES(depth); 859} 860 861void glClipPlanexOES(GLenum plane, const GLfixed *equation) 862{ 863 getDispatch()->glClipPlanexOES(plane, equation); 864} 865 866void glColor4xOES(GLfixed red, GLfixed green, GLfixed blue, GLfixed alpha) 867{ 868 getDispatch()->glColor4xOES(red, green, blue, alpha); 869} 870 871void glDepthRangexOES(GLclampx zNear, GLclampx zFar) 872{ 873 getDispatch()->glDepthRangexOES(zNear, zFar); 874} 875 876void glFogxOES(GLenum pname, GLfixed param) 877{ 878 getDispatch()->glFogxOES(pname, param); 879} 880 881void glFogxvOES(GLenum pname, const GLfixed *params) 882{ 883 getDispatch()->glFogxvOES(pname, params); 884} 885 886void glFrustumxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) 887{ 888 getDispatch()->glFrustumxOES(left, right, bottom, top, zNear, zFar); 889} 890 891void glGetClipPlanexOES(GLenum pname, GLfixed eqn[4]) 892{ 893 getDispatch()->glGetClipPlanexOES(pname, eqn); 894} 895 896void glGetFixedvOES(GLenum pname, GLfixed *params) 897{ 898 getDispatch()->glGetFixedvOES(pname, params); 899} 900 901void glGetLightxvOES(GLenum light, GLenum pname, GLfixed *params) 902{ 903 getDispatch()->glGetLightxvOES(light, pname, params); 904} 905 906void glGetMaterialxvOES(GLenum face, GLenum pname, GLfixed *params) 907{ 908 getDispatch()->glGetMaterialxvOES(face, pname, params); 909} 910 911void glGetTexEnvxvOES(GLenum env, GLenum pname, GLfixed *params) 912{ 913 getDispatch()->glGetTexEnvxvOES(env, pname, params); 914} 915 916void glGetTexParameterxvOES(GLenum target, GLenum pname, GLfixed *params) 917{ 918 getDispatch()->glGetTexParameterxvOES(target, pname, params); 919} 920 921void glLightModelxOES(GLenum pname, GLfixed param) 922{ 923 getDispatch()->glLightModelxOES(pname, param); 924} 925 926void glLightModelxvOES(GLenum pname, const GLfixed *params) 927{ 928 getDispatch()->glLightModelxvOES(pname, params); 929} 930 931void glLightxOES(GLenum light, GLenum pname, GLfixed param) 932{ 933 getDispatch()->glLightxOES(light, pname, param); 934} 935 936void glLightxvOES(GLenum light, GLenum pname, const GLfixed *params) 937{ 938 getDispatch()->glLightxvOES(light, pname, params); 939} 940 941void glLineWidthxOES(GLfixed width) 942{ 943 getDispatch()->glLineWidthxOES(width); 944} 945 946void glLoadMatrixxOES(const GLfixed *m) 947{ 948 getDispatch()->glLoadMatrixxOES(m); 949} 950 951void glMaterialxOES(GLenum face, GLenum pname, GLfixed param) 952{ 953 getDispatch()->glMaterialxOES(face, pname, param); 954} 955 956void glMaterialxvOES(GLenum face, GLenum pname, const GLfixed *params) 957{ 958 getDispatch()->glMaterialxvOES(face, pname, params); 959} 960 961void glMultMatrixxOES(const GLfixed *m) 962{ 963 getDispatch()->glMultMatrixxOES(m); 964} 965 966void glMultiTexCoord4xOES(GLenum target, GLfixed s, GLfixed t, GLfixed r, GLfixed q) 967{ 968 getDispatch()->glMultiTexCoord4xOES(target, s, t, r, q); 969} 970 971void glNormal3xOES(GLfixed nx, GLfixed ny, GLfixed nz) 972{ 973 getDispatch()->glNormal3xOES(nx, ny, nz); 974} 975 976void glOrthoxOES(GLfixed left, GLfixed right, GLfixed bottom, GLfixed top, GLfixed zNear, GLfixed zFar) 977{ 978 getDispatch()->glOrthoxOES(left, right, bottom, top, zNear, zFar); 979} 980 981void glPointParameterxOES(GLenum pname, GLfixed param) 982{ 983 getDispatch()->glPointParameterxOES(pname, param); 984} 985 986void glPointParameterxvOES(GLenum pname, const GLfixed *params) 987{ 988 getDispatch()->glPointParameterxvOES(pname, params); 989} 990 991void glPointSizexOES(GLfixed size) 992{ 993 getDispatch()->glPointSizexOES(size); 994} 995 996void glPolygonOffsetxOES(GLfixed factor, GLfixed units) 997{ 998 getDispatch()->glPolygonOffsetxOES(factor, units); 999} 1000 1001void glRotatexOES(GLfixed angle, GLfixed x, GLfixed y, GLfixed z) 1002{ 1003 getDispatch()->glRotatexOES(angle, x, y, z); 1004} 1005 1006void glSampleCoveragexOES(GLclampx value, GLboolean invert) 1007{ 1008 getDispatch()->glSampleCoveragexOES(value, invert); 1009} 1010 1011void glScalexOES(GLfixed x, GLfixed y, GLfixed z) 1012{ 1013 getDispatch()->glScalexOES(x, y, z); 1014} 1015 1016void glTexEnvxOES(GLenum target, GLenum pname, GLfixed param) 1017{ 1018 getDispatch()->glTexEnvxOES(target, pname, param); 1019} 1020 1021void glTexEnvxvOES(GLenum target, GLenum pname, const GLfixed *params) 1022{ 1023 getDispatch()->glTexEnvxvOES(target, pname, params); 1024} 1025 1026void glTexParameterxOES(GLenum target, GLenum pname, GLfixed param) 1027{ 1028 getDispatch()->glTexParameterxOES(target, pname, param); 1029} 1030 1031void glTexParameterxvOES(GLenum target, GLenum pname, const GLfixed *params) 1032{ 1033 getDispatch()->glTexParameterxvOES(target, pname, params); 1034} 1035 1036void glTranslatexOES(GLfixed x, GLfixed y, GLfixed z) 1037{ 1038 getDispatch()->glTranslatexOES(x, y, z); 1039} 1040 1041GLboolean glIsRenderbufferOES(GLuint renderbuffer) 1042{ 1043 return getDispatch()->glIsRenderbufferOES(renderbuffer); 1044} 1045 1046void glBindRenderbufferOES(GLenum target, GLuint renderbuffer) 1047{ 1048 getDispatch()->glBindRenderbufferOES(target, renderbuffer); 1049} 1050 1051void glDeleteRenderbuffersOES(GLsizei n, const GLuint *renderbuffers) 1052{ 1053 getDispatch()->glDeleteRenderbuffersOES(n, renderbuffers); 1054} 1055 1056void glGenRenderbuffersOES(GLsizei n, GLuint *renderbuffers) 1057{ 1058 getDispatch()->glGenRenderbuffersOES(n, renderbuffers); 1059} 1060 1061void glRenderbufferStorageOES(GLenum target, GLenum internalformat, GLsizei width, GLsizei height) 1062{ 1063 getDispatch()->glRenderbufferStorageOES(target, internalformat, width, height); 1064} 1065 1066void glGetRenderbufferParameterivOES(GLenum target, GLenum pname, GLint *params) 1067{ 1068 getDispatch()->glGetRenderbufferParameterivOES(target, pname, params); 1069} 1070 1071GLboolean glIsFramebufferOES(GLuint framebuffer) 1072{ 1073 return getDispatch()->glIsFramebufferOES(framebuffer); 1074} 1075 1076void glBindFramebufferOES(GLenum target, GLuint framebuffer) 1077{ 1078 getDispatch()->glBindFramebufferOES(target, framebuffer); 1079} 1080 1081void glDeleteFramebuffersOES(GLsizei n, const GLuint *framebuffers) 1082{ 1083 getDispatch()->glDeleteFramebuffersOES(n, framebuffers); 1084} 1085 1086void glGenFramebuffersOES(GLsizei n, GLuint *framebuffers) 1087{ 1088 getDispatch()->glGenFramebuffersOES(n, framebuffers); 1089} 1090 1091GLenum glCheckFramebufferStatusOES(GLenum target) 1092{ 1093 return getDispatch()->glCheckFramebufferStatusOES(target); 1094} 1095 1096void glFramebufferRenderbufferOES(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer) 1097{ 1098 getDispatch()->glFramebufferRenderbufferOES(target, attachment, renderbuffertarget, renderbuffer); 1099} 1100 1101void glFramebufferTexture2DOES(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level) 1102{ 1103 getDispatch()->glFramebufferTexture2DOES(target, attachment, textarget, texture, level); 1104} 1105 1106void glGetFramebufferAttachmentParameterivOES(GLenum target, GLenum attachment, GLenum pname, GLint *params) 1107{ 1108 getDispatch()->glGetFramebufferAttachmentParameterivOES(target, attachment, pname, params); 1109} 1110 1111void glGenerateMipmapOES(GLenum target) 1112{ 1113 getDispatch()->glGenerateMipmapOES(target); 1114} 1115 1116void* glMapBufferOES(GLenum target, GLenum access) 1117{ 1118 return getDispatch()->glMapBufferOES(target, access); 1119} 1120 1121GLboolean glUnmapBufferOES(GLenum target) 1122{ 1123 return getDispatch()->glUnmapBufferOES(target); 1124} 1125 1126void glGetBufferPointervOES(GLenum target, GLenum pname, GLvoid **ptr) 1127{ 1128 getDispatch()->glGetBufferPointervOES(target, pname, ptr); 1129} 1130 1131void glCurrentPaletteMatrixOES(GLuint matrixpaletteindex) 1132{ 1133 getDispatch()->glCurrentPaletteMatrixOES(matrixpaletteindex); 1134} 1135 1136void glLoadPaletteFromModelViewMatrixOES() 1137{ 1138 getDispatch()->glLoadPaletteFromModelViewMatrixOES(); 1139} 1140 1141void glMatrixIndexPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) 1142{ 1143 getDispatch()->glMatrixIndexPointerOES(size, type, stride, pointer); 1144} 1145 1146void glWeightPointerOES(GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) 1147{ 1148 getDispatch()->glWeightPointerOES(size, type, stride, pointer); 1149} 1150 1151GLbitfield glQueryMatrixxOES(GLfixed mantissa[16], GLint exponent[16]) 1152{ 1153 return getDispatch()->glQueryMatrixxOES(mantissa, exponent); 1154} 1155 1156void glDepthRangefOES(GLclampf zNear, GLclampf zFar) 1157{ 1158 getDispatch()->glDepthRangefOES(zNear, zFar); 1159} 1160 1161void glFrustumfOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) 1162{ 1163 getDispatch()->glFrustumfOES(left, right, bottom, top, zNear, zFar); 1164} 1165 1166void glOrthofOES(GLfloat left, GLfloat right, GLfloat bottom, GLfloat top, GLfloat zNear, GLfloat zFar) 1167{ 1168 getDispatch()->glOrthofOES(left, right, bottom, top, zNear, zFar); 1169} 1170 1171void glClipPlanefOES(GLenum plane, const GLfloat *equation) 1172{ 1173 getDispatch()->glClipPlanefOES(plane, equation); 1174} 1175 1176void glGetClipPlanefOES(GLenum pname, GLfloat eqn[4]) 1177{ 1178 getDispatch()->glGetClipPlanefOES(pname, eqn); 1179} 1180 1181void glClearDepthfOES(GLclampf depth) 1182{ 1183 getDispatch()->glClearDepthfOES(depth); 1184} 1185 1186void glTexGenfOES(GLenum coord, GLenum pname, GLfloat param) 1187{ 1188 getDispatch()->glTexGenfOES(coord, pname, param); 1189} 1190 1191void glTexGenfvOES(GLenum coord, GLenum pname, const GLfloat *params) 1192{ 1193 getDispatch()->glTexGenfvOES(coord, pname, params); 1194} 1195 1196void glTexGeniOES(GLenum coord, GLenum pname, GLint param) 1197{ 1198 getDispatch()->glTexGeniOES(coord, pname, param); 1199} 1200 1201void glTexGenivOES(GLenum coord, GLenum pname, const GLint *params) 1202{ 1203 getDispatch()->glTexGenivOES(coord, pname, params); 1204} 1205 1206void glTexGenxOES(GLenum coord, GLenum pname, GLfixed param) 1207{ 1208 getDispatch()->glTexGenxOES(coord, pname, param); 1209} 1210 1211void glTexGenxvOES(GLenum coord, GLenum pname, const GLfixed *params) 1212{ 1213 getDispatch()->glTexGenxvOES(coord, pname, params); 1214} 1215 1216void glGetTexGenfvOES(GLenum coord, GLenum pname, GLfloat *params) 1217{ 1218 getDispatch()->glGetTexGenfvOES(coord, pname, params); 1219} 1220 1221void glGetTexGenivOES(GLenum coord, GLenum pname, GLint *params) 1222{ 1223 getDispatch()->glGetTexGenivOES(coord, pname, params); 1224} 1225 1226void glGetTexGenxvOES(GLenum coord, GLenum pname, GLfixed *params) 1227{ 1228 getDispatch()->glGetTexGenxvOES(coord, pname, params); 1229} 1230 1231void glBindVertexArrayOES(GLuint array) 1232{ 1233 getDispatch()->glBindVertexArrayOES(array); 1234} 1235 1236void glDeleteVertexArraysOES(GLsizei n, const GLuint *arrays) 1237{ 1238 getDispatch()->glDeleteVertexArraysOES(n, arrays); 1239} 1240 1241void glGenVertexArraysOES(GLsizei n, GLuint *arrays) 1242{ 1243 getDispatch()->glGenVertexArraysOES(n, arrays); 1244} 1245 1246GLboolean glIsVertexArrayOES(GLuint array) 1247{ 1248 return getDispatch()->glIsVertexArrayOES(array); 1249} 1250 1251void glDiscardFramebufferEXT(GLenum target, GLsizei numAttachments, const GLenum *attachments) 1252{ 1253 getDispatch()->glDiscardFramebufferEXT(target, numAttachments, attachments); 1254} 1255 1256void glMultiDrawArraysEXT(GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) 1257{ 1258 getDispatch()->glMultiDrawArraysEXT(mode, first, count, primcount); 1259} 1260 1261void glMultiDrawElementsEXT(GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount) 1262{ 1263 getDispatch()->glMultiDrawElementsEXT(mode, count, type, indices, primcount); 1264} 1265 1266void glClipPlanefIMG(GLenum p, const GLfloat *eqn) 1267{ 1268 getDispatch()->glClipPlanefIMG(p, eqn); 1269} 1270 1271void glClipPlanexIMG(GLenum p, const GLfixed *eqn) 1272{ 1273 getDispatch()->glClipPlanexIMG(p, eqn); 1274} 1275 1276void glRenderbufferStorageMultisampleIMG(GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height) 1277{ 1278 getDispatch()->glRenderbufferStorageMultisampleIMG(target, samples, internalformat, width, height); 1279} 1280 1281void glFramebufferTexture2DMultisampleIMG(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLsizei samples) 1282{ 1283 getDispatch()->glFramebufferTexture2DMultisampleIMG(target, attachment, textarget, texture, level, samples); 1284} 1285 1286void glDeleteFencesNV(GLsizei n, const GLuint *fences) 1287{ 1288 getDispatch()->glDeleteFencesNV(n, fences); 1289} 1290 1291void glGenFencesNV(GLsizei n, GLuint *fences) 1292{ 1293 getDispatch()->glGenFencesNV(n, fences); 1294} 1295 1296GLboolean glIsFenceNV(GLuint fence) 1297{ 1298 return getDispatch()->glIsFenceNV(fence); 1299} 1300 1301GLboolean glTestFenceNV(GLuint fence) 1302{ 1303 return getDispatch()->glTestFenceNV(fence); 1304} 1305 1306void glGetFenceivNV(GLuint fence, GLenum pname, GLint *params) 1307{ 1308 getDispatch()->glGetFenceivNV(fence, pname, params); 1309} 1310 1311void glFinishFenceNV(GLuint fence) 1312{ 1313 getDispatch()->glFinishFenceNV(fence); 1314} 1315 1316void glSetFenceNV(GLuint fence, GLenum condition) 1317{ 1318 getDispatch()->glSetFenceNV(fence, condition); 1319} 1320 1321void glGetDriverControlsQCOM(GLint *num, GLsizei size, GLuint *driverControls) 1322{ 1323 getDispatch()->glGetDriverControlsQCOM(num, size, driverControls); 1324} 1325 1326void glGetDriverControlStringQCOM(GLuint driverControl, GLsizei bufSize, GLsizei *length, GLchar *driverControlString) 1327{ 1328 getDispatch()->glGetDriverControlStringQCOM(driverControl, bufSize, length, driverControlString); 1329} 1330 1331void glEnableDriverControlQCOM(GLuint driverControl) 1332{ 1333 getDispatch()->glEnableDriverControlQCOM(driverControl); 1334} 1335 1336void glDisableDriverControlQCOM(GLuint driverControl) 1337{ 1338 getDispatch()->glDisableDriverControlQCOM(driverControl); 1339} 1340 1341void glExtGetTexturesQCOM(GLuint *textures, GLint maxTextures, GLint *numTextures) 1342{ 1343 getDispatch()->glExtGetTexturesQCOM(textures, maxTextures, numTextures); 1344} 1345 1346void glExtGetBuffersQCOM(GLuint *buffers, GLint maxBuffers, GLint *numBuffers) 1347{ 1348 getDispatch()->glExtGetBuffersQCOM(buffers, maxBuffers, numBuffers); 1349} 1350 1351void glExtGetRenderbuffersQCOM(GLuint *renderbuffers, GLint maxRenderbuffers, GLint *numRenderbuffers) 1352{ 1353 getDispatch()->glExtGetRenderbuffersQCOM(renderbuffers, maxRenderbuffers, numRenderbuffers); 1354} 1355 1356void glExtGetFramebuffersQCOM(GLuint *framebuffers, GLint maxFramebuffers, GLint *numFramebuffers) 1357{ 1358 getDispatch()->glExtGetFramebuffersQCOM(framebuffers, maxFramebuffers, numFramebuffers); 1359} 1360 1361void glExtGetTexLevelParameterivQCOM(GLuint texture, GLenum face, GLint level, GLenum pname, GLint *params) 1362{ 1363 getDispatch()->glExtGetTexLevelParameterivQCOM(texture, face, level, pname, params); 1364} 1365 1366void glExtTexObjectStateOverrideiQCOM(GLenum target, GLenum pname, GLint param) 1367{ 1368 getDispatch()->glExtTexObjectStateOverrideiQCOM(target, pname, param); 1369} 1370 1371void glExtGetTexSubImageQCOM(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLvoid *texels) 1372{ 1373 getDispatch()->glExtGetTexSubImageQCOM(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, texels); 1374} 1375 1376void glExtGetBufferPointervQCOM(GLenum target, GLvoid **params) 1377{ 1378 getDispatch()->glExtGetBufferPointervQCOM(target, params); 1379} 1380 1381void glExtGetShadersQCOM(GLuint *shaders, GLint maxShaders, GLint *numShaders) 1382{ 1383 getDispatch()->glExtGetShadersQCOM(shaders, maxShaders, numShaders); 1384} 1385 1386void glExtGetProgramsQCOM(GLuint *programs, GLint maxPrograms, GLint *numPrograms) 1387{ 1388 getDispatch()->glExtGetProgramsQCOM(programs, maxPrograms, numPrograms); 1389} 1390 1391GLboolean glExtIsProgramBinaryQCOM(GLuint program) 1392{ 1393 return getDispatch()->glExtIsProgramBinaryQCOM(program); 1394} 1395 1396void glExtGetProgramBinarySourceQCOM(GLuint program, GLenum shadertype, GLchar *source, GLint *length) 1397{ 1398 getDispatch()->glExtGetProgramBinarySourceQCOM(program, shadertype, source, length); 1399} 1400 1401void glStartTilingQCOM(GLuint x, GLuint y, GLuint width, GLuint height, GLbitfield preserveMask) 1402{ 1403 getDispatch()->glStartTilingQCOM(x, y, width, height, preserveMask); 1404} 1405 1406void glEndTilingQCOM(GLbitfield preserveMask) 1407{ 1408 getDispatch()->glEndTilingQCOM(preserveMask); 1409} 1410 1411