danabr75-opengl 0.10.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +7 -0
  2. data/.autotest +29 -0
  3. data/.gemtest +0 -0
  4. data/.gitignore +6 -0
  5. data/.travis.yml +19 -0
  6. data/Gemfile +8 -0
  7. data/History.md +101 -0
  8. data/MIT-LICENSE +18 -0
  9. data/Manifest.txt +142 -0
  10. data/README.rdoc +105 -0
  11. data/Rakefile +170 -0
  12. data/danabr75-opengl.gemspec +32 -0
  13. data/examples/NeHe/NeHe.png +0 -0
  14. data/examples/NeHe/crate.png +0 -0
  15. data/examples/NeHe/glass.png +0 -0
  16. data/examples/NeHe/nehe_lesson02.rb +117 -0
  17. data/examples/NeHe/nehe_lesson03.rb +123 -0
  18. data/examples/NeHe/nehe_lesson04.rb +132 -0
  19. data/examples/NeHe/nehe_lesson05.rb +182 -0
  20. data/examples/NeHe/nehe_lesson06.rb +186 -0
  21. data/examples/NeHe/nehe_lesson07.rb +240 -0
  22. data/examples/NeHe/nehe_lesson08.rb +255 -0
  23. data/examples/NeHe/nehe_lesson09.rb +203 -0
  24. data/examples/NeHe/nehe_lesson11.rb +176 -0
  25. data/examples/NeHe/nehe_lesson12.rb +203 -0
  26. data/examples/NeHe/nehe_lesson16.rb +211 -0
  27. data/examples/NeHe/nehe_lesson19.rb +209 -0
  28. data/examples/NeHe/nehe_lesson36.rb +308 -0
  29. data/examples/NeHe/particle.png +0 -0
  30. data/examples/NeHe/star.png +0 -0
  31. data/examples/NeHe/tim.png +0 -0
  32. data/examples/OrangeBook/3Dlabs-License.txt +33 -0
  33. data/examples/OrangeBook/brick.frag +36 -0
  34. data/examples/OrangeBook/brick.rb +378 -0
  35. data/examples/OrangeBook/brick.vert +41 -0
  36. data/examples/OrangeBook/particle.frag +17 -0
  37. data/examples/OrangeBook/particle.rb +408 -0
  38. data/examples/OrangeBook/particle.vert +38 -0
  39. data/examples/README +16 -0
  40. data/examples/RedBook/aapoly.rb +143 -0
  41. data/examples/RedBook/aargb.rb +121 -0
  42. data/examples/RedBook/accanti.rb +164 -0
  43. data/examples/RedBook/accpersp.rb +217 -0
  44. data/examples/RedBook/alpha.rb +125 -0
  45. data/examples/RedBook/alpha3D.rb +160 -0
  46. data/examples/RedBook/bezcurve.rb +107 -0
  47. data/examples/RedBook/bezmesh.rb +139 -0
  48. data/examples/RedBook/checker.rb +126 -0
  49. data/examples/RedBook/clip.rb +97 -0
  50. data/examples/RedBook/colormat.rb +137 -0
  51. data/examples/RedBook/cube.rb +71 -0
  52. data/examples/RedBook/depthcue.rb +101 -0
  53. data/examples/RedBook/dof.rb +206 -0
  54. data/examples/RedBook/double.rb +107 -0
  55. data/examples/RedBook/drawf.rb +93 -0
  56. data/examples/RedBook/feedback.rb +147 -0
  57. data/examples/RedBook/fog.rb +168 -0
  58. data/examples/RedBook/font.rb +153 -0
  59. data/examples/RedBook/hello.rb +81 -0
  60. data/examples/RedBook/image.rb +139 -0
  61. data/examples/RedBook/jitter.rb +207 -0
  62. data/examples/RedBook/light.rb +157 -0
  63. data/examples/RedBook/lines.rb +130 -0
  64. data/examples/RedBook/list.rb +113 -0
  65. data/examples/RedBook/material.rb +276 -0
  66. data/examples/RedBook/mipmap.rb +158 -0
  67. data/examples/RedBook/model.rb +115 -0
  68. data/examples/RedBook/movelight.rb +134 -0
  69. data/examples/RedBook/pickdepth.rb +181 -0
  70. data/examples/RedBook/planet.rb +110 -0
  71. data/examples/RedBook/quadric.rb +160 -0
  72. data/examples/RedBook/robot.rb +117 -0
  73. data/examples/RedBook/select.rb +198 -0
  74. data/examples/RedBook/smooth.rb +97 -0
  75. data/examples/RedBook/stencil.rb +165 -0
  76. data/examples/RedBook/stroke.rb +169 -0
  77. data/examples/RedBook/surface.rb +168 -0
  78. data/examples/RedBook/teaambient.rb +134 -0
  79. data/examples/RedBook/teapots.rb +184 -0
  80. data/examples/RedBook/tess.rb +185 -0
  81. data/examples/RedBook/texbind.rb +149 -0
  82. data/examples/RedBook/texgen.rb +171 -0
  83. data/examples/RedBook/texturesurf.rb +130 -0
  84. data/examples/RedBook/varray.rb +161 -0
  85. data/examples/RedBook/wrap.rb +150 -0
  86. data/examples/misc/OGLBench.rb +338 -0
  87. data/examples/misc/anisotropic.rb +196 -0
  88. data/examples/misc/fbo_test.rb +357 -0
  89. data/examples/misc/font-glut.rb +47 -0
  90. data/examples/misc/glfwtest.rb +30 -0
  91. data/examples/misc/plane.rb +161 -0
  92. data/examples/misc/readpixel.rb +66 -0
  93. data/examples/misc/sdltest.rb +36 -0
  94. data/examples/misc/trislam.rb +829 -0
  95. data/ext/opengl/GL/gl.h +2115 -0
  96. data/ext/opengl/GL/glext.h +11770 -0
  97. data/ext/opengl/common.h +372 -0
  98. data/ext/opengl/conv.h +247 -0
  99. data/ext/opengl/extconf.rb +19 -0
  100. data/ext/opengl/fptr_struct.h +912 -0
  101. data/ext/opengl/funcdef.h +279 -0
  102. data/ext/opengl/gl-1.0-1.1.c +3345 -0
  103. data/ext/opengl/gl-1.2.c +155 -0
  104. data/ext/opengl/gl-1.3.c +447 -0
  105. data/ext/opengl/gl-1.4.c +346 -0
  106. data/ext/opengl/gl-1.5.c +225 -0
  107. data/ext/opengl/gl-2.0.c +665 -0
  108. data/ext/opengl/gl-2.1.c +57 -0
  109. data/ext/opengl/gl-3.0.c +502 -0
  110. data/ext/opengl/gl-enums.c +4853 -0
  111. data/ext/opengl/gl-enums.h +14528 -0
  112. data/ext/opengl/gl-error.c +110 -0
  113. data/ext/opengl/gl-error.h +25 -0
  114. data/ext/opengl/gl-ext-3dfx.c +27 -0
  115. data/ext/opengl/gl-ext-arb.c +880 -0
  116. data/ext/opengl/gl-ext-ati.c +41 -0
  117. data/ext/opengl/gl-ext-ext.c +885 -0
  118. data/ext/opengl/gl-ext-gremedy.c +41 -0
  119. data/ext/opengl/gl-ext-nv.c +679 -0
  120. data/ext/opengl/gl.c +265 -0
  121. data/ext/opengl/gl_buffer.c +202 -0
  122. data/ext/opengl/glimpl.c +187 -0
  123. data/ext/opengl/glimpl.h +47 -0
  124. data/ext/opengl/opengl.c +9 -0
  125. data/lib/gl.rb +1 -0
  126. data/lib/opengl.rb +79 -0
  127. data/lib/opengl/bindings_version.rb +4 -0
  128. data/lib/opengl/implementation.rb +38 -0
  129. data/lib/opengl/test_case.rb +86 -0
  130. data/test/dummy.xorg.conf +140 -0
  131. data/test/test_gl.rb +45 -0
  132. data/test/test_gl_10_11.rb +1363 -0
  133. data/test/test_gl_12.rb +71 -0
  134. data/test/test_gl_13.rb +221 -0
  135. data/test/test_gl_14.rb +218 -0
  136. data/test/test_gl_15.rb +258 -0
  137. data/test/test_gl_20.rb +417 -0
  138. data/test/test_gl_21.rb +436 -0
  139. data/test/test_gl_ext_arb.rb +508 -0
  140. data/test/test_gl_ext_ati.rb +28 -0
  141. data/test/test_gl_ext_ext.rb +608 -0
  142. data/test/test_gl_ext_gremedy.rb +29 -0
  143. data/test/test_gl_ext_nv.rb +349 -0
  144. data/test/test_glimpl.rb +23 -0
  145. data/test/test_opengl_buffer.rb +122 -0
  146. data/utils/README +6 -0
  147. data/utils/enumgen.rb +108 -0
  148. data/utils/extlistgen.rb +90 -0
  149. metadata +326 -0
