public
Created

Generate debugging stubs with OpenGL-ES headers.

  • Download Gist
Helper_EEGLDebugStub.h
C
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 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150
// Example usage
// fixed and added some codes
//
 
#define EEGL_DEBUG_STUB_FUNC_DECORATION static
#define EEGL_DEBUG_STUB_EXCEPT_ERROR {HelperAssertGLError();}
 
static
void
HelperAssertGLError()
{
ASS ( glGetError() == 0 );
}
 
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glActiveTexture(GLenum texture)
{
glActiveTexture(texture);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glAttachShader(GLuint program, GLuint shader)
{
glAttachShader(program,shader);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBindAttribLocation(GLuint program, GLuint index, const GLchar* name)
{
glBindAttribLocation(program,index,name);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBindBuffer(GLenum target, GLuint buffer)
{
glBindBuffer(target,buffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBindFramebuffer(GLenum target, GLuint framebuffer)
{
glBindFramebuffer(target,framebuffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBindRenderbuffer(GLenum target, GLuint renderbuffer)
{
glBindRenderbuffer(target,renderbuffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBindTexture(GLenum target, GLuint texture)
{
glBindTexture(target,texture);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBlendColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
glBlendColor(red,green,blue,alpha);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBlendEquation( GLenum mode )
{
glBlendEquation(mode);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBlendEquationSeparate(GLenum modeRGB, GLenum modeAlpha)
{
glBlendEquationSeparate(modeRGB,modeAlpha);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBlendFunc(GLenum sfactor, GLenum dfactor)
{
glBlendFunc(sfactor,dfactor);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBlendFuncSeparate(GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha)
{
glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBufferData(GLenum target, GLsizeiptr size, const GLvoid* data, GLenum usage)
{
glBufferData(target,size,data,usage);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glBufferSubData(GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid* data)
{
glBufferSubData(target,offset,size,data);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLenum EEGLDebugStubFunc_glCheckFramebufferStatus(GLenum target)
{
GLenum R = glCheckFramebufferStatus(target);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glClear(GLbitfield mask)
{
glClear(mask);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
{
glClearColor(red,green,blue,alpha);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glClearDepthf(GLclampf depth)
{
glClearDepthf(depth);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glClearStencil(GLint s)
{
glClearStencil(s);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
{
glColorMask(red,green,blue,alpha);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glCompileShader(GLuint shader)
{
glCompileShader(shader);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glCompressedTexImage2D(GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid* data)
{
glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glCompressedTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid* data)
{
glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glCopyTexImage2D(GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
{
glCopyTexImage2D(target,level,internalformat,x,y,width,height,border);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
{
glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLuint EEGLDebugStubFunc_glCreateProgram(void)
{
GLuint R = glCreateProgram();
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLuint EEGLDebugStubFunc_glCreateShader(GLenum type)
{
GLuint R = glCreateShader(type);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glCullFace(GLenum mode)
{
glCullFace(mode);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDeleteBuffers(GLsizei n, const GLuint* buffers)
{
glDeleteBuffers(n,buffers);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDeleteFramebuffers(GLsizei n, const GLuint* framebuffers)
{
glDeleteFramebuffers(n,framebuffers);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDeleteProgram(GLuint program)
{
glDeleteProgram(program);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDeleteRenderbuffers(GLsizei n, const GLuint* renderbuffers)
{
glDeleteRenderbuffers(n,renderbuffers);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDeleteShader(GLuint shader)
{
glDeleteShader(shader);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDeleteTextures(GLsizei n, const GLuint* textures)
{
glDeleteTextures(n,textures);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDepthFunc(GLenum func)
{
glDepthFunc(func);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDepthMask(GLboolean flag)
{
glDepthMask(flag);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDepthRangef(GLclampf zNear, GLclampf zFar)
{
glDepthRangef(zNear,zFar);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDetachShader(GLuint program, GLuint shader)
{
glDetachShader(program,shader);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDisable(GLenum cap)
{
glDisable(cap);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDisableVertexAttribArray(GLuint index)
{
glDisableVertexAttribArray(index);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDrawArrays(GLenum mode, GLint first, GLsizei count)
{
glDrawArrays(mode,first,count);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glDrawElements(GLenum mode, GLsizei count, GLenum type, const GLvoid* indices)
{
glDrawElements(mode,count,type,indices);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glEnable(GLenum cap)
{
glEnable(cap);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glEnableVertexAttribArray(GLuint index)
{
glEnableVertexAttribArray(index);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glFinish(void)
{
glFinish();
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glFlush(void)
{
glFlush();
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glFramebufferRenderbuffer(GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer)
{
glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glFramebufferTexture2D(GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level)
{
glFramebufferTexture2D(target,attachment,textarget,texture,level);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glFrontFace(GLenum mode)
{
glFrontFace(mode);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGenBuffers(GLsizei n, GLuint* buffers)
{
glGenBuffers(n,buffers);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGenerateMipmap(GLenum target)
{
glGenerateMipmap(target);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGenFramebuffers(GLsizei n, GLuint* framebuffers)
{
glGenFramebuffers(n,framebuffers);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGenRenderbuffers(GLsizei n, GLuint* renderbuffers)
{
glGenRenderbuffers(n,renderbuffers);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGenTextures(GLsizei n, GLuint* textures)
{
glGenTextures(n,textures);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetActiveAttrib(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
{
glGetActiveAttrib(program,index,bufsize,length,size,type,name);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetActiveUniform(GLuint program, GLuint index, GLsizei bufsize, GLsizei* length, GLint* size, GLenum* type, GLchar* name)
{
glGetActiveUniform(program,index,bufsize,length,size,type,name);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei* count, GLuint* shaders)
{
glGetAttachedShaders(program,maxcount,count,shaders);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
int EEGLDebugStubFunc_glGetAttribLocation(GLuint program, const GLchar* name)
{
int R = glGetAttribLocation(program,name);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetBooleanv(GLenum pname, GLboolean* params)
{
glGetBooleanv(pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
glGetBufferParameteriv(target,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLenum EEGLDebugStubFunc_glGetError(void)
{
GLenum R = glGetError();
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetFloatv(GLenum pname, GLfloat* params)
{
glGetFloatv(pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)
{
glGetFramebufferAttachmentParameteriv(target,attachment,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetIntegerv(GLenum pname, GLint* params)
{
glGetIntegerv(pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetProgramiv(GLuint program, GLenum pname, GLint* params)
{
glGetProgramiv(program,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetProgramInfoLog(GLuint program, GLsizei bufsize, GLsizei* length, GLchar* infolog)
{
glGetProgramInfoLog(program,bufsize,length,infolog);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
{
glGetRenderbufferParameteriv(target,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetShaderiv(GLuint shader, GLenum pname, GLint* params)
{
glGetShaderiv(shader,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetShaderInfoLog(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* infolog)
{
glGetShaderInfoLog(shader,bufsize,length,infolog);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetShaderPrecisionFormat(GLenum shadertype, GLenum precisiontype, GLint* range, GLint* precision)
{
glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei* length, GLchar* source)
{
glGetShaderSource(shader,bufsize,length,source);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
const GLubyte * EEGLDebugStubFunc_glGetString(GLenum name)
{
const GLubyte * R = glGetString(name);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params)
{
glGetTexParameterfv(target,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
{
glGetTexParameteriv(target,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetUniformfv(GLuint program, GLint location, GLfloat* params)
{
glGetUniformfv(program,location,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetUniformiv(GLuint program, GLint location, GLint* params)
{
glGetUniformiv(program,location,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
int EEGLDebugStubFunc_glGetUniformLocation(GLuint program, const GLchar* name)
{
int R = glGetUniformLocation(program,name);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
{
glGetVertexAttribfv(index,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
{
glGetVertexAttribiv(index,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
{
glGetVertexAttribPointerv(index,pname,pointer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glHint(GLenum target, GLenum mode)
{
glHint(target,mode);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsBuffer(GLuint buffer)
{
GLboolean R = glIsBuffer(buffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsEnabled(GLenum cap)
{
GLboolean R = glIsEnabled(cap);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsFramebuffer(GLuint framebuffer)
{
GLboolean R = glIsFramebuffer(framebuffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsProgram(GLuint program)
{
GLboolean R = glIsProgram(program);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsRenderbuffer(GLuint renderbuffer)
{
GLboolean R = glIsRenderbuffer(renderbuffer);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsShader(GLuint shader)
{
GLboolean R = glIsShader(shader);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
GLboolean EEGLDebugStubFunc_glIsTexture(GLuint texture)
{
GLboolean R = glIsTexture(texture);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
return R;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glLineWidth(GLfloat width)
{
glLineWidth(width);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glLinkProgram(GLuint program)
{
glLinkProgram(program);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glPixelStorei(GLenum pname, GLint param)
{
glPixelStorei(pname,param);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glPolygonOffset(GLfloat factor, GLfloat units)
{
glPolygonOffset(factor,units);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid* pixels)
{
glReadPixels(x,y,width,height,format,type,pixels);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glReleaseShaderCompiler(void)
{
glReleaseShaderCompiler();
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glRenderbufferStorage(GLenum target, GLenum internalformat, GLsizei width, GLsizei height)
{
glRenderbufferStorage(target,internalformat,width,height);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glSampleCoverage(GLclampf value, GLboolean invert)
{
glSampleCoverage(value,invert);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glScissor(GLint x, GLint y, GLsizei width, GLsizei height)
{
glScissor(x,y,width,height);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glShaderBinary(GLsizei n, const GLuint* shaders, GLenum binaryformat, const GLvoid* binary, GLsizei length)
{
glShaderBinary(n,shaders,binaryformat,binary,length);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glShaderSource(GLuint shader, GLsizei count, const GLchar** string, const GLint* length)
{
glShaderSource(shader,count,string,length);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glStencilFunc(GLenum func, GLint ref, GLuint mask)
{
glStencilFunc(func,ref,mask);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glStencilFuncSeparate(GLenum face, GLenum func, GLint ref, GLuint mask)
{
glStencilFuncSeparate(face,func,ref,mask);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glStencilMask(GLuint mask)
{
glStencilMask(mask);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glStencilMaskSeparate(GLenum face, GLuint mask)
{
glStencilMaskSeparate(face,mask);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
{
glStencilOp(fail,zfail,zpass);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glStencilOpSeparate(GLenum face, GLenum fail, GLenum zfail, GLenum zpass)
{
glStencilOpSeparate(face,fail,zfail,zpass);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid* pixels)
{
glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glTexParameterf(GLenum target, GLenum pname, GLfloat param)
{
glTexParameterf(target,pname,param);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glTexParameterfv(GLenum target, GLenum pname, const GLfloat* params)
{
glTexParameterfv(target,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glTexParameteri(GLenum target, GLenum pname, GLint param)
{
glTexParameteri(target,pname,param);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glTexParameteriv(GLenum target, GLenum pname, const GLint* params)
{
glTexParameteriv(target,pname,params);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid* pixels)
{
glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform1f(GLint location, GLfloat x)
{
glUniform1f(location,x);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform1fv(GLint location, GLsizei count, const GLfloat* v)
{
glUniform1fv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform1i(GLint location, GLint x)
{
glUniform1i(location,x);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform1iv(GLint location, GLsizei count, const GLint* v)
{
glUniform1iv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform2f(GLint location, GLfloat x, GLfloat y)
{
glUniform2f(location,x,y);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform2fv(GLint location, GLsizei count, const GLfloat* v)
{
glUniform2fv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform2i(GLint location, GLint x, GLint y)
{
glUniform2i(location,x,y);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform2iv(GLint location, GLsizei count, const GLint* v)
{
glUniform2iv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform3f(GLint location, GLfloat x, GLfloat y, GLfloat z)
{
glUniform3f(location,x,y,z);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform3fv(GLint location, GLsizei count, const GLfloat* v)
{
glUniform3fv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform3i(GLint location, GLint x, GLint y, GLint z)
{
glUniform3i(location,x,y,z);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform3iv(GLint location, GLsizei count, const GLint* v)
{
glUniform3iv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform4f(GLint location, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
glUniform4f(location,x,y,z,w);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform4fv(GLint location, GLsizei count, const GLfloat* v)
{
glUniform4fv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform4i(GLint location, GLint x, GLint y, GLint z, GLint w)
{
glUniform4i(location,x,y,z,w);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniform4iv(GLint location, GLsizei count, const GLint* v)
{
glUniform4iv(location,count,v);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniformMatrix2fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
glUniformMatrix2fv(location,count,transpose,value);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniformMatrix3fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
glUniformMatrix3fv(location,count,transpose,value);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUniformMatrix4fv(GLint location, GLsizei count, GLboolean transpose, const GLfloat* value)
{
glUniformMatrix4fv(location,count,transpose,value);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glUseProgram(GLuint program)
{
glUseProgram(program);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glValidateProgram(GLuint program)
{
glValidateProgram(program);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib1f(GLuint indx, GLfloat x)
{
glVertexAttrib1f(indx,x);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib1fv(GLuint indx, const GLfloat* values)
{
glVertexAttrib1fv(indx,values);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib2f(GLuint indx, GLfloat x, GLfloat y)
{
glVertexAttrib2f(indx,x,y);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib2fv(GLuint indx, const GLfloat* values)
{
glVertexAttrib2fv(indx,values);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib3f(GLuint indx, GLfloat x, GLfloat y, GLfloat z)
{
glVertexAttrib3f(indx,x,y,z);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib3fv(GLuint indx, const GLfloat* values)
{
glVertexAttrib3fv(indx,values);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib4f(GLuint indx, GLfloat x, GLfloat y, GLfloat z, GLfloat w)
{
glVertexAttrib4f(indx,x,y,z,w);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttrib4fv(GLuint indx, const GLfloat* values)
{
glVertexAttrib4fv(indx,values);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glVertexAttribPointer(GLuint indx, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid* ptr)
{
glVertexAttribPointer(indx,size,type,normalized,stride,ptr);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
EEGL_DEBUG_STUB_FUNC_DECORATION
void EEGLDebugStubFunc_glViewport(GLint x, GLint y, GLsizei width, GLsizei height)
{
glViewport(x,y,width,height);
EEGL_DEBUG_STUB_EXCEPT_ERROR;
}
#define glActiveTexture(texture) EEGLDebugStubFunc_glActiveTexture(texture)
#define glAttachShader(program,shader) EEGLDebugStubFunc_glAttachShader(program,shader)
#define glBindAttribLocation(program,index,name) EEGLDebugStubFunc_glBindAttribLocation(program,index,name)
#define glBindBuffer(target,buffer) EEGLDebugStubFunc_glBindBuffer(target,buffer)
#define glBindFramebuffer(target,framebuffer) EEGLDebugStubFunc_glBindFramebuffer(target,framebuffer)
#define glBindRenderbuffer(target,renderbuffer) EEGLDebugStubFunc_glBindRenderbuffer(target,renderbuffer)
#define glBindTexture(target,texture) EEGLDebugStubFunc_glBindTexture(target,texture)
#define glBlendColor(red,green,blue,alpha) EEGLDebugStubFunc_glBlendColor(red,green,blue,alpha)
#define glBlendEquation() EEGLDebugStubFunc_glBlendEquation()
#define glBlendEquationSeparate(modeRGB,modeAlpha) EEGLDebugStubFunc_glBlendEquationSeparate(modeRGB,modeAlpha)
#define glBlendFunc(sfactor,dfactor) EEGLDebugStubFunc_glBlendFunc(sfactor,dfactor)
#define glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha) EEGLDebugStubFunc_glBlendFuncSeparate(srcRGB,dstRGB,srcAlpha,dstAlpha)
#define glBufferData(target,size,data,usage) EEGLDebugStubFunc_glBufferData(target,size,data,usage)
#define glBufferSubData(target,offset,size,data) EEGLDebugStubFunc_glBufferSubData(target,offset,size,data)
#define glCheckFramebufferStatus(target) EEGLDebugStubFunc_glCheckFramebufferStatus(target)
#define glClear(mask) EEGLDebugStubFunc_glClear(mask)
#define glClearColor(red,green,blue,alpha) EEGLDebugStubFunc_glClearColor(red,green,blue,alpha)
#define glClearDepthf(depth) EEGLDebugStubFunc_glClearDepthf(depth)
#define glClearStencil(s) EEGLDebugStubFunc_glClearStencil(s)
#define glColorMask(red,green,blue,alpha) EEGLDebugStubFunc_glColorMask(red,green,blue,alpha)
#define glCompileShader(shader) EEGLDebugStubFunc_glCompileShader(shader)
#define glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data) EEGLDebugStubFunc_glCompressedTexImage2D(target,level,internalformat,width,height,border,imageSize,data)
#define glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data) EEGLDebugStubFunc_glCompressedTexSubImage2D(target,level,xoffset,yoffset,width,height,format,imageSize,data)
#define glCopyTexImage2D(target,level,internalformat,x,y,width,height,border) EEGLDebugStubFunc_glCopyTexImage2D(target,level,internalformat,x,y,width,height,border)
#define glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height) EEGLDebugStubFunc_glCopyTexSubImage2D(target,level,xoffset,yoffset,x,y,width,height)
#define glCreateProgram() EEGLDebugStubFunc_glCreateProgram()
#define glCreateShader(type) EEGLDebugStubFunc_glCreateShader(type)
#define glCullFace(mode) EEGLDebugStubFunc_glCullFace(mode)
#define glDeleteBuffers(n,buffers) EEGLDebugStubFunc_glDeleteBuffers(n,buffers)
#define glDeleteFramebuffers(n,framebuffers) EEGLDebugStubFunc_glDeleteFramebuffers(n,framebuffers)
#define glDeleteProgram(program) EEGLDebugStubFunc_glDeleteProgram(program)
#define glDeleteRenderbuffers(n,renderbuffers) EEGLDebugStubFunc_glDeleteRenderbuffers(n,renderbuffers)
#define glDeleteShader(shader) EEGLDebugStubFunc_glDeleteShader(shader)
#define glDeleteTextures(n,textures) EEGLDebugStubFunc_glDeleteTextures(n,textures)
#define glDepthFunc(func) EEGLDebugStubFunc_glDepthFunc(func)
#define glDepthMask(flag) EEGLDebugStubFunc_glDepthMask(flag)
#define glDepthRangef(zNear,zFar) EEGLDebugStubFunc_glDepthRangef(zNear,zFar)
#define glDetachShader(program,shader) EEGLDebugStubFunc_glDetachShader(program,shader)
#define glDisable(cap) EEGLDebugStubFunc_glDisable(cap)
#define glDisableVertexAttribArray(index) EEGLDebugStubFunc_glDisableVertexAttribArray(index)
#define glDrawArrays(mode,first,count) EEGLDebugStubFunc_glDrawArrays(mode,first,count)
#define glDrawElements(mode,count,type,indices) EEGLDebugStubFunc_glDrawElements(mode,count,type,indices)
#define glEnable(cap) EEGLDebugStubFunc_glEnable(cap)
#define glEnableVertexAttribArray(index) EEGLDebugStubFunc_glEnableVertexAttribArray(index)
#define glFinish() EEGLDebugStubFunc_glFinish()
#define glFlush() EEGLDebugStubFunc_glFlush()
#define glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer) EEGLDebugStubFunc_glFramebufferRenderbuffer(target,attachment,renderbuffertarget,renderbuffer)
#define glFramebufferTexture2D(target,attachment,textarget,texture,level) EEGLDebugStubFunc_glFramebufferTexture2D(target,attachment,textarget,texture,level)
#define glFrontFace(mode) EEGLDebugStubFunc_glFrontFace(mode)
#define glGenBuffers(n,buffers) EEGLDebugStubFunc_glGenBuffers(n,buffers)
#define glGenerateMipmap(target) EEGLDebugStubFunc_glGenerateMipmap(target)
#define glGenFramebuffers(n,framebuffers) EEGLDebugStubFunc_glGenFramebuffers(n,framebuffers)
#define glGenRenderbuffers(n,renderbuffers) EEGLDebugStubFunc_glGenRenderbuffers(n,renderbuffers)
#define glGenTextures(n,textures) EEGLDebugStubFunc_glGenTextures(n,textures)
#define glGetActiveAttrib(program,index,bufsize,length,size,type,name) EEGLDebugStubFunc_glGetActiveAttrib(program,index,bufsize,length,size,type,name)
#define glGetActiveUniform(program,index,bufsize,length,size,type,name) EEGLDebugStubFunc_glGetActiveUniform(program,index,bufsize,length,size,type,name)
#define glGetAttachedShaders(program,maxcount,count,shaders) EEGLDebugStubFunc_glGetAttachedShaders(program,maxcount,count,shaders)
#define glGetAttribLocation(program,name) EEGLDebugStubFunc_glGetAttribLocation(program,name)
#define glGetBooleanv(pname,params) EEGLDebugStubFunc_glGetBooleanv(pname,params)
#define glGetBufferParameteriv(target,pname,params) EEGLDebugStubFunc_glGetBufferParameteriv(target,pname,params)
#define glGetError() EEGLDebugStubFunc_glGetError()
#define glGetFloatv(pname,params) EEGLDebugStubFunc_glGetFloatv(pname,params)
#define glGetFramebufferAttachmentParameteriv(target,attachment,pname,params) EEGLDebugStubFunc_glGetFramebufferAttachmentParameteriv(target,attachment,pname,params)
#define glGetIntegerv(pname,params) EEGLDebugStubFunc_glGetIntegerv(pname,params)
#define glGetProgramiv(program,pname,params) EEGLDebugStubFunc_glGetProgramiv(program,pname,params)
#define glGetProgramInfoLog(program,bufsize,length,infolog) EEGLDebugStubFunc_glGetProgramInfoLog(program,bufsize,length,infolog)
#define glGetRenderbufferParameteriv(target,pname,params) EEGLDebugStubFunc_glGetRenderbufferParameteriv(target,pname,params)
#define glGetShaderiv(shader,pname,params) EEGLDebugStubFunc_glGetShaderiv(shader,pname,params)
#define glGetShaderInfoLog(shader,bufsize,length,infolog) EEGLDebugStubFunc_glGetShaderInfoLog(shader,bufsize,length,infolog)
#define glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision) EEGLDebugStubFunc_glGetShaderPrecisionFormat(shadertype,precisiontype,range,precision)
#define glGetShaderSource(shader,bufsize,length,source) EEGLDebugStubFunc_glGetShaderSource(shader,bufsize,length,source)
#define glGetString(name) EEGLDebugStubFunc_glGetString(name)
#define glGetTexParameterfv(target,pname,params) EEGLDebugStubFunc_glGetTexParameterfv(target,pname,params)
#define glGetTexParameteriv(target,pname,params) EEGLDebugStubFunc_glGetTexParameteriv(target,pname,params)
#define glGetUniformfv(program,location,params) EEGLDebugStubFunc_glGetUniformfv(program,location,params)
#define glGetUniformiv(program,location,params) EEGLDebugStubFunc_glGetUniformiv(program,location,params)
#define glGetUniformLocation(program,name) EEGLDebugStubFunc_glGetUniformLocation(program,name)
#define glGetVertexAttribfv(index,pname,params) EEGLDebugStubFunc_glGetVertexAttribfv(index,pname,params)
#define glGetVertexAttribiv(index,pname,params) EEGLDebugStubFunc_glGetVertexAttribiv(index,pname,params)
#define glGetVertexAttribPointerv(index,pname,pointer) EEGLDebugStubFunc_glGetVertexAttribPointerv(index,pname,pointer)
#define glHint(target,mode) EEGLDebugStubFunc_glHint(target,mode)
#define glIsBuffer(buffer) EEGLDebugStubFunc_glIsBuffer(buffer)
#define glIsEnabled(cap) EEGLDebugStubFunc_glIsEnabled(cap)
#define glIsFramebuffer(framebuffer) EEGLDebugStubFunc_glIsFramebuffer(framebuffer)
#define glIsProgram(program) EEGLDebugStubFunc_glIsProgram(program)
#define glIsRenderbuffer(renderbuffer) EEGLDebugStubFunc_glIsRenderbuffer(renderbuffer)
#define glIsShader(shader) EEGLDebugStubFunc_glIsShader(shader)
#define glIsTexture(texture) EEGLDebugStubFunc_glIsTexture(texture)
#define glLineWidth(width) EEGLDebugStubFunc_glLineWidth(width)
#define glLinkProgram(program) EEGLDebugStubFunc_glLinkProgram(program)
#define glPixelStorei(pname,param) EEGLDebugStubFunc_glPixelStorei(pname,param)
#define glPolygonOffset(factor,units) EEGLDebugStubFunc_glPolygonOffset(factor,units)
#define glReadPixels(x,y,width,height,format,type,pixels) EEGLDebugStubFunc_glReadPixels(x,y,width,height,format,type,pixels)
#define glReleaseShaderCompiler() EEGLDebugStubFunc_glReleaseShaderCompiler()
#define glRenderbufferStorage(target,internalformat,width,height) EEGLDebugStubFunc_glRenderbufferStorage(target,internalformat,width,height)
#define glSampleCoverage(value,invert) EEGLDebugStubFunc_glSampleCoverage(value,invert)
#define glScissor(x,y,width,height) EEGLDebugStubFunc_glScissor(x,y,width,height)
#define glShaderBinary(n,shaders,binaryformat,binary,length) EEGLDebugStubFunc_glShaderBinary(n,shaders,binaryformat,binary,length)
#define glShaderSource(shader,count,string,length) EEGLDebugStubFunc_glShaderSource(shader,count,string,length)
#define glStencilFunc(func,ref,mask) EEGLDebugStubFunc_glStencilFunc(func,ref,mask)
#define glStencilFuncSeparate(face,func,ref,mask) EEGLDebugStubFunc_glStencilFuncSeparate(face,func,ref,mask)
#define glStencilMask(mask) EEGLDebugStubFunc_glStencilMask(mask)
#define glStencilMaskSeparate(face,mask) EEGLDebugStubFunc_glStencilMaskSeparate(face,mask)
#define glStencilOp(fail,zfail,zpass) EEGLDebugStubFunc_glStencilOp(fail,zfail,zpass)
#define glStencilOpSeparate(face,fail,zfail,zpass) EEGLDebugStubFunc_glStencilOpSeparate(face,fail,zfail,zpass)
#define glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels) EEGLDebugStubFunc_glTexImage2D(target,level,internalformat,width,height,border,format,type,pixels)
#define glTexParameterf(target,pname,param) EEGLDebugStubFunc_glTexParameterf(target,pname,param)
#define glTexParameterfv(target,pname,params) EEGLDebugStubFunc_glTexParameterfv(target,pname,params)
#define glTexParameteri(target,pname,param) EEGLDebugStubFunc_glTexParameteri(target,pname,param)
#define glTexParameteriv(target,pname,params) EEGLDebugStubFunc_glTexParameteriv(target,pname,params)
#define glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels) EEGLDebugStubFunc_glTexSubImage2D(target,level,xoffset,yoffset,width,height,format,type,pixels)
#define glUniform1f(location,x) EEGLDebugStubFunc_glUniform1f(location,x)
#define glUniform1fv(location,count,v) EEGLDebugStubFunc_glUniform1fv(location,count,v)
#define glUniform1i(location,x) EEGLDebugStubFunc_glUniform1i(location,x)
#define glUniform1iv(location,count,v) EEGLDebugStubFunc_glUniform1iv(location,count,v)
#define glUniform2f(location,x,y) EEGLDebugStubFunc_glUniform2f(location,x,y)
#define glUniform2fv(location,count,v) EEGLDebugStubFunc_glUniform2fv(location,count,v)
#define glUniform2i(location,x,y) EEGLDebugStubFunc_glUniform2i(location,x,y)
#define glUniform2iv(location,count,v) EEGLDebugStubFunc_glUniform2iv(location,count,v)
#define glUniform3f(location,x,y,z) EEGLDebugStubFunc_glUniform3f(location,x,y,z)
#define glUniform3fv(location,count,v) EEGLDebugStubFunc_glUniform3fv(location,count,v)
#define glUniform3i(location,x,y,z) EEGLDebugStubFunc_glUniform3i(location,x,y,z)
#define glUniform3iv(location,count,v) EEGLDebugStubFunc_glUniform3iv(location,count,v)
#define glUniform4f(location,x,y,z,w) EEGLDebugStubFunc_glUniform4f(location,x,y,z,w)
#define glUniform4fv(location,count,v) EEGLDebugStubFunc_glUniform4fv(location,count,v)
#define glUniform4i(location,x,y,z,w) EEGLDebugStubFunc_glUniform4i(location,x,y,z,w)
#define glUniform4iv(location,count,v) EEGLDebugStubFunc_glUniform4iv(location,count,v)
#define glUniformMatrix2fv(location,count,transpose,value) EEGLDebugStubFunc_glUniformMatrix2fv(location,count,transpose,value)
#define glUniformMatrix3fv(location,count,transpose,value) EEGLDebugStubFunc_glUniformMatrix3fv(location,count,transpose,value)
#define glUniformMatrix4fv(location,count,transpose,value) EEGLDebugStubFunc_glUniformMatrix4fv(location,count,transpose,value)
#define glUseProgram(program) EEGLDebugStubFunc_glUseProgram(program)
#define glValidateProgram(program) EEGLDebugStubFunc_glValidateProgram(program)
#define glVertexAttrib1f(indx,x) EEGLDebugStubFunc_glVertexAttrib1f(indx,x)
#define glVertexAttrib1fv(indx,values) EEGLDebugStubFunc_glVertexAttrib1fv(indx,values)
#define glVertexAttrib2f(indx,x,y) EEGLDebugStubFunc_glVertexAttrib2f(indx,x,y)
#define glVertexAttrib2fv(indx,values) EEGLDebugStubFunc_glVertexAttrib2fv(indx,values)
#define glVertexAttrib3f(indx,x,y,z) EEGLDebugStubFunc_glVertexAttrib3f(indx,x,y,z)
#define glVertexAttrib3fv(indx,values) EEGLDebugStubFunc_glVertexAttrib3fv(indx,values)
#define glVertexAttrib4f(indx,x,y,z,w) EEGLDebugStubFunc_glVertexAttrib4f(indx,x,y,z,w)
#define glVertexAttrib4fv(indx,values) EEGLDebugStubFunc_glVertexAttrib4fv(indx,values)
#define glVertexAttribPointer(indx,size,type,normalized,stride,ptr) EEGLDebugStubFunc_glVertexAttribPointer(indx,size,type,normalized,stride,ptr)
#define glViewport(x,y,width,height) EEGLDebugStubFunc_glViewport(x,y,width,height)
ee.py
Python
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
#
# based on idea:
# http://stackoverflow.com/questions/8424397/can-i-trigger-a-breakpoint-on-opengl-errors-in-xcode-4
#
 
f = open ('gl.h')
 
deflines = []
 
print '#define EEGL_DEBUG_STUB_FUNC_DECORATION'
print '#define EEGL_DEBUG_STUB_EXCEPT_ERROR'
print ''
 
for line in f:
isGLES = line.startswith('GL_API');
isGL = line.startswith('extern void');
if isGL or isGLES:
 
funcReturnType = ''
funcName = ''
argssExpr = ''
 
if isGLES:
p1 = line.split('GL_APIENTRY')
p1a = p1[0].split(' ')
funcReturnType = p1a[1].strip(' ')
 
p1b = p1[1].partition(' ')[2]
funcName = p1b.partition(' ')[0]
 
argstr = p1b.partition(' ')[2]
p2a = argstr.partition('(')[2]
argsExpr = p2a.partition(')')[0]
if isGL:
funcexpr = line.partition(' ')[2]
funcReturnType = funcexpr.partition(' ')[0]
funcName = funcexpr.partition(' ')[2].partition(' ')[0]
argsExpr = funcexpr.partition(' ')[2].partition(' ')[2].strip(' (')
argsExpr = argsExpr.partition(';')[0].strip(' )')
 
 
args = argsExpr.split(',')
argstr = ','.join(args)
argnames = []
 
for arg in args:
argType = arg.rpartition(' ')[0].strip(' ')
argName = arg.rpartition(' ')[2].strip(' ')
argnames.append(argName)
 
callargs = ','.join(argnames)
if callargs == 'void':
callargs = ''
 
shouldReturn = funcReturnType != 'void'
setret = ''
if shouldReturn:
setret = funcReturnType + ' R = '
retexp = ''
if shouldReturn:
retexp = 'return R;';
 
substname = 'EEGLDebugStubFunc_' + funcName
print 'EEGL_DEBUG_STUB_FUNC_DECORATION'
print funcReturnType + ' ' + substname + '(' + argstr + ')'
print '{'
print '\t' + setret + funcName + '(' + callargs + ');'
print '\t' + 'EEGL_DEBUG_STUB_EXCEPT_ERROR'
print '\t' + retexp;
print '}'
defline = '#define ' + funcName + '(' + callargs + ') ' + substname + '(' + callargs + ')'
deflines.append(defline)
 
for defline in deflines:
print defline

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.