opengl 0.8.0-x86-mingw32 → 0.9.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +2 -0
- data/.gitignore +2 -1
- data/.travis.yml +19 -0
- data/History.rdoc +26 -0
- data/Manifest.txt +3 -23
- data/README.rdoc +43 -37
- data/Rakefile +6 -62
- data/examples/NeHe/nehe_lesson02.rb +3 -2
- data/examples/NeHe/nehe_lesson03.rb +3 -2
- data/examples/NeHe/nehe_lesson04.rb +3 -1
- data/examples/NeHe/nehe_lesson05.rb +4 -1
- data/examples/NeHe/nehe_lesson06.rb +9 -6
- data/examples/NeHe/nehe_lesson07.rb +9 -6
- data/examples/NeHe/nehe_lesson08.rb +9 -6
- data/examples/NeHe/nehe_lesson09.rb +10 -6
- data/examples/NeHe/nehe_lesson11.rb +9 -6
- data/examples/NeHe/nehe_lesson12.rb +9 -6
- data/examples/NeHe/nehe_lesson16.rb +50 -47
- data/examples/NeHe/nehe_lesson19.rb +10 -7
- data/examples/NeHe/nehe_lesson36.rb +234 -229
- data/examples/OrangeBook/brick.rb +227 -225
- data/examples/OrangeBook/particle.rb +233 -231
- data/examples/RedBook/aapoly.rb +71 -70
- data/examples/RedBook/aargb.rb +54 -52
- data/examples/RedBook/accanti.rb +96 -94
- data/examples/RedBook/accpersp.rb +106 -104
- data/examples/RedBook/alpha.rb +54 -52
- data/examples/RedBook/alpha3D.rb +90 -88
- data/examples/RedBook/bezcurve.rb +48 -46
- data/examples/RedBook/bezmesh.rb +71 -69
- data/examples/RedBook/checker.rb +57 -55
- data/examples/RedBook/clip.rb +41 -39
- data/examples/RedBook/colormat.rb +72 -70
- data/examples/RedBook/cube.rb +39 -37
- data/examples/RedBook/depthcue.rb +37 -35
- data/examples/RedBook/dof.rb +110 -109
- data/examples/RedBook/double.rb +40 -38
- data/examples/RedBook/drawf.rb +30 -28
- data/examples/RedBook/feedback.rb +79 -77
- data/examples/RedBook/fog.rb +90 -89
- data/examples/RedBook/font.rb +78 -76
- data/examples/RedBook/hello.rb +29 -27
- data/examples/RedBook/image.rb +57 -55
- data/examples/RedBook/jitter.rb +131 -131
- data/examples/RedBook/light.rb +2 -1
- data/examples/RedBook/lines.rb +70 -68
- data/examples/RedBook/list.rb +48 -46
- data/examples/RedBook/material.rb +200 -199
- data/examples/RedBook/mipmap.rb +84 -82
- data/examples/RedBook/model.rb +55 -53
- data/examples/RedBook/movelight.rb +52 -50
- data/examples/RedBook/pickdepth.rb +103 -101
- data/examples/RedBook/planet.rb +46 -44
- data/examples/RedBook/quadric.rb +97 -95
- data/examples/RedBook/robot.rb +55 -53
- data/examples/RedBook/select.rb +118 -116
- data/examples/RedBook/smooth.rb +35 -33
- data/examples/RedBook/stencil.rb +96 -94
- data/examples/RedBook/stroke.rb +75 -73
- data/examples/RedBook/surface.rb +93 -91
- data/examples/RedBook/teaambient.rb +71 -69
- data/examples/RedBook/teapots.rb +105 -103
- data/examples/RedBook/tess.rb +96 -94
- data/examples/RedBook/texbind.rb +79 -77
- data/examples/RedBook/texgen.rb +88 -86
- data/examples/RedBook/texturesurf.rb +57 -55
- data/examples/RedBook/varray.rb +85 -83
- data/examples/RedBook/wrap.rb +76 -74
- data/examples/misc/OGLBench.rb +114 -113
- data/examples/misc/anisotropic.rb +154 -152
- data/examples/misc/fbo_test.rb +37 -36
- data/examples/misc/font-glut.rb +47 -46
- data/examples/misc/glfwtest.rb +16 -16
- data/examples/misc/plane.rb +13 -13
- data/examples/misc/readpixel.rb +66 -65
- data/examples/misc/sdltest.rb +21 -19
- data/examples/misc/trislam.rb +548 -547
- data/ext/opengl/common.h +16 -38
- data/ext/opengl/conv.h +39 -41
- data/ext/opengl/extconf.rb +4 -31
- data/ext/opengl/funcdef.h +126 -124
- data/ext/opengl/gl-1.0-1.1.c +1917 -1917
- data/ext/opengl/gl-1.2.c +4 -667
- data/ext/opengl/gl-1.3.c +9 -9
- data/ext/opengl/gl-1.4.c +8 -8
- data/ext/opengl/gl-1.5.c +1 -1
- data/ext/opengl/gl-2.0.c +392 -388
- data/ext/opengl/gl-3.0.c +493 -0
- data/ext/opengl/gl-enums.c +1523 -5
- data/ext/opengl/gl-enums.h +4679 -122
- data/ext/opengl/gl-error.c +7 -7
- data/ext/opengl/gl-error.h +4 -4
- data/ext/opengl/gl-ext-arb.c +468 -464
- data/ext/opengl/gl-ext-ext.c +18 -18
- data/ext/opengl/gl-ext-nv.c +15 -15
- data/ext/opengl/gl.c +2 -0
- data/ext/opengl/gl_buffer.c +92 -92
- data/ext/opengl/opengl.c +1 -7
- data/lib/opengl.rb +23 -59
- data/lib/opengl/1.9/opengl.so +0 -0
- data/lib/opengl/2.0/opengl.so +0 -0
- data/lib/opengl/2.1/opengl.so +0 -0
- data/lib/opengl/test_case.rb +1 -2
- data/test/dummy.xorg.conf +140 -0
- data/test/test_gl.rb +18 -22
- data/test/test_gl_10_11.rb +220 -220
- data/test/test_gl_12.rb +11 -122
- data/test/test_gl_13.rb +202 -210
- data/test/test_gl_14.rb +16 -19
- data/test/test_gl_15.rb +2 -4
- data/test/test_gl_20.rb +45 -58
- data/test/test_gl_21.rb +46 -163
- data/test/test_gl_ext_arb.rb +54 -72
- data/test/test_gl_ext_ati.rb +0 -2
- data/test/test_gl_ext_ext.rb +66 -66
- data/test/test_gl_ext_gremedy.rb +8 -15
- data/test/test_gl_ext_nv.rb +109 -112
- data/test/test_opengl_buffer.rb +8 -25
- data/utils/README +0 -5
- data/utils/enumgen.rb +72 -76
- data/utils/extlistgen.rb +55 -55
- metadata +90 -67
- metadata.gz.sig +0 -0
- data/Rakefile.cross +0 -107
- data/docs/build_install.txt +0 -119
- data/docs/extensions.txt.in +0 -348
- data/docs/history.txt +0 -66
- data/docs/requirements_and_design.txt +0 -117
- data/docs/roadmap.txt +0 -28
- data/docs/scientific_use.txt +0 -35
- data/docs/supplies/page_template.html +0 -71
- data/docs/thanks.txt +0 -29
- data/docs/tutorial.txt +0 -469
- data/ext/opengl/glu-enums.c +0 -164
- data/ext/opengl/glu-enums.h +0 -463
- data/ext/opengl/glu.c +0 -1534
- data/ext/opengl/glut.c +0 -1145
- data/ext/opengl/glut_callbacks.c +0 -845
- data/lib/glu.rb +0 -1
- data/lib/glut.rb +0 -1
- data/lib/opengl/opengl.so +0 -0
- data/test/test_glu.rb +0 -309
- data/utils/mkdn2html.rb +0 -59
- data/utils/post-mkdn2html.rb +0 -91
- data/website/images/ogl.jpg +0 -0
- data/website/images/tab_bottom.gif +0 -0
- data/website/style.css +0 -198
data/ext/opengl/gl-1.2.c
CHANGED
@@ -21,16 +21,6 @@
|
|
21
21
|
|
22
22
|
GL_FUNC_LOAD_4(BlendColor,GLvoid, GLclampf,GLclampf,GLclampf,GLclampf, "1.2")
|
23
23
|
GL_FUNC_LOAD_1(BlendEquation,GLvoid, GLenum, "1.2")
|
24
|
-
GL_FUNC_LOAD_5(CopyColorTable,GLvoid, GLenum,GLenum,GLint,GLint,GLsizei, "1.2")
|
25
|
-
GL_FUNC_LOAD_5(CopyColorSubTable,GLvoid, GLenum,GLsizei,GLint,GLint,GLsizei, "1.2")
|
26
|
-
GL_FUNC_LOAD_3(ConvolutionParameterf,GLvoid, GLenum,GLenum,GLfloat, "1.2")
|
27
|
-
GL_FUNC_LOAD_3(ConvolutionParameteri,GLvoid, GLenum,GLenum,GLint, "1.2")
|
28
|
-
GL_FUNC_LOAD_5(CopyConvolutionFilter1D,GLvoid, GLenum,GLenum,GLint,GLint,GLsizei, "1.2")
|
29
|
-
GL_FUNC_LOAD_6(CopyConvolutionFilter2D,GLvoid, GLenum,GLenum,GLint,GLint,GLsizei,GLsizei, "1.2")
|
30
|
-
GL_FUNC_LOAD_4(Histogram,GLvoid, GLenum,GLsizei,GLenum,GLboolean, "1.2")
|
31
|
-
GL_FUNC_LOAD_3(Minmax,GLvoid, GLenum,GLenum,GLboolean, "1.2")
|
32
|
-
GL_FUNC_LOAD_1(ResetHistogram,GLvoid, GLenum, "1.2")
|
33
|
-
GL_FUNC_LOAD_1(ResetMinmax,GLvoid, GLenum, "1.2")
|
34
24
|
GL_FUNC_LOAD_9(CopyTexSubImage3D,GLvoid, GLenum,GLint,GLint,GLint,GLint,GLint,GLint,GLsizei,GLsizei, "1.2")
|
35
25
|
|
36
26
|
static void (APIENTRY * fptr_glDrawRangeElements)(GLenum,GLuint,GLuint,GLsizei,GLenum,GLvoid*);
|
@@ -50,7 +40,7 @@ VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6;
|
|
50
40
|
count = (GLsizei)NUM2UINT(arg4);
|
51
41
|
type = (GLenum)NUM2INT(arg5);
|
52
42
|
if (CheckBufferBinding(GL_ELEMENT_ARRAY_BUFFER_BINDING)) {
|
53
|
-
fptr_glDrawRangeElements(mode, start, end, count, type, (GLvoid *)
|
43
|
+
fptr_glDrawRangeElements(mode, start, end, count, type, (GLvoid *)NUM2SIZET(arg6));
|
54
44
|
} else {
|
55
45
|
VALUE data;
|
56
46
|
data = pack_array_or_pass_string(type,arg6);
|
@@ -60,627 +50,6 @@ VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6;
|
|
60
50
|
return Qnil;
|
61
51
|
}
|
62
52
|
|
63
|
-
static void (APIENTRY * fptr_glColorTable)(GLenum,GLenum,GLsizei,GLenum,GLenum,GLvoid*);
|
64
|
-
static VALUE
|
65
|
-
gl_ColorTable(obj,arg1,arg2,arg3,arg4,arg5,arg6)
|
66
|
-
VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6;
|
67
|
-
{
|
68
|
-
GLenum target;
|
69
|
-
GLenum internalformat;
|
70
|
-
GLsizei width;
|
71
|
-
GLenum format;
|
72
|
-
GLenum type;
|
73
|
-
LOAD_GL_FUNC(glColorTable, "1.2");
|
74
|
-
target = (GLenum)NUM2INT(arg1);
|
75
|
-
internalformat = (GLenum)NUM2INT(arg2);
|
76
|
-
width = (GLsizei)NUM2UINT(arg3);
|
77
|
-
format = (GLenum)NUM2INT(arg4);
|
78
|
-
type = (GLenum)NUM2INT(arg5);
|
79
|
-
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
80
|
-
fptr_glColorTable(target,internalformat,width,format,type,(GLvoid *)NUM2LONG(arg6));
|
81
|
-
} else {
|
82
|
-
VALUE data;
|
83
|
-
data = pack_array_or_pass_string(type,arg6);
|
84
|
-
CheckDataSize(type,format,width,data);
|
85
|
-
fptr_glColorTable(target,internalformat,width,format,type,(GLvoid*)RSTRING_PTR(data));
|
86
|
-
}
|
87
|
-
CHECK_GLERROR_FROM("glColorTable");
|
88
|
-
return Qnil;
|
89
|
-
}
|
90
|
-
|
91
|
-
static void (APIENTRY * fptr_glColorTableParameterfv)(GLenum,GLenum,const GLfloat*);
|
92
|
-
static VALUE
|
93
|
-
gl_ColorTableParameterfv(obj,arg1,arg2,arg3)
|
94
|
-
VALUE obj,arg1,arg2,arg3;
|
95
|
-
{
|
96
|
-
GLenum target;
|
97
|
-
GLenum pname;
|
98
|
-
GLfloat params[4] = {(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0};
|
99
|
-
LOAD_GL_FUNC(glColorTableParameterfv, "1.2");
|
100
|
-
target = (GLenum)NUM2INT(arg1);
|
101
|
-
pname = (GLenum)NUM2INT(arg2);
|
102
|
-
Check_Type(arg3,T_ARRAY);
|
103
|
-
ary2cflt(arg3,params,4);
|
104
|
-
fptr_glColorTableParameterfv(target,pname,params);
|
105
|
-
CHECK_GLERROR_FROM("glColorTableParameterfv");
|
106
|
-
return Qnil;
|
107
|
-
}
|
108
|
-
|
109
|
-
static void (APIENTRY * fptr_glColorTableParameteriv)(GLenum,GLenum,const GLint*);
|
110
|
-
static VALUE
|
111
|
-
gl_ColorTableParameteriv(obj,arg1,arg2,arg3)
|
112
|
-
VALUE obj,arg1,arg2,arg3;
|
113
|
-
{
|
114
|
-
GLenum target;
|
115
|
-
GLenum pname;
|
116
|
-
GLint params[4] = {0,0,0,0};
|
117
|
-
LOAD_GL_FUNC(glColorTableParameteriv, "1.2");
|
118
|
-
target = (GLenum)NUM2INT(arg1);
|
119
|
-
pname = (GLenum)NUM2INT(arg2);
|
120
|
-
Check_Type(arg3,T_ARRAY);
|
121
|
-
ary2cint(arg3,params,4);
|
122
|
-
fptr_glColorTableParameteriv(target,pname,params);
|
123
|
-
CHECK_GLERROR_FROM("glColorTableParameteriv");
|
124
|
-
return Qnil;
|
125
|
-
}
|
126
|
-
|
127
|
-
|
128
|
-
static void (APIENTRY * fptr_glGetColorTableParameterfv)(GLenum,GLenum,GLfloat *);
|
129
|
-
static VALUE
|
130
|
-
gl_GetColorTableParameterfv(obj,arg1,arg2)
|
131
|
-
VALUE obj,arg1,arg2;
|
132
|
-
{
|
133
|
-
GLenum target;
|
134
|
-
GLenum pname;
|
135
|
-
GLfloat params[4] = {(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0};
|
136
|
-
GLsizei size;
|
137
|
-
LOAD_GL_FUNC(glGetColorTableParameterfv, "1.2");
|
138
|
-
target = (GLenum)NUM2INT(arg1);
|
139
|
-
pname = (GLenum)NUM2INT(arg2);
|
140
|
-
switch (pname) {
|
141
|
-
case GL_COLOR_TABLE_SCALE:
|
142
|
-
case GL_COLOR_TABLE_BIAS:
|
143
|
-
size = 4;
|
144
|
-
break;
|
145
|
-
default:
|
146
|
-
size = 1;
|
147
|
-
break;
|
148
|
-
}
|
149
|
-
fptr_glGetColorTableParameterfv(target,pname,params);
|
150
|
-
RET_ARRAY_OR_SINGLE("glGetColorTableParameterfv", size, RETCONV_GLfloat,
|
151
|
-
params);
|
152
|
-
}
|
153
|
-
|
154
|
-
static void (APIENTRY * fptr_glGetColorTableParameteriv)(GLenum,GLenum,GLint *);
|
155
|
-
static VALUE
|
156
|
-
gl_GetColorTableParameteriv(obj,arg1,arg2)
|
157
|
-
VALUE obj,arg1,arg2;
|
158
|
-
{
|
159
|
-
GLenum target;
|
160
|
-
GLenum pname;
|
161
|
-
GLint params[4] = {0,0,0,0};
|
162
|
-
GLsizei size;
|
163
|
-
LOAD_GL_FUNC(glGetColorTableParameteriv, "1.2");
|
164
|
-
target = (GLenum)NUM2INT(arg1);
|
165
|
-
pname = (GLenum)NUM2INT(arg2);
|
166
|
-
switch (pname) {
|
167
|
-
case GL_COLOR_TABLE_SCALE:
|
168
|
-
case GL_COLOR_TABLE_BIAS:
|
169
|
-
size = 4;
|
170
|
-
break;
|
171
|
-
default:
|
172
|
-
size = 1;
|
173
|
-
break;
|
174
|
-
}
|
175
|
-
fptr_glGetColorTableParameteriv(target,pname,params);
|
176
|
-
RET_ARRAY_OR_SINGLE("glGetColorTableParameteriv", size, RETCONV_GLint,
|
177
|
-
params);
|
178
|
-
}
|
179
|
-
|
180
|
-
static void (APIENTRY * fptr_glGetColorTable)(GLenum,GLenum,GLenum,GLvoid *);
|
181
|
-
static VALUE
|
182
|
-
gl_GetColorTable(obj,arg1,arg2,arg3)
|
183
|
-
VALUE obj,arg1,arg2,arg3;
|
184
|
-
{
|
185
|
-
GLenum target;
|
186
|
-
GLenum format;
|
187
|
-
GLenum type;
|
188
|
-
GLsizei width = 0;
|
189
|
-
VALUE data;
|
190
|
-
LOAD_GL_FUNC(glGetColorTable, "1.2");
|
191
|
-
LOAD_GL_FUNC(glGetColorTableParameteriv, "1.2");
|
192
|
-
target = (GLenum)NUM2INT(arg1);
|
193
|
-
format = (GLenum)NUM2INT(arg2);
|
194
|
-
type = (GLenum)NUM2INT(arg3);
|
195
|
-
fptr_glGetColorTableParameteriv(target,GL_COLOR_TABLE_WIDTH,&width);
|
196
|
-
CHECK_GLERROR_FROM("glGetColorTableParameteriv");
|
197
|
-
data = allocate_buffer_with_string(GetDataSize(type,format,width));
|
198
|
-
FORCE_PIXEL_STORE_MODE
|
199
|
-
fptr_glGetColorTable(target,format,type,(GLvoid*)RSTRING_PTR(data));
|
200
|
-
RESTORE_PIXEL_STORE_MODE
|
201
|
-
CHECK_GLERROR_FROM("glGetColorTable");
|
202
|
-
return data;
|
203
|
-
}
|
204
|
-
|
205
|
-
static void (APIENTRY * fptr_glColorSubTable)(GLenum,GLsizei,GLsizei,GLenum,GLenum,const GLvoid *data);
|
206
|
-
static VALUE
|
207
|
-
gl_ColorSubTable(obj,arg1,arg2,arg3,arg4,arg5,arg6)
|
208
|
-
VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6;
|
209
|
-
{
|
210
|
-
GLenum target;
|
211
|
-
GLsizei start;
|
212
|
-
GLsizei count;
|
213
|
-
GLenum format;
|
214
|
-
GLenum type;
|
215
|
-
LOAD_GL_FUNC(glColorSubTable, "1.2");
|
216
|
-
target = (GLenum)NUM2INT(arg1);
|
217
|
-
start = (GLsizei)NUM2UINT(arg2);
|
218
|
-
count = (GLsizei)NUM2UINT(arg3);
|
219
|
-
format = (GLenum)NUM2INT(arg4);
|
220
|
-
type = (GLenum)NUM2INT(arg5);
|
221
|
-
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
222
|
-
fptr_glColorSubTable(target,start,count,format,type,(GLvoid *)NUM2LONG(arg6));
|
223
|
-
} else {
|
224
|
-
VALUE data;
|
225
|
-
data = pack_array_or_pass_string(type,arg6);
|
226
|
-
CheckDataSize(type,format,count,data);
|
227
|
-
fptr_glColorSubTable(target,start,count,format,type,RSTRING_PTR(data));
|
228
|
-
}
|
229
|
-
CHECK_GLERROR_FROM("glColorSubTable");
|
230
|
-
return Qnil;
|
231
|
-
}
|
232
|
-
|
233
|
-
static void (APIENTRY * fptr_glConvolutionFilter1D)(GLenum,GLenum,GLsizei,GLenum,GLenum,const GLvoid *);
|
234
|
-
static VALUE
|
235
|
-
gl_ConvolutionFilter1D(obj,arg1,arg2,arg3,arg4,arg5,arg6)
|
236
|
-
VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6;
|
237
|
-
{
|
238
|
-
GLenum target;
|
239
|
-
GLenum internalformat;
|
240
|
-
GLsizei width;
|
241
|
-
GLenum format;
|
242
|
-
GLenum type;
|
243
|
-
LOAD_GL_FUNC(glConvolutionFilter1D, "1.2");
|
244
|
-
target = (GLenum)NUM2INT(arg1);
|
245
|
-
internalformat = (GLenum)NUM2INT(arg2);
|
246
|
-
width = (GLsizei)NUM2UINT(arg3);
|
247
|
-
format = (GLenum)NUM2INT(arg4);
|
248
|
-
type = (GLenum)NUM2INT(arg5);
|
249
|
-
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
250
|
-
fptr_glConvolutionFilter1D(target,internalformat,width,format,type,(GLvoid *)NUM2LONG(arg6));
|
251
|
-
} else {
|
252
|
-
VALUE data;
|
253
|
-
data = pack_array_or_pass_string(type,arg6);
|
254
|
-
CheckDataSize(type,format,width,data);
|
255
|
-
fptr_glConvolutionFilter1D(target,internalformat,width,format,type,RSTRING_PTR(data));
|
256
|
-
}
|
257
|
-
CHECK_GLERROR_FROM("glConvolutionFilter1D");
|
258
|
-
return Qnil;
|
259
|
-
}
|
260
|
-
|
261
|
-
static void (APIENTRY * fptr_glConvolutionFilter2D)(GLenum,GLenum,GLsizei,GLsizei,GLenum,GLenum,const GLvoid *);
|
262
|
-
static VALUE
|
263
|
-
gl_ConvolutionFilter2D(obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7)
|
264
|
-
VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7;
|
265
|
-
{
|
266
|
-
GLenum target;
|
267
|
-
GLenum internalformat;
|
268
|
-
GLsizei width;
|
269
|
-
GLsizei height;
|
270
|
-
GLenum format;
|
271
|
-
GLenum type;
|
272
|
-
LOAD_GL_FUNC(glConvolutionFilter2D, "1.2");
|
273
|
-
target = (GLenum)NUM2INT(arg1);
|
274
|
-
internalformat = (GLenum)NUM2INT(arg2);
|
275
|
-
width = (GLsizei)NUM2UINT(arg3);
|
276
|
-
height = (GLsizei)NUM2UINT(arg4);
|
277
|
-
format = (GLenum)NUM2INT(arg5);
|
278
|
-
type = (GLenum)NUM2INT(arg6);
|
279
|
-
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
280
|
-
fptr_glConvolutionFilter2D(target,internalformat,width,height,format,type,(GLvoid *)NUM2LONG(arg7));
|
281
|
-
} else {
|
282
|
-
VALUE data;
|
283
|
-
data = pack_array_or_pass_string(type,arg7);
|
284
|
-
Check_Type(arg7,T_STRING);
|
285
|
-
CheckDataSize(type,format,width*height,data);
|
286
|
-
fptr_glConvolutionFilter2D(target,internalformat,width,height,format,type,RSTRING_PTR(data));
|
287
|
-
}
|
288
|
-
CHECK_GLERROR_FROM("glConvolutionFilter2D");
|
289
|
-
return Qnil;
|
290
|
-
}
|
291
|
-
|
292
|
-
static void (APIENTRY * fptr_glConvolutionParameterfv)(GLenum,GLenum,const GLfloat *);
|
293
|
-
static VALUE
|
294
|
-
gl_ConvolutionParameterfv(obj,arg1,arg2,arg3)
|
295
|
-
VALUE obj,arg1,arg2,arg3;
|
296
|
-
{
|
297
|
-
GLenum target;
|
298
|
-
GLenum pname;
|
299
|
-
GLfloat params[4] = {(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0};
|
300
|
-
LOAD_GL_FUNC(glConvolutionParameterfv, "1.2");
|
301
|
-
target = (GLenum)NUM2INT(arg1);
|
302
|
-
pname = (GLenum)NUM2INT(arg2);
|
303
|
-
Check_Type(arg3,T_ARRAY);
|
304
|
-
ary2cflt(arg3,params,4);
|
305
|
-
fptr_glConvolutionParameterfv(target,pname,params);
|
306
|
-
CHECK_GLERROR_FROM("glConvolutionParameterfv");
|
307
|
-
return Qnil;
|
308
|
-
}
|
309
|
-
|
310
|
-
static void (APIENTRY * fptr_glConvolutionParameteriv)(GLenum,GLenum,const GLint *);
|
311
|
-
static VALUE
|
312
|
-
gl_ConvolutionParameteriv(obj,arg1,arg2,arg3)
|
313
|
-
VALUE obj,arg1,arg2,arg3;
|
314
|
-
{
|
315
|
-
GLenum target;
|
316
|
-
GLenum pname;
|
317
|
-
GLint params[4] = {0,0,0,0};
|
318
|
-
LOAD_GL_FUNC(glConvolutionParameteriv, "1.2");
|
319
|
-
target = (GLenum)NUM2INT(arg1);
|
320
|
-
pname = (GLenum)NUM2INT(arg2);
|
321
|
-
Check_Type(arg3,T_ARRAY);
|
322
|
-
ary2cint(arg3,params,4);
|
323
|
-
fptr_glConvolutionParameteriv(target,pname,params);
|
324
|
-
CHECK_GLERROR_FROM("glConvolutionParameteriv");
|
325
|
-
return Qnil;
|
326
|
-
}
|
327
|
-
|
328
|
-
static void (APIENTRY * fptr_glGetConvolutionParameterfv)(GLenum,GLenum,GLfloat *);
|
329
|
-
static VALUE
|
330
|
-
gl_GetConvolutionParameterfv(obj,arg1,arg2)
|
331
|
-
VALUE obj,arg1,arg2;
|
332
|
-
{
|
333
|
-
GLenum target;
|
334
|
-
GLenum pname;
|
335
|
-
GLfloat params[4] = {(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0,(GLfloat)0.0};
|
336
|
-
GLsizei size;
|
337
|
-
LOAD_GL_FUNC(glGetConvolutionParameterfv, "1.2");
|
338
|
-
target = (GLenum)NUM2INT(arg1);
|
339
|
-
pname = (GLenum)NUM2INT(arg2);
|
340
|
-
switch(pname) {
|
341
|
-
case GL_CONVOLUTION_BORDER_COLOR:
|
342
|
-
case GL_CONVOLUTION_FILTER_SCALE:
|
343
|
-
case GL_CONVOLUTION_FILTER_BIAS:
|
344
|
-
size = 4;
|
345
|
-
break;
|
346
|
-
default:
|
347
|
-
size = 1;
|
348
|
-
break;
|
349
|
-
}
|
350
|
-
fptr_glGetConvolutionParameterfv(target,pname,params);
|
351
|
-
RET_ARRAY_OR_SINGLE("glGetConvolutionParamaterfv", size, RETCONV_GLfloat,
|
352
|
-
params);
|
353
|
-
}
|
354
|
-
|
355
|
-
static void (APIENTRY * fptr_glGetConvolutionParameteriv)(GLenum,GLenum,GLint *);
|
356
|
-
static VALUE
|
357
|
-
gl_GetConvolutionParameteriv(obj,arg1,arg2)
|
358
|
-
VALUE obj,arg1,arg2;
|
359
|
-
{
|
360
|
-
GLenum target;
|
361
|
-
GLenum pname;
|
362
|
-
GLint params[4] = {0,0,0,0};
|
363
|
-
GLsizei size;
|
364
|
-
LOAD_GL_FUNC(glGetConvolutionParameteriv, "1.2");
|
365
|
-
target = (GLenum)NUM2INT(arg1);
|
366
|
-
pname = (GLenum)NUM2INT(arg2);
|
367
|
-
switch(pname) {
|
368
|
-
case GL_CONVOLUTION_BORDER_COLOR:
|
369
|
-
case GL_CONVOLUTION_FILTER_SCALE:
|
370
|
-
case GL_CONVOLUTION_FILTER_BIAS:
|
371
|
-
size = 4;
|
372
|
-
break;
|
373
|
-
default:
|
374
|
-
size = 1;
|
375
|
-
break;
|
376
|
-
}
|
377
|
-
fptr_glGetConvolutionParameteriv(target,pname,params);
|
378
|
-
RET_ARRAY_OR_SINGLE("glGetConvolutionParameteriv", size, RETCONV_GLint,
|
379
|
-
params);
|
380
|
-
}
|
381
|
-
|
382
|
-
static void (APIENTRY * fptr_glGetConvolutionFilter)(GLenum,GLenum,GLenum,GLvoid *);
|
383
|
-
static VALUE
|
384
|
-
gl_GetConvolutionFilter(argc,argv,obj)
|
385
|
-
int argc;
|
386
|
-
VALUE *argv;
|
387
|
-
VALUE obj;
|
388
|
-
{
|
389
|
-
GLenum target;
|
390
|
-
GLenum format;
|
391
|
-
GLenum type;
|
392
|
-
GLint size = 0;
|
393
|
-
VALUE data;
|
394
|
-
VALUE args[4];
|
395
|
-
int numargs;
|
396
|
-
LOAD_GL_FUNC(glGetConvolutionFilter, "1.2");
|
397
|
-
LOAD_GL_FUNC(glGetConvolutionParameteriv, "1.2");
|
398
|
-
numargs = rb_scan_args(argc, argv, "31", &args[0], &args[1], &args[2], &args[3]);
|
399
|
-
target = (GLenum)NUM2INT(args[0]);
|
400
|
-
format = (GLenum)NUM2INT(args[1]);
|
401
|
-
type = (GLenum)NUM2INT(args[2]);
|
402
|
-
|
403
|
-
switch(numargs) {
|
404
|
-
default:
|
405
|
-
case 3:
|
406
|
-
if (CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
407
|
-
rb_raise(rb_eArgError, "Pixel pack buffer bound, but offset argument missing");
|
408
|
-
|
409
|
-
if (target==GL_CONVOLUTION_1D) {
|
410
|
-
fptr_glGetConvolutionParameteriv(target,GL_CONVOLUTION_WIDTH,&size);
|
411
|
-
} else {
|
412
|
-
GLint tmp = 0;
|
413
|
-
fptr_glGetConvolutionParameteriv(target,GL_CONVOLUTION_WIDTH,&tmp);
|
414
|
-
fptr_glGetConvolutionParameteriv(target,GL_CONVOLUTION_HEIGHT,&size);
|
415
|
-
size *=tmp;
|
416
|
-
}
|
417
|
-
CHECK_GLERROR_FROM("glGetConvolutionParameteriv");
|
418
|
-
data = allocate_buffer_with_string(GetDataSize(type,format,size));
|
419
|
-
FORCE_PIXEL_STORE_MODE
|
420
|
-
fptr_glGetConvolutionFilter(target,format,type,(GLvoid*)RSTRING_PTR(data));
|
421
|
-
RESTORE_PIXEL_STORE_MODE
|
422
|
-
CHECK_GLERROR_FROM("glGetConvolutionFilter");
|
423
|
-
return data;
|
424
|
-
case 4:
|
425
|
-
if (!CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
426
|
-
rb_raise(rb_eArgError, "Pixel pack buffer not bound");
|
427
|
-
|
428
|
-
FORCE_PIXEL_STORE_MODE
|
429
|
-
fptr_glGetConvolutionFilter(target,format,type,(GLvoid*)NUM2LONG(args[3]));
|
430
|
-
RESTORE_PIXEL_STORE_MODE
|
431
|
-
CHECK_GLERROR_FROM("glGetConvolutionFilter");
|
432
|
-
return Qnil;
|
433
|
-
}
|
434
|
-
}
|
435
|
-
|
436
|
-
static void (APIENTRY * fptr_glGetSeparableFilter)(GLenum,GLenum,GLenum,GLvoid*,GLvoid*,GLvoid*);
|
437
|
-
static VALUE
|
438
|
-
gl_GetSeparableFilter(argc,argv,obj)
|
439
|
-
int argc;
|
440
|
-
VALUE *argv;
|
441
|
-
VALUE obj;
|
442
|
-
{
|
443
|
-
GLenum target;
|
444
|
-
GLenum format;
|
445
|
-
GLenum type;
|
446
|
-
GLint size_row = 0;
|
447
|
-
GLint size_column = 0;
|
448
|
-
VALUE data_row;
|
449
|
-
VALUE data_column;
|
450
|
-
VALUE retary;
|
451
|
-
VALUE args[6];
|
452
|
-
int numargs;
|
453
|
-
LOAD_GL_FUNC(glGetSeparableFilter, "1.2");
|
454
|
-
LOAD_GL_FUNC(glGetConvolutionParameteriv, "1.2");
|
455
|
-
numargs = rb_scan_args(argc, argv, "33", &args[0], &args[1], &args[2], &args[3], &args[4], &args[5]);
|
456
|
-
target = (GLenum)NUM2INT(args[0]);
|
457
|
-
format = (GLenum)NUM2INT(args[1]);
|
458
|
-
type = (GLenum)NUM2INT(args[2]);
|
459
|
-
|
460
|
-
switch(numargs) {
|
461
|
-
default:
|
462
|
-
case 3:
|
463
|
-
if (CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
464
|
-
rb_raise(rb_eArgError, "Pixel pack buffer bound, but offset arguments missing");
|
465
|
-
|
466
|
-
fptr_glGetConvolutionParameteriv(target,GL_CONVOLUTION_WIDTH,&size_row);
|
467
|
-
fptr_glGetConvolutionParameteriv(target,GL_CONVOLUTION_HEIGHT,&size_column);
|
468
|
-
CHECK_GLERROR_FROM("glGetConvolutionParameteriv");
|
469
|
-
data_row = allocate_buffer_with_string(GetDataSize(type,format,size_row));
|
470
|
-
data_column = allocate_buffer_with_string(GetDataSize(type,format,size_column));
|
471
|
-
FORCE_PIXEL_STORE_MODE
|
472
|
-
fptr_glGetSeparableFilter(target,format,type,(GLvoid*)RSTRING_PTR(data_row),(GLvoid*)RSTRING_PTR(data_column),0);
|
473
|
-
RESTORE_PIXEL_STORE_MODE
|
474
|
-
retary = rb_ary_new2(2);
|
475
|
-
rb_ary_push(retary, data_row);
|
476
|
-
rb_ary_push(retary, data_column);
|
477
|
-
CHECK_GLERROR_FROM("glGetSeparableFilter");
|
478
|
-
return retary;
|
479
|
-
break;
|
480
|
-
case 6:
|
481
|
-
if (!CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
482
|
-
rb_raise(rb_eArgError, "Pixel pack buffer not bound");
|
483
|
-
FORCE_PIXEL_STORE_MODE
|
484
|
-
fptr_glGetSeparableFilter(target,format,type,(GLvoid*)NUM2LONG(args[3]),(GLvoid*)NUM2LONG(args[4]),(GLvoid*)NUM2LONG(args[5]));
|
485
|
-
RESTORE_PIXEL_STORE_MODE
|
486
|
-
CHECK_GLERROR_FROM("glGetSeparableFilter");
|
487
|
-
return Qnil;
|
488
|
-
}
|
489
|
-
}
|
490
|
-
|
491
|
-
static void (APIENTRY * fptr_glSeparableFilter2D)(GLenum,GLenum,GLsizei,GLsizei,GLenum,GLenum,const GLvoid *,const GLvoid *);
|
492
|
-
static VALUE
|
493
|
-
gl_SeparableFilter2D(obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8)
|
494
|
-
VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8;
|
495
|
-
{
|
496
|
-
GLenum target;
|
497
|
-
GLenum internalformat;
|
498
|
-
GLsizei width;
|
499
|
-
GLsizei height;
|
500
|
-
GLenum format;
|
501
|
-
GLenum type;
|
502
|
-
LOAD_GL_FUNC(glSeparableFilter2D, "1.2");
|
503
|
-
target = (GLenum)NUM2INT(arg1);
|
504
|
-
internalformat = (GLenum)NUM2INT(arg2);
|
505
|
-
width = (GLsizei)NUM2UINT(arg3);
|
506
|
-
height = (GLsizei)NUM2UINT(arg4);
|
507
|
-
format = (GLenum)NUM2INT(arg5);
|
508
|
-
type = (GLenum)NUM2INT(arg6);
|
509
|
-
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
510
|
-
fptr_glSeparableFilter2D(target,internalformat,width,height,format,type,(GLvoid *)NUM2LONG(arg7),(GLvoid *)NUM2LONG(arg8));
|
511
|
-
} else {
|
512
|
-
VALUE data_1,data_2;
|
513
|
-
data_1 = pack_array_or_pass_string(type,arg7);
|
514
|
-
data_2 = pack_array_or_pass_string(type,arg8);
|
515
|
-
|
516
|
-
CheckDataSize(type,format,width,data_1);
|
517
|
-
CheckDataSize(type,format,height,data_2);
|
518
|
-
fptr_glSeparableFilter2D(target,internalformat,width,height,format,type,RSTRING_PTR(data_1),RSTRING_PTR(data_2));
|
519
|
-
}
|
520
|
-
CHECK_GLERROR_FROM("glSeparableFilter2D");
|
521
|
-
return Qnil;
|
522
|
-
}
|
523
|
-
|
524
|
-
static void (APIENTRY * fptr_glGetHistogramParameterfv)(GLenum,GLenum,GLfloat *);
|
525
|
-
static VALUE
|
526
|
-
gl_GetHistogramParameterfv(obj,arg1,arg2,arg3)
|
527
|
-
VALUE obj,arg1,arg2,arg3;
|
528
|
-
{
|
529
|
-
GLenum target;
|
530
|
-
GLenum pname;
|
531
|
-
GLfloat params = (GLfloat)0.0;
|
532
|
-
LOAD_GL_FUNC(glGetHistogramParameterfv, "1.2");
|
533
|
-
target = (GLenum)NUM2INT(arg1);
|
534
|
-
pname = (GLenum)NUM2INT(arg2);
|
535
|
-
fptr_glGetHistogramParameterfv(target,pname,¶ms);
|
536
|
-
CHECK_GLERROR_FROM("glGetHistogramParameterfv");
|
537
|
-
return RETCONV_GLfloat(params);
|
538
|
-
}
|
539
|
-
|
540
|
-
static void (APIENTRY * fptr_glGetHistogramParameteriv)(GLenum,GLenum,GLint *);
|
541
|
-
static VALUE
|
542
|
-
gl_GetHistogramParameteriv(obj,arg1,arg2,arg3)
|
543
|
-
VALUE obj,arg1,arg2,arg3;
|
544
|
-
{
|
545
|
-
GLenum target;
|
546
|
-
GLenum pname;
|
547
|
-
GLint params = 0;
|
548
|
-
LOAD_GL_FUNC(glGetHistogramParameteriv, "1.2");
|
549
|
-
target = (GLenum)NUM2INT(arg1);
|
550
|
-
pname = (GLenum)NUM2INT(arg2);
|
551
|
-
fptr_glGetHistogramParameteriv(target,pname,¶ms);
|
552
|
-
CHECK_GLERROR_FROM("glGetHistogramParameteriv");
|
553
|
-
return cond_GLBOOL2RUBY(pname,params);
|
554
|
-
}
|
555
|
-
|
556
|
-
static void (APIENTRY * fptr_glGetHistogram)(GLenum,GLboolean,GLenum,GLenum,GLvoid*);
|
557
|
-
static VALUE
|
558
|
-
gl_GetHistogram(argc,argv,obj)
|
559
|
-
int argc;
|
560
|
-
VALUE *argv;
|
561
|
-
VALUE obj;
|
562
|
-
{
|
563
|
-
GLenum target;
|
564
|
-
GLboolean reset;
|
565
|
-
GLenum format;
|
566
|
-
GLenum type;
|
567
|
-
GLint size = 0;
|
568
|
-
VALUE data;
|
569
|
-
VALUE args[5];
|
570
|
-
int numargs;
|
571
|
-
LOAD_GL_FUNC(glGetHistogram, "1.2");
|
572
|
-
LOAD_GL_FUNC(glGetHistogramParameteriv, "1.2");
|
573
|
-
numargs = rb_scan_args(argc, argv, "41", &args[0], &args[1], &args[2], &args[3], &args[4]);
|
574
|
-
target = (GLenum)NUM2INT(args[0]);
|
575
|
-
reset = (GLboolean)RUBYBOOL2GL(args[1]);
|
576
|
-
format = (GLenum)NUM2INT(args[2]);
|
577
|
-
type = (GLenum)NUM2INT(args[3]);
|
578
|
-
|
579
|
-
switch(numargs) {
|
580
|
-
default:
|
581
|
-
case 4:
|
582
|
-
if (CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
583
|
-
rb_raise(rb_eArgError, "Pixel pack buffer bound, but offset argument missing");
|
584
|
-
|
585
|
-
fptr_glGetHistogramParameteriv(target,GL_HISTOGRAM_WIDTH,&size);
|
586
|
-
CHECK_GLERROR_FROM("glGetHistogramParameteriv");
|
587
|
-
data = allocate_buffer_with_string(GetDataSize(type,format,size));
|
588
|
-
FORCE_PIXEL_STORE_MODE
|
589
|
-
fptr_glGetHistogram(target,reset,format,type,(GLvoid*)RSTRING_PTR(data));
|
590
|
-
RESTORE_PIXEL_STORE_MODE
|
591
|
-
CHECK_GLERROR_FROM("glGetHistogram");
|
592
|
-
return data;
|
593
|
-
break;
|
594
|
-
case 5:
|
595
|
-
if (!CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
596
|
-
rb_raise(rb_eArgError, "Pixel pack buffer not bound");
|
597
|
-
|
598
|
-
FORCE_PIXEL_STORE_MODE
|
599
|
-
fptr_glGetHistogram(target,reset,format,type,(GLvoid*)NUM2LONG(args[4]));
|
600
|
-
RESTORE_PIXEL_STORE_MODE
|
601
|
-
CHECK_GLERROR_FROM("glGetHistogram");
|
602
|
-
return Qnil;
|
603
|
-
}
|
604
|
-
}
|
605
|
-
|
606
|
-
static void (APIENTRY * fptr_glGetMinmax)(GLenum,GLboolean,GLenum,GLenum,GLvoid *);
|
607
|
-
static VALUE
|
608
|
-
gl_GetMinmax(argc,argv,obj)
|
609
|
-
int argc;
|
610
|
-
VALUE *argv;
|
611
|
-
VALUE obj;
|
612
|
-
{
|
613
|
-
GLenum target;
|
614
|
-
GLboolean reset;
|
615
|
-
GLenum format;
|
616
|
-
GLenum type;
|
617
|
-
VALUE data;
|
618
|
-
VALUE args[5];
|
619
|
-
int numargs;
|
620
|
-
LOAD_GL_FUNC(glGetMinmax, "1.2");
|
621
|
-
numargs = rb_scan_args(argc, argv, "41", &args[0], &args[1], &args[2], &args[3], &args[4]);
|
622
|
-
target = (GLenum)NUM2INT(args[0]);
|
623
|
-
reset = (GLboolean)RUBYBOOL2GL(args[1]);
|
624
|
-
format = (GLenum)NUM2INT(args[2]);
|
625
|
-
type = (GLenum)NUM2INT(args[3]);
|
626
|
-
|
627
|
-
switch(numargs) {
|
628
|
-
default:
|
629
|
-
case 4:
|
630
|
-
if (CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
631
|
-
rb_raise(rb_eArgError, "Pixel pack buffer bound, but offset argument missing");
|
632
|
-
|
633
|
-
data = allocate_buffer_with_string(GetDataSize(type,format,2));
|
634
|
-
FORCE_PIXEL_STORE_MODE
|
635
|
-
fptr_glGetMinmax(target,reset,format,type,(GLvoid*)RSTRING_PTR(data));
|
636
|
-
RESTORE_PIXEL_STORE_MODE
|
637
|
-
CHECK_GLERROR_FROM("glGetMinmax");
|
638
|
-
return data;
|
639
|
-
break;
|
640
|
-
case 5:
|
641
|
-
if (!CheckBufferBinding(GL_PIXEL_PACK_BUFFER_BINDING))
|
642
|
-
rb_raise(rb_eArgError, "Pixel pack buffer not bound");
|
643
|
-
|
644
|
-
FORCE_PIXEL_STORE_MODE
|
645
|
-
fptr_glGetMinmax(target,reset,format,type,(GLvoid*)NUM2LONG(args[4]));
|
646
|
-
RESTORE_PIXEL_STORE_MODE
|
647
|
-
CHECK_GLERROR_FROM("glGetMinmax");
|
648
|
-
return Qnil;
|
649
|
-
}
|
650
|
-
}
|
651
|
-
|
652
|
-
static void (APIENTRY * fptr_glGetMinmaxParameterfv)(GLenum,GLenum,GLfloat *);
|
653
|
-
static VALUE
|
654
|
-
gl_GetMinmaxParameterfv(obj,arg1,arg2)
|
655
|
-
VALUE obj,arg1,arg2;
|
656
|
-
{
|
657
|
-
GLenum target;
|
658
|
-
GLenum pname;
|
659
|
-
GLfloat params = (GLfloat)0.0;
|
660
|
-
LOAD_GL_FUNC(glGetMinmaxParameterfv, "1.2");
|
661
|
-
target = (GLenum)NUM2INT(arg1);
|
662
|
-
pname = (GLenum)NUM2INT(arg2);
|
663
|
-
fptr_glGetMinmaxParameterfv(target,pname,¶ms);
|
664
|
-
CHECK_GLERROR_FROM("glGetMinmaxParameterfv");
|
665
|
-
return RETCONV_GLfloat(params);
|
666
|
-
}
|
667
|
-
|
668
|
-
static void (APIENTRY * fptr_glGetMinmaxParameteriv)(GLenum,GLenum,GLint *);
|
669
|
-
static VALUE
|
670
|
-
gl_GetMinmaxParameteriv(obj,arg1,arg2)
|
671
|
-
VALUE obj,arg1,arg2;
|
672
|
-
{
|
673
|
-
GLenum target;
|
674
|
-
GLenum pname;
|
675
|
-
GLint params = 0;
|
676
|
-
LOAD_GL_FUNC(glGetMinmaxParameteriv, "1.2");
|
677
|
-
target = (GLenum)NUM2INT(arg1);
|
678
|
-
pname = (GLenum)NUM2INT(arg2);
|
679
|
-
fptr_glGetMinmaxParameteriv(target,pname,¶ms);
|
680
|
-
CHECK_GLERROR_FROM("glGetMinmaxParameteriv");
|
681
|
-
return cond_GLBOOL2RUBY(pname,params);
|
682
|
-
}
|
683
|
-
|
684
53
|
static void (APIENTRY * fptr_glTexImage3D)(GLenum,GLint,GLint,GLsizei,GLsizei,GLsizei,GLint,GLenum,GLenum,const GLvoid*);
|
685
54
|
static VALUE
|
686
55
|
gl_TexImage3D(obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10)
|
@@ -709,7 +78,7 @@ VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10;
|
|
709
78
|
|
710
79
|
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
711
80
|
fptr_glTexImage3D( target, level, internalFormat, width, height,
|
712
|
-
|
81
|
+
depth, border, format, type,(GLvoid *)NUM2SIZET(arg10));
|
713
82
|
CHECK_GLERROR_FROM("glTexImage3D");
|
714
83
|
return Qnil;
|
715
84
|
}
|
@@ -728,7 +97,7 @@ VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10;
|
|
728
97
|
pixels = RSTRING_PTR(data);
|
729
98
|
}
|
730
99
|
fptr_glTexImage3D( target, level, internalFormat, width, height,
|
731
|
-
|
100
|
+
depth, border, format, type,pixels);
|
732
101
|
CHECK_GLERROR_FROM("glTexImage3D");
|
733
102
|
return Qnil;
|
734
103
|
}
|
@@ -762,7 +131,7 @@ VALUE obj,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11;
|
|
762
131
|
if (CheckBufferBinding(GL_PIXEL_UNPACK_BUFFER_BINDING)) {
|
763
132
|
fptr_glTexSubImage3D( target, level, xoffset, yoffset, zoffset,
|
764
133
|
width, height, depth,
|
765
|
-
format, type, (GLvoid *)
|
134
|
+
format, type, (GLvoid *)NUM2SIZET(arg11));
|
766
135
|
} else {
|
767
136
|
VALUE data;
|
768
137
|
data = pack_array_or_pass_string(type,arg11);
|
@@ -780,38 +149,6 @@ void gl_init_functions_1_2(VALUE module)
|
|
780
149
|
rb_define_module_function(module, "glBlendColor", gl_BlendColor, 4);
|
781
150
|
rb_define_module_function(module, "glBlendEquation", gl_BlendEquation, 1);
|
782
151
|
rb_define_module_function(module, "glDrawRangeElements", gl_DrawRangeElements, 6);
|
783
|
-
rb_define_module_function(module, "glColorTable", gl_ColorTable, 6);
|
784
|
-
rb_define_module_function(module, "glColorTableParameterfv", gl_ColorTableParameterfv, 3);
|
785
|
-
rb_define_module_function(module, "glColorTableParameteriv", gl_ColorTableParameteriv, 3);
|
786
|
-
rb_define_module_function(module, "glCopyColorTable", gl_CopyColorTable, 5);
|
787
|
-
rb_define_module_function(module, "glGetColorTable", gl_GetColorTable, 3);
|
788
|
-
rb_define_module_function(module, "glGetColorTableParameterfv", gl_GetColorTableParameterfv, 2);
|
789
|
-
rb_define_module_function(module, "glGetColorTableParameteriv", gl_GetColorTableParameteriv, 2);
|
790
|
-
rb_define_module_function(module, "glColorSubTable", gl_ColorSubTable, 6);
|
791
|
-
rb_define_module_function(module, "glCopyColorSubTable", gl_CopyColorSubTable, 5);
|
792
|
-
rb_define_module_function(module, "glConvolutionFilter1D", gl_ConvolutionFilter1D, 6);
|
793
|
-
rb_define_module_function(module, "glConvolutionFilter2D", gl_ConvolutionFilter2D, 7);
|
794
|
-
rb_define_module_function(module, "glConvolutionParameterf", gl_ConvolutionParameterf, 3);
|
795
|
-
rb_define_module_function(module, "glConvolutionParameterfv", gl_ConvolutionParameterfv, 3);
|
796
|
-
rb_define_module_function(module, "glConvolutionParameteri", gl_ConvolutionParameteri, 3);
|
797
|
-
rb_define_module_function(module, "glConvolutionParameteriv", gl_ConvolutionParameteriv, 3);
|
798
|
-
rb_define_module_function(module, "glCopyConvolutionFilter1D", gl_CopyConvolutionFilter1D, 5);
|
799
|
-
rb_define_module_function(module, "glCopyConvolutionFilter2D", gl_CopyConvolutionFilter2D, 6);
|
800
|
-
rb_define_module_function(module, "glGetConvolutionFilter", gl_GetConvolutionFilter, -1);
|
801
|
-
rb_define_module_function(module, "glGetConvolutionParameterfv", gl_GetConvolutionParameterfv, 2);
|
802
|
-
rb_define_module_function(module, "glGetConvolutionParameteriv", gl_GetConvolutionParameteriv, 2);
|
803
|
-
rb_define_module_function(module, "glGetSeparableFilter", gl_GetSeparableFilter, -1);
|
804
|
-
rb_define_module_function(module, "glSeparableFilter2D", gl_SeparableFilter2D, 8);
|
805
|
-
rb_define_module_function(module, "glGetHistogram", gl_GetHistogram, -1);
|
806
|
-
rb_define_module_function(module, "glGetHistogramParameterfv", gl_GetHistogramParameterfv, 2);
|
807
|
-
rb_define_module_function(module, "glGetHistogramParameteriv", gl_GetHistogramParameteriv, 2);
|
808
|
-
rb_define_module_function(module, "glGetMinmax", gl_GetMinmax, -1);
|
809
|
-
rb_define_module_function(module, "glGetMinmaxParameterfv", gl_GetMinmaxParameterfv, 2);
|
810
|
-
rb_define_module_function(module, "glGetMinmaxParameteriv", gl_GetMinmaxParameteriv, 2);
|
811
|
-
rb_define_module_function(module, "glHistogram", gl_Histogram, 4);
|
812
|
-
rb_define_module_function(module, "glMinmax", gl_Minmax, 3);
|
813
|
-
rb_define_module_function(module, "glResetHistogram", gl_ResetHistogram, 1);
|
814
|
-
rb_define_module_function(module, "glResetMinmax", gl_ResetMinmax, 1);
|
815
152
|
rb_define_module_function(module, "glTexImage3D", gl_TexImage3D, 10);
|
816
153
|
rb_define_module_function(module, "glTexSubImage3D", gl_TexSubImage3D, 11);
|
817
154
|
rb_define_module_function(module, "glCopyTexSubImage3D", gl_CopyTexSubImage3D, 9);
|