@@ -0,0 +1,41 @@
1
+ /*
2
+ * Copyright (C) 2007 Jan Dvorak <jan.dvorak@kraxnet.cz>
3
+ *
4
+ * This program is distributed under the terms of the MIT license.
5
+ * See the included MIT-LICENSE file for the terms of this license.
6
+ *
7
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
11
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
12
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
13
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+ */
15
+
16
+ #include "common.h"
17
+
18
+ /* OpenGL ATI extensions */
19
+
20
+ /* #277 GL_ATI_draw_buffers */
21
+ static VALUE gl_DrawBuffersATI(VALUE obj,VALUE arg1)
22
+ {
23
+ GLsizei size;
24
+ GLenum *buffers;
25
+ DECL_GL_FUNC_PTR(GLvoid,glDrawBuffersATI,(GLsizei,const GLenum *));
26
+ LOAD_GL_FUNC(glDrawBuffersATI, "GL_ATI_draw_buffers");
27
+ Check_Type(arg1,T_ARRAY);
28
+ size = (GLsizei)RARRAY_LENINT(arg1);
29
+ buffers = ALLOC_N(GLenum,size);
30
+ ary2cuint(arg1,buffers,size);
31
+ fptr_glDrawBuffersATI(size,buffers);
32
+ xfree(buffers);
33
+ CHECK_GLERROR_FROM("glDrawBuffersATI");
34
+ return Qnil;
35
+ }
36
+
37
+ void gl_init_functions_ext_ati(VALUE klass)
38
+ {
39
+ /* #277 GL_ATI_draw_buffers */
40
+ rb_define_method(klass, "glDrawBuffersATI", gl_DrawBuffersATI, 1);
41
+ }
@@ -0,0 +1,885 @@
1
+ /*
2
+ * Copyright (C) 2007 Jan Dvorak <jan.dvorak@kraxnet.cz>
3
+ *
4
+ * This program is distributed under the terms of the MIT license.
5
+ * See the included MIT-LICENSE file for the terms of this license.
6
+ *
7
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
8
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
9
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
10
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
11
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
12
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
13
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
14
+ */
15
+
16
+ #include "common.h"
17
+
18
+ /* OpenGL EXT extensions */
19
+ /* Those are extensions that are not blessed by ARB committee but were
20
+ created or agreed upon by multiple vendors */
21
+
22
+ /* #2 - GL_EXT_blend_color */
23
+ GL_FUNC_LOAD_4(BlendColorEXT,GLvoid, GLclampf,GLclampf,GLclampf,GLclampf, "GL_EXT_blend_color")
24
+
25
+ /* #3 - GL_EXT_polygon_offset */
26
+ GL_FUNC_LOAD_2(PolygonOffsetEXT,GLvoid, GLfloat,GLfloat, "GL_EXT_polygon_offset")
27
+
28
+ /* #20 - GL_EXT_texture_object */
29
+ GL_FUNC_GENOBJECTS_LOAD(GenTexturesEXT,"GL_EXT_texture_object")
30
+ GL_FUNC_DELETEOBJECTS_LOAD(DeleteTexturesEXT,"GL_EXT_texture_object")
31
+ GL_FUNC_LOAD_2(BindTextureEXT,GLvoid, GLenum,GLint, "GL_EXT_texture_object")
32
+
33
+ static VALUE
34
+ gl_PrioritizeTexturesEXT(obj,arg1,arg2)
35
+ VALUE obj,arg1,arg2;
36
+ {
37
+ GLuint *textures;
38
+ GLclampf *priorities;
39
+ GLsizei size;
40
+ DECL_GL_FUNC_PTR(GLvoid,glPrioritizeTexturesEXT,(GLsizei,const GLuint *,const GLclampf *));
41
+ LOAD_GL_FUNC(glPrioritizeTexturesEXT, "GL_EXT_texture_object");
42
+ Check_Type(arg1,T_ARRAY);
43
+ Check_Type(arg2,T_ARRAY);
44
+ if ((size = (GLsizei)RARRAY_LENINT(arg1)) != (GLsizei)RARRAY_LENINT(arg2))
45
+ rb_raise(rb_eArgError, "passed arrays must have the same length");
46
+ textures = ALLOC_N(GLuint,size);
47
+ priorities = ALLOC_N(GLclampf,size);
48
+ ary2cuint(arg1,textures,size);
49
+ ary2cflt(arg2,priorities,size);
50
+ fptr_glPrioritizeTexturesEXT(size,textures,priorities);
51
+ xfree(textures);
52
+ xfree(priorities);
53
+ CHECK_GLERROR_FROM("glPrioritizeTexturesEXT");
54
+ return Qnil;
55
+ }
56
+
57
+ static VALUE
58
+ gl_AreTexturesResidentEXT(obj,arg1)
59
+ VALUE obj,arg1;
60
+ {
61
+ GLuint *textures;
62
+ GLboolean *residences;
63
+ GLsizei size;
64
+ GLboolean r;
65
+ VALUE retary;
66
+ VALUE ary;
67
+ int i;
68
+ DECL_GL_FUNC_PTR(GLboolean,glAreTexturesResidentEXT,(GLsizei,const GLuint *,GLboolean *));
69
+ LOAD_GL_FUNC(glAreTexturesResidentEXT, "GL_EXT_texture_object");
70
+ ary = rb_Array(arg1);
71
+ size = (GLsizei)RARRAY_LENINT(ary);
72
+ textures = ALLOC_N(GLuint,size);
73
+ residences = ALLOC_N(GLboolean,size);
74
+ ary2cuint(ary,textures,size);
75
+ r = fptr_glAreTexturesResidentEXT(size,textures,residences);
76
+ retary = rb_ary_new2(size);
77
+ if (r==GL_TRUE) { /* all are resident */
78
+ for(i=0;i<size;i++)
79
+ rb_ary_push(retary, GLBOOL2RUBY(GL_TRUE));
80
+ } else {
81
+ for(i=0;i<size;i++)
82
+ rb_ary_push(retary, GLBOOL2RUBY(residences[i]));
83
+ }
84
+ xfree(textures);
85
+ xfree(residences);
86
+ CHECK_GLERROR_FROM("glAreTexturesResidentEXT");
87
+ return retary;
88
+ }
89
+
90
+ GL_FUNC_LOAD_1(IsTextureEXT,GLboolean, GLuint, "GL_EXT_texture_object")
91
+
92
+ /* #37 - GL_EXT_blend_minmax */
93
+ GL_FUNC_LOAD_1(BlendEquationEXT,GLvoid, GLenum, "GL_EXT_blend_minmax")
94
+
95
+ /* #54 - GL_EXT_point_parameters */
96
+ GL_FUNC_LOAD_2(PointParameterfEXT,GLvoid, GLenum,GLfloat, "GL_EXT_point_parameters")
97
+
98
+ static VALUE gl_PointParameterfvEXT(VALUE obj,VALUE arg1,VALUE arg2)
99
+ {
100
+ GLfloat params[3] = {(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0};
101
+ GLenum pname;
102
+ GLint size;
103
+ DECL_GL_FUNC_PTR(GLvoid,glPointParameterfvEXT,(GLenum,GLfloat *));
104
+ LOAD_GL_FUNC(glPointParameterfvEXT, "GL_EXT_point_parameters");
105
+ pname = NUM2UINT(arg1);
106
+ Check_Type(arg2,T_ARRAY);
107
+ if (pname==GL_POINT_DISTANCE_ATTENUATION)
108
+ size = 3;
109
+ else
110
+ size = 1;
111
+ ary2cflt(arg2,params,size);
112
+ fptr_glPointParameterfvEXT(pname,params);
113
+ CHECK_GLERROR_FROM("glPointParameterfvEXT");
114
+ return Qnil;
115
+ }
116
+
117
+ /* #145 - GL_EXT_secondary_color */
118
+ GL_FUNC_LOAD_3(SecondaryColor3bEXT,GLvoid, GLbyte,GLbyte,GLbyte, "GL_EXT_secondary_color")
119
+ GL_FUNC_LOAD_3(SecondaryColor3sEXT,GLvoid, GLshort,GLshort,GLshort, "GL_EXT_secondary_color")
120
+ GL_FUNC_LOAD_3(SecondaryColor3iEXT,GLvoid, GLint,GLint,GLint, "GL_EXT_secondary_color")
121
+ GL_FUNC_LOAD_3(SecondaryColor3fEXT,GLvoid, GLfloat,GLfloat,GLfloat, "GL_EXT_secondary_color")
122
+ GL_FUNC_LOAD_3(SecondaryColor3dEXT,GLvoid, GLdouble,GLdouble,GLdouble, "GL_EXT_secondary_color")
123
+ GL_FUNC_LOAD_3(SecondaryColor3ubEXT,GLvoid, GLubyte,GLubyte,GLubyte, "GL_EXT_secondary_color")
124
+ GL_FUNC_LOAD_3(SecondaryColor3usEXT,GLvoid, GLushort,GLushort,GLushort, "GL_EXT_secondary_color")
125
+ GL_FUNC_LOAD_3(SecondaryColor3uiEXT,GLvoid, GLuint,GLuint,GLuint, "GL_EXT_secondary_color")
126
+
127
+ #define GLSECONDARYCOLOREXT_VFUNC(_name_,_type_,_conv_) \
128
+ VALUE gl_##_name_(VALUE obj,VALUE arg1) \
129
+ { \
130
+ _type_ cary[3] = {0,0,0}; \
131
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(_type_ *)); \
132
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_secondary_color"); \
133
+ Check_Type(arg1,T_ARRAY); \
134
+ _conv_(arg1,cary,3); \
135
+ fptr_gl##_name_(cary); \
136
+ CHECK_GLERROR_FROM("gl" #_name_); \
137
+ return Qnil; \
138
+ }
139
+
140
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3bvEXT,GLbyte,ary2cbyte)
141
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3dvEXT,GLdouble,ary2cdbl)
142
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3fvEXT,GLfloat,ary2cflt)
143
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3ivEXT,GLint,ary2cint)
144
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3svEXT,GLshort,ary2cshort)
145
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3uivEXT,GLuint,ary2cuint)
146
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3ubvEXT,GLubyte,ary2cubyte)
147
+ GLSECONDARYCOLOREXT_VFUNC(SecondaryColor3usvEXT,GLushort,ary2cushort)
148
+ #undef GLSECONDARYCOLOREXT_VFUNC
149
+
150
+ static VALUE
151
+ gl_SecondaryColorPointerEXT(obj,arg1,arg2,arg3,arg4)
152
+ VALUE obj,arg1,arg2,arg3,arg4;
153
+ {
154
+ GLint size;
155
+ GLenum type;
156
+ GLsizei stride;
157
+ DECL_GL_FUNC_PTR(GLvoid,glSecondaryColorPointerEXT,(GLint,GLenum,GLsizei,const GLvoid *));
158
+ LOAD_GL_FUNC(glSecondaryColorPointerEXT, "GL_EXT_secondary_color");
159
+ size = (GLint)NUM2INT(arg1);
160
+ type = (GLenum)NUM2INT(arg2);
161
+ stride = (GLsizei)NUM2UINT(arg3);
162
+ if (CHECK_BUFFER_BINDING(GL_ARRAY_BUFFER_BINDING)) {
163
+ SET_GLIMPL_VARIABLE(SecondaryColor_ptr, arg4);
164
+ fptr_glSecondaryColorPointerEXT(size,type, stride, (const GLvoid*)NUM2SIZET(arg4));
165
+ } else {
166
+ VALUE data;
167
+ data = pack_array_or_pass_string(type,arg4);
168
+ rb_str_freeze(data);
169
+ SET_GLIMPL_VARIABLE(SecondaryColor_ptr, data);
170
+ fptr_glSecondaryColorPointerEXT(size,type, stride, (const GLvoid*)RSTRING_PTR(data));
171
+ }
172
+ CHECK_GLERROR_FROM("glSecondaryColorPointerEXT");
173
+ return Qnil;
174
+ }
175
+
176
+ /* #97 - GL_EXT_compiled_vertex_array */
177
+ GL_FUNC_LOAD_2(LockArraysEXT,GLvoid, GLint,GLint, "GL_EXT_compiled_vertex_array")
178
+ GL_FUNC_LOAD_0(UnlockArraysEXT,GLvoid, "GL_EXT_compiled_vertex_array")
179
+
180
+ /* #112 - GL_EXT_draw_range_elements */
181
+ static VALUE
182
+ gl_DrawRangeElementsEXT(obj,arg1,arg2,arg3,arg4,arg5,arg6)
183
+ VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6;
184
+ {
185
+ GLenum mode;
186
+ GLuint start;
187
+ GLuint end;
188
+ GLsizei count;
189
+ GLenum type;
190
+ DECL_GL_FUNC_PTR(GLvoid,glDrawRangeElementsEXT,(GLenum,GLuint,GLuint,GLsizei,GLenum,GLvoid*));
191
+ LOAD_GL_FUNC(glDrawRangeElementsEXT, "GL_EXT_draw_range_elements");
192
+ mode = (GLenum)NUM2INT(arg1);
193
+ start = (GLuint)NUM2UINT(arg2);
194
+ end = (GLuint)NUM2UINT(arg3);
195
+ count = (GLsizei)NUM2UINT(arg4);
196
+ type = (GLenum)NUM2INT(arg5);
197
+ if (CHECK_BUFFER_BINDING(GL_ELEMENT_ARRAY_BUFFER_BINDING)) {
198
+ fptr_glDrawRangeElementsEXT(mode, start, end, count, type, (GLvoid *)NUM2SIZET(arg6));
199
+ } else {
200
+ VALUE data;
201
+ data = pack_array_or_pass_string(type,arg6);
202
+ fptr_glDrawRangeElementsEXT(mode, start, end, count, type, RSTRING_PTR(data));
203
+ }
204
+ CHECK_GLERROR_FROM("glDrawRangeElementsEXT");
205
+ return Qnil;
206
+ }
207
+
208
+ /* #148 - GL_EXT_multi_draw_arrays */
209
+ static VALUE
210
+ gl_MultiDrawArraysEXT(obj,arg1,arg2,arg3)
211
+ VALUE obj,arg1,arg2,arg3;
212
+ {
213
+ GLenum mode;
214
+ GLint *ary1;
215
+ GLsizei *ary2;
216
+ int len1,len2;
217
+ DECL_GL_FUNC_PTR(GLvoid,glMultiDrawArraysEXT,(GLenum,GLint*,GLsizei*,GLsizei));
218
+ LOAD_GL_FUNC(glMultiDrawArraysEXT, "GL_EXT_multi_draw_arrays");
219
+ len1 = (int)RARRAY_LENINT(arg2);
220
+ len2 = (int)RARRAY_LENINT(arg3);
221
+ if (len1!=len2)
222
+ rb_raise(rb_eArgError, "Passed arrays must have same length");
223
+ mode = (GLenum)NUM2INT(arg1);
224
+ ary1 = ALLOC_N(GLint,len1);
225
+ ary2 = ALLOC_N(GLsizei,len2);
226
+ ary2cint(arg2,ary1,len1);
227
+ ary2cint(arg3,ary2,len2);
228
+ fptr_glMultiDrawArraysEXT(mode,ary1,ary2,len1);
229
+ xfree(ary1);
230
+ xfree(ary2);
231
+ CHECK_GLERROR_FROM("glMultiDrawArraysEXT");
232
+ return Qnil;
233
+ }
234
+
235
+ static VALUE
236
+ gl_MultiDrawElementsEXT(argc,argv,obj)
237
+ int argc;
238
+ VALUE *argv;
239
+ VALUE obj;
240
+ {
241
+ GLenum mode;
242
+ GLenum type;
243
+ GLsizei *counts;
244
+ GLvoid **indices;
245
+ GLint size;
246
+ int i;
247
+ VALUE ary, args[4];
248
+ DECL_GL_FUNC_PTR(GLvoid,glMultiDrawElementsEXT,(GLenum,const GLsizei *,GLenum,GLvoid **,GLsizei));
249
+ LOAD_GL_FUNC(glMultiDrawElementsEXT, "GL_EXT_multi_draw_arrays");
250
+ switch (rb_scan_args(argc, argv, "31", &args[0], &args[1], &args[2],&args[3])) {
251
+ default:
252
+ case 3:
253
+ if (CHECK_BUFFER_BINDING(GL_ELEMENT_ARRAY_BUFFER_BINDING))
254
+ rb_raise(rb_eArgError, "Element array buffer bound, but offsets array missing");
255
+ mode = (GLenum)NUM2INT(args[0]);
256
+ type = (GLenum)NUM2INT(args[1]);
257
+ Check_Type(args[2],T_ARRAY);
258
+ ary = args[2];
259
+ size = (GLsizei)RARRAY_LENINT(ary);
260
+ counts = ALLOC_N(GLsizei,size);
261
+ indices = ALLOC_N(GLvoid*,size);
262
+ for (i=0;i<size;i++) {
263
+ VALUE data;
264
+ data = pack_array_or_pass_string(type,RARRAY_PTR(ary)[i]);
265
+
266
+ indices[i] = RSTRING_PTR(data);
267
+ counts[i] = (GLsizei)RSTRING_LENINT(data);
268
+ }
269
+ fptr_glMultiDrawElementsEXT(mode,counts,type,indices,size);
270
+ xfree(counts);
271
+ xfree(indices);
272
+ break;
273
+ case 4:
274
+ if (!CHECK_BUFFER_BINDING(GL_ELEMENT_ARRAY_BUFFER_BINDING))
275
+ rb_raise(rb_eArgError, "Element array buffer not bound");
276
+ mode = (GLenum)NUM2INT(args[0]);
277
+ type = (GLenum)NUM2INT(args[1]);
278
+ Check_Type(args[2],T_ARRAY);
279
+ Check_Type(args[3],T_ARRAY);
280
+ if (RARRAY_LEN(args[2]) != RARRAY_LEN(args[3]))
281
+ rb_raise(rb_eArgError, "Count and indices offset array must have same length");
282
+
283
+ size = (GLsizei)RARRAY_LENINT(args[2]);
284
+
285
+ counts = ALLOC_N(GLsizei,size);
286
+ indices = ALLOC_N(GLvoid*,size);
287
+ for (i=0;i<size;i++) {
288
+ counts[i] = NUM2INT(rb_ary_entry(args[2],i));
289
+ indices[i] = (GLvoid *)NUM2SIZET(rb_ary_entry(args[3],i));
290
+ }
291
+ fptr_glMultiDrawElementsEXT(mode,counts,type,indices,size);
292
+ xfree(counts);
293
+ xfree(indices);
294
+ break;
295
+ }
296
+ CHECK_GLERROR_FROM("glMultiDrawElementsEXT");
297
+ return Qnil;
298
+ }
299
+
300
+ /* #149 - GL_EXT_fog_coord */
301
+ GL_FUNC_LOAD_1(FogCoordfEXT,GLvoid, GLfloat, "GL_EXT_fog_coord")
302
+ GL_FUNC_LOAD_1(FogCoorddEXT,GLvoid, GLdouble, "GL_EXT_fog_coord")
303
+
304
+ #define GLFOGCOORD_VFUNC(_name_,_type_,_conv_) \
305
+ VALUE gl_##_name_(VALUE obj,VALUE arg1) \
306
+ { \
307
+ _type_ cary = 0; \
308
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(_type_ *)); \
309
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_secondary_color"); \
310
+ Check_Type(arg1,T_ARRAY); \
311
+ _conv_(arg1,&cary,1); \
312
+ fptr_gl##_name_(&cary); \
313
+ CHECK_GLERROR_FROM("gl" #_name_); \
314
+ return Qnil; \
315
+ }
316
+ GLFOGCOORD_VFUNC(FogCoordfvEXT,GLfloat,ary2cflt)
317
+ GLFOGCOORD_VFUNC(FogCoorddvEXT,GLdouble,ary2cdbl)
318
+ #undef GLFOGCOORD_VFUNC
319
+
320
+ static VALUE
321
+ gl_FogCoordPointerEXT(obj,arg1,arg2,arg3)
322
+ VALUE obj,arg1,arg2,arg3;
323
+ {
324
+ GLenum type;
325
+ GLsizei stride;
326
+ DECL_GL_FUNC_PTR(GLvoid,glFogCoordPointerEXT,(GLenum,GLsizei,const GLvoid *));
327
+ LOAD_GL_FUNC(glFogCoordPointerEXT, "GL_EXT_secondary_color");
328
+ type = (GLenum)NUM2INT(arg1);
329
+ stride = (GLsizei)NUM2UINT(arg2);
330
+ if (CHECK_BUFFER_BINDING(GL_ARRAY_BUFFER_BINDING)) {
331
+ SET_GLIMPL_VARIABLE(FogCoord_ptr, arg3);
332
+ fptr_glFogCoordPointerEXT(type, stride, (const GLvoid*)NUM2SIZET(arg3));
333
+ } else {
334
+ VALUE data;
335
+ data = pack_array_or_pass_string(type,arg3);
336
+ rb_str_freeze(data);
337
+ SET_GLIMPL_VARIABLE(FogCoord_ptr, data);
338
+ fptr_glFogCoordPointerEXT(type, stride, (const GLvoid*)RSTRING_PTR(data));
339
+ }
340
+ CHECK_GLERROR_FROM("glFogCoordPointerEXT");
341
+ return Qnil;
342
+ }
343
+
344
+ /* #173 - GL_EXT_blend_func_separate */
345
+ GL_FUNC_LOAD_4(BlendFuncSeparateEXT,GLvoid, GLenum,GLenum,GLenum,GLenum, "GL_EXT_blend_func_separate")
346
+
347
+ /* #268 - GL_EXT_stencil_two_side */
348
+ GL_FUNC_LOAD_1(ActiveStencilFaceEXT,GLvoid, GLenum, "GL_EXT_stencil_two_side")
349
+
350
+ /* #297 - GL_EXT_depth_bounds_test */
351
+ GL_FUNC_LOAD_2(DepthBoundsEXT,GLvoid, GLclampd,GLclampd, "GL_EXT_depth_bounds_test")
352
+
353
+ /* #299 - GL_EXT_blend_equation_separate */
354
+ GL_FUNC_LOAD_2(BlendEquationSeparateEXT,GLvoid, GLenum,GLenum, "GL_EXT_blend_equation_separate")
355
+
356
+ /* #310 - GL_EXT_framebuffer_object */
357
+ GL_FUNC_LOAD_1(IsRenderbufferEXT,GLboolean, GLuint, "GL_EXT_framebuffer_object")
358
+ GL_FUNC_LOAD_2(BindRenderbufferEXT,GLvoid, GLenum,GLuint, "GL_EXT_framebuffer_object")
359
+ GL_FUNC_LOAD_4(RenderbufferStorageEXT,GLvoid, GLenum,GLenum,GLsizei,GLsizei, "GL_EXT_framebuffer_object")
360
+ GL_FUNC_GENOBJECTS_LOAD(GenRenderbuffersEXT,"GL_EXT_framebuffer_object")
361
+ GL_FUNC_DELETEOBJECTS_LOAD(DeleteRenderbuffersEXT,"GL_EXT_framebuffer_object")
362
+
363
+ static VALUE gl_GetRenderbufferParameterivEXT(VALUE obj,VALUE arg1,VALUE arg2)
364
+ {
365
+ GLint param = 0;
366
+ DECL_GL_FUNC_PTR(GLvoid,glGetRenderbufferParameterivEXT,(GLenum,GLenum,GLint *));
367
+ LOAD_GL_FUNC(glGetRenderbufferParameterivEXT, "GL_EXT_framebuffer_object");
368
+ fptr_glGetRenderbufferParameterivEXT(NUM2UINT(arg1),NUM2UINT(arg2),&param);
369
+ CHECK_GLERROR_FROM("glGetRenderbufferParameterivEXT");
370
+ return INT2NUM(param);
371
+ }
372
+
373
+ GL_FUNC_GENOBJECTS_LOAD(GenFramebuffersEXT,"GL_EXT_framebuffer_object")
374
+ GL_FUNC_DELETEOBJECTS_LOAD(DeleteFramebuffersEXT,"GL_EXT_framebuffer_object")
375
+ GL_FUNC_LOAD_1(IsFramebufferEXT,GLboolean, GLuint, "GL_EXT_framebuffer_object")
376
+ GL_FUNC_LOAD_2(BindFramebufferEXT,GLvoid, GLenum,GLuint, "GL_EXT_framebuffer_object")
377
+ GL_FUNC_LOAD_1(CheckFramebufferStatusEXT,GLenum, GLenum, "GL_EXT_framebuffer_object")
378
+ GL_FUNC_LOAD_5(FramebufferTexture1DEXT,GLvoid, GLenum,GLenum,GLenum,GLuint,GLint, "GL_EXT_framebuffer_object")
379
+ GL_FUNC_LOAD_5(FramebufferTexture2DEXT,GLvoid, GLenum,GLenum,GLenum,GLuint,GLint, "GL_EXT_framebuffer_object")
380
+ GL_FUNC_LOAD_6(FramebufferTexture3DEXT,GLvoid, GLenum,GLenum,GLenum,GLuint,GLint,GLint, "GL_EXT_framebuffer_object")
381
+
382
+ GL_FUNC_LOAD_4(FramebufferRenderbufferEXT,GLvoid, GLuint,GLuint,GLuint,GLuint, "GL_EXT_framebuffer_object")
383
+
384
+ static VALUE gl_GetFramebufferAttachmentParameterivEXT(VALUE obj,VALUE arg1, VALUE arg2, VALUE arg3)
385
+ {
386
+ GLint ret = 0;
387
+ DECL_GL_FUNC_PTR(GLvoid,glGetFramebufferAttachmentParameterivEXT,(GLenum,GLenum,GLenum,GLint *));
388
+ LOAD_GL_FUNC(glGetFramebufferAttachmentParameterivEXT, "GL_EXT_framebuffer_object");
389
+ fptr_glGetFramebufferAttachmentParameterivEXT(NUM2UINT(arg1),NUM2UINT(arg2),NUM2UINT(arg3),&ret);
390
+ CHECK_GLERROR_FROM("glGetFramebufferAttachmentParameterivEXT");
391
+ return cond_GLBOOL2RUBY(NUM2UINT(arg3),ret);
392
+ }
393
+
394
+ GL_FUNC_LOAD_1(GenerateMipmapEXT,GLvoid, GLenum, "GL_EXT_framebuffer_object")
395
+
396
+ /* #314 - GL_EXT_stencil_clear_tag */
397
+ GL_FUNC_LOAD_2(StencilClearTagEXT,GLvoid, GLsizei,GLuint, "GL_EXT_stencil_clear_tag")
398
+
399
+ /* #316 - GL_EXT_framebuffer_blit */
400
+ GL_FUNC_LOAD_10(BlitFramebufferEXT,GLvoid, GLint,GLint,GLint,GLint,GLint,GLint,GLint,GLint,GLbitfield,GLenum, "GL_EXT_framebuffer_blit")
401
+
402
+ /* #317 - GL_EXT_framebuffer_multisample */
403
+ GL_FUNC_LOAD_5(RenderbufferStorageMultisampleEXT,GLvoid, GLenum,GLsizei,GLenum,GLsizei,GLsizei, "GL_EXT_framebuffer_multisample")
404
+
405
+ /* #319 - GL_EXT_timer_query */
406
+
407
+ #define GETQUERY_FUNC(_name_,_type_,_conv_) \
408
+ static VALUE gl_##_name_(VALUE obj,VALUE arg1,VALUE arg2) \
409
+ { \
410
+ _type_ ret = 0; \
411
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLuint,GLenum,_type_ *)); \
412
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_timer_query"); \
413
+ fptr_gl##_name_(NUM2INT(arg1),NUM2INT(arg2),&ret); \
414
+ CHECK_GLERROR_FROM("gl" #_name_); \
415
+ return _conv_(NUM2INT(arg2),ret); \
416
+ }
417
+
418
+ GETQUERY_FUNC(GetQueryObjecti64vEXT,GLint64,cond_GLBOOL2RUBY_LL)
419
+ GETQUERY_FUNC(GetQueryObjectui64vEXT,GLuint64,cond_GLBOOL2RUBY_ULL)
420
+ #undef GETQUERY_FUNC
421
+
422
+
423
+ /* #320 - GL_EXT_gpu_program_parameters */
424
+ #define PROGRAMPARAM_MULTI_FUNC_V(_name_,_type_,_conv_,_extension_) \
425
+ static VALUE \
426
+ gl_##_name_(obj,arg1,arg2,arg3) \
427
+ VALUE obj,arg1,arg2,arg3; \
428
+ { \
429
+ _type_ *cary; \
430
+ GLsizei len; \
431
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLenum,GLuint,GLsizei,const _type_ *)); \
432
+ LOAD_GL_FUNC(gl##_name_, _extension_); \
433
+ len = (GLsizei)RARRAY_LENINT(rb_Array(arg3)); \
434
+ if (len<=0 || (len % 4) != 0) \
435
+ rb_raise(rb_eArgError, "Parameter array size must be multiplication of 4"); \
436
+ cary = ALLOC_N(_type_,len); \
437
+ _conv_(arg3,cary,len); \
438
+ fptr_gl##_name_((GLenum)NUM2UINT(arg1),(GLuint)NUM2UINT(arg2),len / 4, cary); \
439
+ xfree(cary); \
440
+ CHECK_GLERROR_FROM("gl" #_name_); \
441
+ return Qnil; \
442
+ }
443
+
444
+ PROGRAMPARAM_MULTI_FUNC_V(ProgramEnvParameters4fvEXT,GLfloat,ary2cflt,"GL_EXT_gpu_program_parameters")
445
+ PROGRAMPARAM_MULTI_FUNC_V(ProgramLocalParameters4fvEXT,GLfloat,ary2cflt,"GL_EXT_gpu_program_parameters")
446
+ #undef PROGRAMPARAM_MULTI_FUNC_V
447
+
448
+ /* #324 - GL_EXT_geometry_shader4 */
449
+ GL_FUNC_LOAD_3(ProgramParameteriEXT,GLvoid, GLuint,GLenum,GLint, "GL_EXT_geometry_shader4")
450
+
451
+ /* #326 - GL_EXT_gpu_shader4 */
452
+ GL_FUNC_LOAD_2(VertexAttribI1iEXT,GLvoid, GLuint,GLint, "GL_EXT_gpu_shader4")
453
+ GL_FUNC_LOAD_3(VertexAttribI2iEXT,GLvoid, GLuint,GLint,GLint, "GL_EXT_gpu_shader4")
454
+ GL_FUNC_LOAD_4(VertexAttribI3iEXT,GLvoid, GLuint,GLint,GLint,GLint, "GL_EXT_gpu_shader4")
455
+ GL_FUNC_LOAD_5(VertexAttribI4iEXT,GLvoid, GLuint,GLint,GLint,GLint,GLint, "GL_EXT_gpu_shader4")
456
+ GL_FUNC_LOAD_2(VertexAttribI1uiEXT,GLvoid, GLuint,GLuint, "GL_EXT_gpu_shader4")
457
+ GL_FUNC_LOAD_3(VertexAttribI2uiEXT,GLvoid, GLuint,GLuint,GLuint, "GL_EXT_gpu_shader4")
458
+ GL_FUNC_LOAD_4(VertexAttribI3uiEXT,GLvoid, GLuint,GLuint,GLuint,GLuint, "GL_EXT_gpu_shader4")
459
+ GL_FUNC_LOAD_5(VertexAttribI4uiEXT,GLvoid, GLuint,GLuint,GLuint,GLuint,GLuint, "GL_EXT_gpu_shader4")
460
+
461
+ #define GLVERTEXATTRIB_VFUNC(_name_,_type_,_conv_,_size_) \
462
+ static VALUE \
463
+ gl_##_name_(obj,arg1,arg2) \
464
+ VALUE obj,arg1,arg2; \
465
+ { \
466
+ _type_ value[_size_]; \
467
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLuint,const _type_ *)); \
468
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_gpu_shader4"); \
469
+ _conv_(arg2,value,_size_); \
470
+ fptr_gl##_name_(NUM2UINT(arg1),value); \
471
+ CHECK_GLERROR_FROM("gl" #_name_); \
472
+ return Qnil; \
473
+ }
474
+
475
+ GLVERTEXATTRIB_VFUNC(VertexAttribI1ivEXT,GLint,ary2cint,1)
476
+ GLVERTEXATTRIB_VFUNC(VertexAttribI2ivEXT,GLint,ary2cint,2)
477
+ GLVERTEXATTRIB_VFUNC(VertexAttribI3ivEXT,GLint,ary2cint,3)
478
+ GLVERTEXATTRIB_VFUNC(VertexAttribI4ivEXT,GLint,ary2cint,4)
479
+ GLVERTEXATTRIB_VFUNC(VertexAttribI1uivEXT,GLuint,ary2cuint,1)
480
+ GLVERTEXATTRIB_VFUNC(VertexAttribI2uivEXT,GLuint,ary2cuint,2)
481
+ GLVERTEXATTRIB_VFUNC(VertexAttribI3uivEXT,GLuint,ary2cuint,3)
482
+ GLVERTEXATTRIB_VFUNC(VertexAttribI4uivEXT,GLuint,ary2cuint,4)
483
+ GLVERTEXATTRIB_VFUNC(VertexAttribI4bvEXT,GLbyte,ary2cbyte,4)
484
+ GLVERTEXATTRIB_VFUNC(VertexAttribI4svEXT,GLshort,ary2cshort,4)
485
+ GLVERTEXATTRIB_VFUNC(VertexAttribI4ubvEXT,GLubyte,ary2cubyte,4)
486
+ GLVERTEXATTRIB_VFUNC(VertexAttribI4usvEXT,GLushort,ary2cushort,4)
487
+ #undef GLVERTEXATTRIB_VFUNC
488
+
489
+ #define GETVERTEXATTRIB_FUNC(_name_,_type_,_conv_,_extension_) \
490
+ static VALUE \
491
+ gl_##_name_(obj,arg1,arg2) \
492
+ VALUE obj,arg1,arg2; \
493
+ { \
494
+ GLuint index; \
495
+ GLenum pname; \
496
+ _type_ params[4] = {0,0,0,0}; \
497
+ GLint size; \
498
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLuint,GLenum,_type_ *)); \
499
+ LOAD_GL_FUNC(gl##_name_, _extension_); \
500
+ index = (GLuint)NUM2UINT(arg1); \
501
+ pname = (GLenum)NUM2INT(arg2); \
502
+ if (pname==GL_CURRENT_VERTEX_ATTRIB_ARB) \
503
+ size = 4; \
504
+ else \
505
+ size = 1; \
506
+ fptr_gl##_name_(index,pname,params); \
507
+ RET_ARRAY_OR_SINGLE_BOOL("gl" #_name_, size, _conv_, pname, params); \
508
+ }
509
+
510
+ GETVERTEXATTRIB_FUNC(GetVertexAttribIivEXT,GLint,cond_GLBOOL2RUBY,"GL_EXT_gpu_shader4")
511
+ GETVERTEXATTRIB_FUNC(GetVertexAttribIuivEXT,GLuint,cond_GLBOOL2RUBY_U,"GL_EXT_gpu_shader4")
512
+ #undef GETVERTEXATTRIB_FUNC
513
+
514
+ static VALUE gl_VertexAttribIPointerEXT(VALUE obj,VALUE arg1,VALUE arg2,VALUE arg3,VALUE arg4,VALUE arg5)
515
+ {
516
+ GLuint index;
517
+ GLuint size;
518
+ GLenum type;
519
+ GLsizei stride;
520
+
521
+ DECL_GL_FUNC_PTR(GLvoid,glVertexAttribIPointerEXT,(GLuint,GLint,GLenum,GLsizei,const GLvoid *));
522
+ LOAD_GL_FUNC(glVertexAttribIPointerEXT, "GL_EXT_gpu_shader4");
523
+
524
+ index = (GLuint)NUM2UINT(arg1);
525
+ size = (GLuint)NUM2UINT(arg2);
526
+ type = (GLenum)NUM2INT(arg3);
527
+ stride = (GLsizei)NUM2UINT(arg4);
528
+ if (index>_MAX_VERTEX_ATTRIBS)
529
+ rb_raise(rb_eArgError, "Index too large, maximum allowed value '%i'",_MAX_VERTEX_ATTRIBS);
530
+
531
+ if (CHECK_BUFFER_BINDING(GL_ARRAY_BUFFER_BINDING)) {
532
+ SET_GLIMPL_VARIABLE(VertexAttrib_ptr[index], arg5);
533
+ fptr_glVertexAttribIPointerEXT(index,size,type,stride,(GLvoid *)NUM2SIZET(arg5));
534
+ } else {
535
+ VALUE data;
536
+ data = pack_array_or_pass_string(type,arg5);
537
+ rb_str_freeze(data);
538
+ SET_GLIMPL_VARIABLE(VertexAttrib_ptr[index], data);
539
+ fptr_glVertexAttribIPointerEXT(index,size,type,stride,(GLvoid *)RSTRING_PTR(data));
540
+ }
541
+
542
+ CHECK_GLERROR_FROM("glVertexAttribIPointerEXT");
543
+ return Qnil;
544
+ }
545
+
546
+ GL_FUNC_LOAD_2(Uniform1uiEXT,GLvoid, GLint,GLuint, "GL_EXT_gpu_shader4")
547
+ GL_FUNC_LOAD_3(Uniform2uiEXT,GLvoid, GLint,GLuint,GLuint, "GL_EXT_gpu_shader4")
548
+ GL_FUNC_LOAD_4(Uniform3uiEXT,GLvoid, GLint,GLuint,GLuint,GLuint, "GL_EXT_gpu_shader4")
549
+ GL_FUNC_LOAD_5(Uniform4uiEXT,GLvoid, GLint,GLuint,GLuint,GLuint,GLuint, "GL_EXT_gpu_shader4")
550
+
551
+ #define GLUNIFORM_VFUNC(_name_,_type_,_conv_,_size_) \
552
+ static VALUE \
553
+ gl_##_name_(obj,arg1,arg2) \
554
+ VALUE obj,arg1,arg2; \
555
+ { \
556
+ GLint location; \
557
+ GLsizei count; \
558
+ _type_ *value; \
559
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLint,GLsizei,const _type_ *)); \
560
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_gpu_shader4"); \
561
+ Check_Type(arg2,T_ARRAY); \
562
+ count = (GLsizei)RARRAY_LENINT(arg2); \
563
+ if (count<=0 || (count % _size_) != 0) \
564
+ rb_raise(rb_eArgError, "Parameter array size must be multiplication of %i",_size_); \
565
+ location = (GLint)NUM2INT(arg1); \
566
+ value = ALLOC_N(_type_,count); \
567
+ _conv_(arg2,value,count); \
568
+ fptr_gl##_name_(location,count / _size_,value); \
569
+ xfree(value); \
570
+ CHECK_GLERROR_FROM("gl" #_name_); \
571
+ return Qnil; \
572
+ }
573
+
574
+ GLUNIFORM_VFUNC(Uniform1uivEXT,GLuint,ary2cuint,1)
575
+ GLUNIFORM_VFUNC(Uniform2uivEXT,GLuint,ary2cuint,2)
576
+ GLUNIFORM_VFUNC(Uniform3uivEXT,GLuint,ary2cuint,3)
577
+ GLUNIFORM_VFUNC(Uniform4uivEXT,GLuint,ary2cuint,4)
578
+ #undef GLUNIFORM_VFUNC
579
+
580
+ #define GETUNIFORM_FUNC(_name_,_type_) \
581
+ static VALUE \
582
+ gl_##_name_(obj,arg1,arg2) \
583
+ VALUE obj,arg1,arg2; \
584
+ { \
585
+ GLuint program; \
586
+ GLint location; \
587
+ _type_ params[16]; \
588
+ GLint unused = 0; \
589
+ GLenum uniform_type = 0; \
590
+ GLint uniform_size = 0; \
591
+ \
592
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLuint,GLint,_type_ *)); \
593
+ DECL_GL_FUNC_PTR(GLvoid,glGetActiveUniformARB,(GLuint,GLuint,GLsizei,GLsizei*,GLint*,GLenum*,GLchar*)); \
594
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_gpu_shader4"); \
595
+ LOAD_GL_FUNC(glGetActiveUniformARB, "GL_ARB_shader_objects"); \
596
+ program = (GLuint)NUM2UINT(arg1); \
597
+ location = (GLint)NUM2INT(arg2); \
598
+ \
599
+ fptr_glGetActiveUniformARB(program,location,0,NULL,&unused,&uniform_type,NULL); \
600
+ CHECK_GLERROR_FROM("glGetActiveUniformARB"); \
601
+ if (uniform_type==0) \
602
+ rb_raise(rb_eTypeError, "Can't determine the uniform's type"); \
603
+ \
604
+ uniform_size = get_uniform_size(uniform_type); \
605
+ \
606
+ memset(params,0,16*sizeof(_type_)); \
607
+ fptr_gl##_name_(program,location,params); \
608
+ RET_ARRAY_OR_SINGLE("gl" #_name_, uniform_size, RETCONV_##_type_, params); \
609
+ }
610
+
611
+ GETUNIFORM_FUNC(GetUniformuivEXT,GLuint)
612
+ #undef GETUNIFORM_FUNC
613
+
614
+ static VALUE gl_BindFragDataLocationEXT(VALUE obj,VALUE arg1,VALUE arg2,VALUE arg3)
615
+ {
616
+ DECL_GL_FUNC_PTR(GLvoid,glBindFragDataLocationEXT,(GLuint,GLuint,const GLchar *));
617
+ LOAD_GL_FUNC(glBindFragDataLocationEXT, "GL_EXT_gpu_shader4");
618
+ Check_Type(arg3,T_STRING);
619
+ fptr_glBindFragDataLocationEXT(NUM2UINT(arg1),NUM2UINT(arg2),RSTRING_PTR(arg3));
620
+ CHECK_GLERROR_FROM("glBindFragDataLocationEXT");
621
+ return Qnil;
622
+ }
623
+
624
+ static VALUE gl_GetFragDataLocationEXT(VALUE obj,VALUE arg1,VALUE arg2)
625
+ {
626
+ GLint ret;
627
+ DECL_GL_FUNC_PTR(GLint,glGetFragDataLocationEXT,(GLuint,const GLchar *));
628
+ LOAD_GL_FUNC(glGetFragDataLocationEXT, "GL_EXT_gpu_shader4");
629
+ Check_Type(arg2,T_STRING);
630
+ ret = fptr_glGetFragDataLocationEXT(NUM2UINT(arg1),RSTRING_PTR(arg2));
631
+ CHECK_GLERROR_FROM("glGetFragDataLocationEXT");
632
+ return INT2NUM(ret);
633
+ }
634
+
635
+ /* #327 - GL_EXT_draw_instanced */
636
+ GL_FUNC_LOAD_4(DrawArraysInstancedEXT,GLvoid, GLenum,GLint,GLsizei,GLsizei, "GL_EXT_draw_instanced")
637
+
638
+ static VALUE gl_DrawElementsInstancedEXT(obj,arg1,arg2,arg3,arg4,arg5)
639
+ VALUE obj,arg1,arg2,arg3,arg4,arg5;
640
+ {
641
+ GLenum mode;
642
+ GLsizei count;
643
+ GLenum type;
644
+ GLsizei primcount;
645
+ DECL_GL_FUNC_PTR(GLvoid,glDrawElementsInstancedEXT,(GLenum,GLsizei,GLenum,const GLvoid *,GLsizei));
646
+ LOAD_GL_FUNC(glDrawElementsInstancedEXT, "GL_EXT_draw_instanced");
647
+ mode = (GLenum)NUM2INT(arg1);
648
+ count = (GLsizei)NUM2UINT(arg2);
649
+ type = (GLenum)NUM2INT(arg3);
650
+ primcount = (GLsizei)NUM2INT(arg5);
651
+ if (CHECK_BUFFER_BINDING(GL_ELEMENT_ARRAY_BUFFER_BINDING)) {
652
+ fptr_glDrawElementsInstancedEXT(mode, count, type, (const GLvoid*)NUM2SIZET(arg4), primcount);
653
+ } else {
654
+ VALUE data;
655
+ data = pack_array_or_pass_string(type,arg4);
656
+ fptr_glDrawElementsInstancedEXT(mode, count, type, (const GLvoid*)RSTRING_PTR(data), primcount);
657
+ }
658
+ CHECK_GLERROR_FROM("glDrawArraysInstancedEXT");
659
+ return Qnil;
660
+ }
661
+
662
+ /* #330 - GL_EXT_texture_buffer_object */
663
+ GL_FUNC_LOAD_3(TexBufferEXT,GLvoid, GLenum,GLenum,GLenum, "GL_EXT_texture_buffer_object")
664
+
665
+ /* #343 - GL_EXT_texture_integer */
666
+ GL_FUNC_LOAD_4(ClearColorIiEXT,GLvoid, GLint,GLint,GLint,GLint, "GL_EXT_texture_integer")
667
+ GL_FUNC_LOAD_4(ClearColorIuiEXT,GLvoid, GLuint,GLuint,GLuint,GLuint, "GL_EXT_texture_integer")
668
+
669
+ #define TEXPARAMETER_VFUNC(_name_,_type_,_conv_) \
670
+ static VALUE \
671
+ gl_##_name_(obj,arg1,arg2,arg3) \
672
+ VALUE obj,arg1,arg2,arg3; \
673
+ { \
674
+ GLenum target; \
675
+ GLenum pname; \
676
+ _type_ params[4] = {0,0,0,0}; \
677
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLenum,GLenum,_type_ *)); \
678
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_texture_integer"); \
679
+ target = (GLenum)NUM2UINT(arg1); \
680
+ pname = (GLenum)NUM2UINT(arg2); \
681
+ Check_Type(arg3,T_ARRAY); \
682
+ _conv_(arg3,params,4); \
683
+ fptr_gl##_name_(target,pname,params); \
684
+ CHECK_GLERROR_FROM("gl" #_name_); \
685
+ return Qnil; \
686
+ }
687
+
688
+ TEXPARAMETER_VFUNC(TexParameterIivEXT,GLint,ary2cint)
689
+ TEXPARAMETER_VFUNC(TexParameterIuivEXT,GLuint,ary2cuint)
690
+ #undef TEXPARAMETER_VFUNC
691
+
692
+ #define GETTEXPARAMETER_VFUNC(_name_,_type_,_conv_) \
693
+ static VALUE \
694
+ gl_##_name_(obj,arg1,arg2) \
695
+ VALUE obj,arg1,arg2; \
696
+ { \
697
+ GLenum target; \
698
+ GLenum pname; \
699
+ _type_ params[4] = {0,0,0,0}; \
700
+ int size; \
701
+ DECL_GL_FUNC_PTR(GLvoid,gl##_name_,(GLenum,GLenum,_type_ *)); \
702
+ LOAD_GL_FUNC(gl##_name_, "GL_EXT_texture_integer"); \
703
+ target = (GLenum)NUM2INT(arg1); \
704
+ pname = (GLenum)NUM2INT(arg2); \
705
+ switch(pname) { \
706
+ case GL_TEXTURE_BORDER_COLOR: \
707
+ case GL_TEXTURE_BORDER_VALUES_NV: \
708
+ case GL_POST_TEXTURE_FILTER_BIAS_SGIX: \
709
+ case GL_POST_TEXTURE_FILTER_SCALE_SGIX: \
710
+ size = 4; \
711
+ break; \
712
+ default: \
713
+ size = 1; \
714
+ break; \
715
+ } \
716
+ fptr_gl##_name_(target,pname,params); \
717
+ RET_ARRAY_OR_SINGLE_BOOL("gl" #_name_, size, _conv_, pname, params); \
718
+ }
719
+
720
+ GETTEXPARAMETER_VFUNC(GetTexParameterIivEXT,GLint,cond_GLBOOL2RUBY)
721
+ GETTEXPARAMETER_VFUNC(GetTexParameterIuivEXT,GLuint,cond_GLBOOL2RUBY_U)
722
+ #undef GETTEXPARAMETER_VFUNC
723
+
724
+ void gl_init_functions_ext_ext(VALUE klass)
725
+ {
726
+ /* #2 - GL_EXT_blend_color */
727
+ rb_define_method(klass, "glBlendColorEXT", gl_BlendColorEXT, 4);
728
+
729
+ /* #3 - GL_EXT_polygon_offset */
730
+ rb_define_method(klass, "glPolygonOffsetEXT", gl_PolygonOffsetEXT, 2);
731
+
732
+ /* #20 - GL_EXT_texture_object */
733
+ rb_define_method(klass, "glGenTexturesEXT", gl_GenTexturesEXT, 1);
734
+ rb_define_method(klass, "glDeleteTexturesEXT", gl_DeleteTexturesEXT, 1);
735
+ rb_define_method(klass, "glBindTextureEXT", gl_BindTextureEXT, 2);
736
+ rb_define_method(klass, "glPrioritizeTexturesEXT", gl_PrioritizeTexturesEXT, 2);
737
+ rb_define_method(klass, "glAreTexturesResidentEXT", gl_AreTexturesResidentEXT, 1);
738
+ rb_define_method(klass, "glIsTextureEXT", gl_IsTextureEXT, 1);
739
+
740
+ /* #37 - GL_EXT_blend_minmax */
741
+ rb_define_method(klass, "glBlendEquationEXT", gl_BlendEquationEXT, 1);
742
+
743
+ /* #54 - GL_EXT_point_parameters */
744
+ rb_define_method(klass, "glPointParameterfEXT", gl_PointParameterfEXT, 2);
745
+ rb_define_method(klass, "glPointParameterfvEXT", gl_PointParameterfvEXT, 2);
746
+
747
+ /* #97 - GL_EXT_compiled_vertex_array */
748
+ rb_define_method(klass, "glLockArraysEXT", gl_LockArraysEXT, 2);
749
+ rb_define_method(klass, "glUnlockArraysEXT", gl_UnlockArraysEXT, 0);
750
+
751
+ /* #112 - GL_EXT_draw_range_elements */
752
+ rb_define_method(klass, "glDrawRangeElementsEXT", gl_DrawRangeElementsEXT, 6);
753
+
754
+ /* #145 - GL_EXT_secondary_color */
755
+ rb_define_method(klass, "glSecondaryColor3bEXT", gl_SecondaryColor3bEXT, 3);
756
+ rb_define_method(klass, "glSecondaryColor3dEXT", gl_SecondaryColor3dEXT, 3);
757
+ rb_define_method(klass, "glSecondaryColor3fEXT", gl_SecondaryColor3fEXT, 3);
758
+ rb_define_method(klass, "glSecondaryColor3iEXT", gl_SecondaryColor3iEXT, 3);
759
+ rb_define_method(klass, "glSecondaryColor3sEXT", gl_SecondaryColor3sEXT, 3);
760
+ rb_define_method(klass, "glSecondaryColor3ubEXT", gl_SecondaryColor3ubEXT, 3);
761
+ rb_define_method(klass, "glSecondaryColor3uiEXT", gl_SecondaryColor3uiEXT, 3);
762
+ rb_define_method(klass, "glSecondaryColor3usEXT", gl_SecondaryColor3usEXT, 3);
763
+ rb_define_method(klass, "glSecondaryColor3bvEXT", gl_SecondaryColor3bvEXT, 1);
764
+ rb_define_method(klass, "glSecondaryColor3dvEXT", gl_SecondaryColor3dvEXT, 1);
765
+ rb_define_method(klass, "glSecondaryColor3fvEXT", gl_SecondaryColor3fvEXT, 1);
766
+ rb_define_method(klass, "glSecondaryColor3ivEXT", gl_SecondaryColor3ivEXT, 1);
767
+ rb_define_method(klass, "glSecondaryColor3svEXT", gl_SecondaryColor3svEXT, 1);
768
+ rb_define_method(klass, "glSecondaryColor3ubvEXT", gl_SecondaryColor3ubvEXT, 1);
769
+ rb_define_method(klass, "glSecondaryColor3uivEXT", gl_SecondaryColor3uivEXT, 1);
770
+ rb_define_method(klass, "glSecondaryColor3usvEXT", gl_SecondaryColor3usvEXT, 1);
771
+ rb_define_method(klass, "glSecondaryColorPointerEXT", gl_SecondaryColorPointerEXT, 4);
772
+
773
+ /* #148 - GL_EXT_multi_draw_arrays */
774
+ rb_define_method(klass, "glMultiDrawArraysEXT", gl_MultiDrawArraysEXT, 3);
775
+ rb_define_method(klass, "glMultiDrawElementsEXT", gl_MultiDrawElementsEXT, -1);
776
+
777
+ /* #149 - GL_EXT_fog_coord */
778
+ rb_define_method(klass, "glFogCoordfEXT", gl_FogCoordfEXT, 1);
779
+ rb_define_method(klass, "glFogCoorddEXT", gl_FogCoorddEXT, 1);
780
+ rb_define_method(klass, "glFogCoordfvEXT", gl_FogCoordfvEXT, 1);
781
+ rb_define_method(klass, "glFogCoorddvEXT", gl_FogCoorddvEXT, 1);
782
+ rb_define_method(klass, "glFogCoordPointerEXT", gl_FogCoordPointerEXT, 3);
783
+
784
+ /* #173 - GL_EXT_blend_func_separate */
785
+ rb_define_method(klass, "glBlendFuncSeparateEXT", gl_BlendFuncSeparateEXT, 4);
786
+
787
+ /* #268 - GL_EXT_stencil_two_side */
788
+ rb_define_method(klass, "glActiveStencilFaceEXT", gl_ActiveStencilFaceEXT, 1);
789
+
790
+ /* #297 - GL_EXT_depth_bounds_test */
791
+ rb_define_method(klass, "glDepthBoundsEXT", gl_DepthBoundsEXT, 2);
792
+
793
+ /* #299 - GL_EXT_blend_equation_separate */
794
+ rb_define_method(klass, "glBlendEquationSeparateEXT", gl_BlendEquationSeparateEXT, 2);
795
+
796
+ /* #310 - GL_EXT_framebuffer_object */
797
+ rb_define_method(klass, "glIsRenderbufferEXT", gl_IsRenderbufferEXT, 1);
798
+ rb_define_method(klass, "glBindRenderbufferEXT", gl_BindRenderbufferEXT, 2);
799
+ rb_define_method(klass, "glDeleteRenderbuffersEXT", gl_DeleteRenderbuffersEXT, 1);
800
+ rb_define_method(klass, "glGenRenderbuffersEXT", gl_GenRenderbuffersEXT, 1);
801
+ rb_define_method(klass, "glRenderbufferStorageEXT", gl_RenderbufferStorageEXT, 4);
802
+ rb_define_method(klass, "glGetRenderbufferParameterivEXT", gl_GetRenderbufferParameterivEXT, 2);
803
+ rb_define_method(klass, "glIsFramebufferEXT", gl_IsFramebufferEXT, 1);
804
+ rb_define_method(klass, "glBindFramebufferEXT", gl_BindFramebufferEXT, 2);
805
+ rb_define_method(klass, "glDeleteFramebuffersEXT", gl_DeleteFramebuffersEXT, 1);
806
+ rb_define_method(klass, "glGenFramebuffersEXT", gl_GenFramebuffersEXT, 1);
807
+ rb_define_method(klass, "glCheckFramebufferStatusEXT", gl_CheckFramebufferStatusEXT, 1);
808
+ rb_define_method(klass, "glFramebufferTexture1DEXT", gl_FramebufferTexture1DEXT, 5);
809
+ rb_define_method(klass, "glFramebufferTexture2DEXT", gl_FramebufferTexture2DEXT, 5);
810
+ rb_define_method(klass, "glFramebufferTexture3DEXT", gl_FramebufferTexture3DEXT, 6);
811
+ rb_define_method(klass, "glFramebufferRenderbufferEXT", gl_FramebufferRenderbufferEXT, 4);
812
+ rb_define_method(klass, "glGetFramebufferAttachmentParameterivEXT", gl_GetFramebufferAttachmentParameterivEXT, 3);
813
+ rb_define_method(klass, "glGenerateMipmapEXT", gl_GenerateMipmapEXT, 1);
814
+
815
+ /* #314 - GL_EXT_stencil_clear_tag */
816
+ rb_define_method(klass, "glStencilClearTagEXT", gl_StencilClearTagEXT, 2);
817
+
818
+ /* #316 - GL_EXT_framebuffer_blit */
819
+ rb_define_method(klass, "glBlitFramebufferEXT", gl_BlitFramebufferEXT, 10);
820
+
821
+ /* #317 - GL_EXT_framebuffer_multisample */
822
+ rb_define_method(klass, "glRenderbufferStorageMultisampleEXT", gl_RenderbufferStorageMultisampleEXT, 5);
823
+
824
+ /* #319 - GL_EXT_timer_query */
825
+ rb_define_method(klass, "glGetQueryObjecti64vEXT", gl_GetQueryObjecti64vEXT, 2);
826
+ rb_define_method(klass, "glGetQueryObjectui64vEXT", gl_GetQueryObjectui64vEXT, 2);
827
+
828
+ /* #320 - GL_EXT_gpu_program_parameters */
829
+ rb_define_method(klass, "glProgramEnvParameters4fvEXT", gl_ProgramEnvParameters4fvEXT, 3);
830
+ rb_define_method(klass, "glProgramLocalParameters4fvEXT", gl_ProgramLocalParameters4fvEXT, 3);
831
+
832
+ /* #324 - GL_EXT_geometry_shader4 */
833
+ rb_define_method(klass, "glProgramParameteriEXT", gl_ProgramParameteriEXT, 3);
834
+
835
+ /* #326 - GL_EXT_gpu_shader4 */
836
+ rb_define_method(klass, "glVertexAttribI1iEXT", gl_VertexAttribI1iEXT, 2);
837
+ rb_define_method(klass, "glVertexAttribI2iEXT", gl_VertexAttribI2iEXT, 3);
838
+ rb_define_method(klass, "glVertexAttribI3iEXT", gl_VertexAttribI3iEXT, 4);
839
+ rb_define_method(klass, "glVertexAttribI4iEXT", gl_VertexAttribI4iEXT, 5);
840
+ rb_define_method(klass, "glVertexAttribI1uiEXT", gl_VertexAttribI1uiEXT, 2);
841
+ rb_define_method(klass, "glVertexAttribI2uiEXT", gl_VertexAttribI2uiEXT, 3);
842
+ rb_define_method(klass, "glVertexAttribI3uiEXT", gl_VertexAttribI3uiEXT, 4);
843
+ rb_define_method(klass, "glVertexAttribI4uiEXT", gl_VertexAttribI4uiEXT, 5);
844
+ rb_define_method(klass, "glVertexAttribI1ivEXT", gl_VertexAttribI1ivEXT, 2);
845
+ rb_define_method(klass, "glVertexAttribI2ivEXT", gl_VertexAttribI2ivEXT, 2);
846
+ rb_define_method(klass, "glVertexAttribI3ivEXT", gl_VertexAttribI3ivEXT, 2);
847
+ rb_define_method(klass, "glVertexAttribI4ivEXT", gl_VertexAttribI4ivEXT, 2);
848
+ rb_define_method(klass, "glVertexAttribI1uivEXT", gl_VertexAttribI1uivEXT, 2);
849
+ rb_define_method(klass, "glVertexAttribI2uivEXT", gl_VertexAttribI2uivEXT, 2);
850
+ rb_define_method(klass, "glVertexAttribI3uivEXT", gl_VertexAttribI3uivEXT, 2);
851
+ rb_define_method(klass, "glVertexAttribI4uivEXT", gl_VertexAttribI4uivEXT, 2);
852
+ rb_define_method(klass, "glVertexAttribI4bvEXT", gl_VertexAttribI4bvEXT, 2);
853
+ rb_define_method(klass, "glVertexAttribI4svEXT", gl_VertexAttribI4svEXT, 2);
854
+ rb_define_method(klass, "glVertexAttribI4ubvEXT", gl_VertexAttribI4ubvEXT, 2);
855
+ rb_define_method(klass, "glVertexAttribI4usvEXT", gl_VertexAttribI4usvEXT, 2);
856
+ rb_define_method(klass, "glVertexAttribIPointerEXT", gl_VertexAttribIPointerEXT, 5);
857
+ rb_define_method(klass, "glGetVertexAttribIivEXT", gl_GetVertexAttribIivEXT, 2);
858
+ rb_define_method(klass, "glGetVertexAttribIuivEXT", gl_GetVertexAttribIuivEXT, 2);
859
+ rb_define_method(klass, "glUniform1uiEXT", gl_Uniform1uiEXT, 2);
860
+ rb_define_method(klass, "glUniform2uiEXT", gl_Uniform2uiEXT, 3);
861
+ rb_define_method(klass, "glUniform3uiEXT", gl_Uniform3uiEXT, 4);
862
+ rb_define_method(klass, "glUniform4uiEXT", gl_Uniform4uiEXT, 5);
863
+ rb_define_method(klass, "glUniform1uivEXT", gl_Uniform1uivEXT, 2);
864
+ rb_define_method(klass, "glUniform2uivEXT", gl_Uniform2uivEXT, 2);
865
+ rb_define_method(klass, "glUniform3uivEXT", gl_Uniform3uivEXT, 2);
866
+ rb_define_method(klass, "glUniform4uivEXT", gl_Uniform4uivEXT, 2);
867
+ rb_define_method(klass, "glGetUniformuivEXT", gl_GetUniformuivEXT, 2);
868
+ rb_define_method(klass, "glBindFragDataLocationEXT", gl_BindFragDataLocationEXT, 3);
869
+ rb_define_method(klass, "glGetFragDataLocationEXT", gl_GetFragDataLocationEXT, 2);
870
+
871
+ /* #327 - GL_EXT_draw_instanced */
872
+ rb_define_method(klass, "glDrawArraysInstancedEXT", gl_DrawArraysInstancedEXT, 4);
873
+ rb_define_method(klass, "glDrawElementsInstancedEXT", gl_DrawElementsInstancedEXT, 5);
874
+
875
+ /* #330 - GL_EXT_texture_buffer_object */
876
+ rb_define_method(klass, "glTexBufferEXT", gl_TexBufferEXT, 3);
877
+
878
+ /* #343 - GL_EXT_texture_integer */
879
+ rb_define_method(klass, "glClearColorIiEXT", gl_ClearColorIiEXT, 4);
880
+ rb_define_method(klass, "glClearColorIuiEXT", gl_ClearColorIuiEXT, 4);
881
+ rb_define_method(klass, "glTexParameterIivEXT", gl_TexParameterIivEXT, 3);
882
+ rb_define_method(klass, "glTexParameterIuivEXT", gl_TexParameterIuivEXT, 3);
883
+ rb_define_method(klass, "glGetTexParameterIivEXT", gl_GetTexParameterIivEXT, 2);
884
+ rb_define_method(klass, "glGetTexParameterIuivEXT", gl_GetTexParameterIuivEXT, 2);
885
+ }