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.
Files changed (149) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +2 -0
  4. data/.gitignore +2 -1
  5. data/.travis.yml +19 -0
  6. data/History.rdoc +26 -0
  7. data/Manifest.txt +3 -23
  8. data/README.rdoc +43 -37
  9. data/Rakefile +6 -62
  10. data/examples/NeHe/nehe_lesson02.rb +3 -2
  11. data/examples/NeHe/nehe_lesson03.rb +3 -2
  12. data/examples/NeHe/nehe_lesson04.rb +3 -1
  13. data/examples/NeHe/nehe_lesson05.rb +4 -1
  14. data/examples/NeHe/nehe_lesson06.rb +9 -6
  15. data/examples/NeHe/nehe_lesson07.rb +9 -6
  16. data/examples/NeHe/nehe_lesson08.rb +9 -6
  17. data/examples/NeHe/nehe_lesson09.rb +10 -6
  18. data/examples/NeHe/nehe_lesson11.rb +9 -6
  19. data/examples/NeHe/nehe_lesson12.rb +9 -6
  20. data/examples/NeHe/nehe_lesson16.rb +50 -47
  21. data/examples/NeHe/nehe_lesson19.rb +10 -7
  22. data/examples/NeHe/nehe_lesson36.rb +234 -229
  23. data/examples/OrangeBook/brick.rb +227 -225
  24. data/examples/OrangeBook/particle.rb +233 -231
  25. data/examples/RedBook/aapoly.rb +71 -70
  26. data/examples/RedBook/aargb.rb +54 -52
  27. data/examples/RedBook/accanti.rb +96 -94
  28. data/examples/RedBook/accpersp.rb +106 -104
  29. data/examples/RedBook/alpha.rb +54 -52
  30. data/examples/RedBook/alpha3D.rb +90 -88
  31. data/examples/RedBook/bezcurve.rb +48 -46
  32. data/examples/RedBook/bezmesh.rb +71 -69
  33. data/examples/RedBook/checker.rb +57 -55
  34. data/examples/RedBook/clip.rb +41 -39
  35. data/examples/RedBook/colormat.rb +72 -70
  36. data/examples/RedBook/cube.rb +39 -37
  37. data/examples/RedBook/depthcue.rb +37 -35
  38. data/examples/RedBook/dof.rb +110 -109
  39. data/examples/RedBook/double.rb +40 -38
  40. data/examples/RedBook/drawf.rb +30 -28
  41. data/examples/RedBook/feedback.rb +79 -77
  42. data/examples/RedBook/fog.rb +90 -89
  43. data/examples/RedBook/font.rb +78 -76
  44. data/examples/RedBook/hello.rb +29 -27
  45. data/examples/RedBook/image.rb +57 -55
  46. data/examples/RedBook/jitter.rb +131 -131
  47. data/examples/RedBook/light.rb +2 -1
  48. data/examples/RedBook/lines.rb +70 -68
  49. data/examples/RedBook/list.rb +48 -46
  50. data/examples/RedBook/material.rb +200 -199
  51. data/examples/RedBook/mipmap.rb +84 -82
  52. data/examples/RedBook/model.rb +55 -53
  53. data/examples/RedBook/movelight.rb +52 -50
  54. data/examples/RedBook/pickdepth.rb +103 -101
  55. data/examples/RedBook/planet.rb +46 -44
  56. data/examples/RedBook/quadric.rb +97 -95
  57. data/examples/RedBook/robot.rb +55 -53
  58. data/examples/RedBook/select.rb +118 -116
  59. data/examples/RedBook/smooth.rb +35 -33
  60. data/examples/RedBook/stencil.rb +96 -94
  61. data/examples/RedBook/stroke.rb +75 -73
  62. data/examples/RedBook/surface.rb +93 -91
  63. data/examples/RedBook/teaambient.rb +71 -69
  64. data/examples/RedBook/teapots.rb +105 -103
  65. data/examples/RedBook/tess.rb +96 -94
  66. data/examples/RedBook/texbind.rb +79 -77
  67. data/examples/RedBook/texgen.rb +88 -86
  68. data/examples/RedBook/texturesurf.rb +57 -55
  69. data/examples/RedBook/varray.rb +85 -83
  70. data/examples/RedBook/wrap.rb +76 -74
  71. data/examples/misc/OGLBench.rb +114 -113
  72. data/examples/misc/anisotropic.rb +154 -152
  73. data/examples/misc/fbo_test.rb +37 -36
  74. data/examples/misc/font-glut.rb +47 -46
  75. data/examples/misc/glfwtest.rb +16 -16
  76. data/examples/misc/plane.rb +13 -13
  77. data/examples/misc/readpixel.rb +66 -65
  78. data/examples/misc/sdltest.rb +21 -19
  79. data/examples/misc/trislam.rb +548 -547
  80. data/ext/opengl/common.h +16 -38
  81. data/ext/opengl/conv.h +39 -41
  82. data/ext/opengl/extconf.rb +4 -31
  83. data/ext/opengl/funcdef.h +126 -124
  84. data/ext/opengl/gl-1.0-1.1.c +1917 -1917
  85. data/ext/opengl/gl-1.2.c +4 -667
  86. data/ext/opengl/gl-1.3.c +9 -9
  87. data/ext/opengl/gl-1.4.c +8 -8
  88. data/ext/opengl/gl-1.5.c +1 -1
  89. data/ext/opengl/gl-2.0.c +392 -388
  90. data/ext/opengl/gl-3.0.c +493 -0
  91. data/ext/opengl/gl-enums.c +1523 -5
  92. data/ext/opengl/gl-enums.h +4679 -122
  93. data/ext/opengl/gl-error.c +7 -7
  94. data/ext/opengl/gl-error.h +4 -4
  95. data/ext/opengl/gl-ext-arb.c +468 -464
  96. data/ext/opengl/gl-ext-ext.c +18 -18
  97. data/ext/opengl/gl-ext-nv.c +15 -15
  98. data/ext/opengl/gl.c +2 -0
  99. data/ext/opengl/gl_buffer.c +92 -92
  100. data/ext/opengl/opengl.c +1 -7
  101. data/lib/opengl.rb +23 -59
  102. data/lib/opengl/1.9/opengl.so +0 -0
  103. data/lib/opengl/2.0/opengl.so +0 -0
  104. data/lib/opengl/2.1/opengl.so +0 -0
  105. data/lib/opengl/test_case.rb +1 -2
  106. data/test/dummy.xorg.conf +140 -0
  107. data/test/test_gl.rb +18 -22
  108. data/test/test_gl_10_11.rb +220 -220
  109. data/test/test_gl_12.rb +11 -122
  110. data/test/test_gl_13.rb +202 -210
  111. data/test/test_gl_14.rb +16 -19
  112. data/test/test_gl_15.rb +2 -4
  113. data/test/test_gl_20.rb +45 -58
  114. data/test/test_gl_21.rb +46 -163
  115. data/test/test_gl_ext_arb.rb +54 -72
  116. data/test/test_gl_ext_ati.rb +0 -2
  117. data/test/test_gl_ext_ext.rb +66 -66
  118. data/test/test_gl_ext_gremedy.rb +8 -15
  119. data/test/test_gl_ext_nv.rb +109 -112
  120. data/test/test_opengl_buffer.rb +8 -25
  121. data/utils/README +0 -5
  122. data/utils/enumgen.rb +72 -76
  123. data/utils/extlistgen.rb +55 -55
  124. metadata +90 -67
  125. metadata.gz.sig +0 -0
  126. data/Rakefile.cross +0 -107
  127. data/docs/build_install.txt +0 -119
  128. data/docs/extensions.txt.in +0 -348
  129. data/docs/history.txt +0 -66
  130. data/docs/requirements_and_design.txt +0 -117
  131. data/docs/roadmap.txt +0 -28
  132. data/docs/scientific_use.txt +0 -35
  133. data/docs/supplies/page_template.html +0 -71
  134. data/docs/thanks.txt +0 -29
  135. data/docs/tutorial.txt +0 -469
  136. data/ext/opengl/glu-enums.c +0 -164
  137. data/ext/opengl/glu-enums.h +0 -463
  138. data/ext/opengl/glu.c +0 -1534
  139. data/ext/opengl/glut.c +0 -1145
  140. data/ext/opengl/glut_callbacks.c +0 -845
  141. data/lib/glu.rb +0 -1
  142. data/lib/glut.rb +0 -1
  143. data/lib/opengl/opengl.so +0 -0
  144. data/test/test_glu.rb +0 -309
  145. data/utils/mkdn2html.rb +0 -59
  146. data/utils/post-mkdn2html.rb +0 -91
  147. data/website/images/ogl.jpg +0 -0
  148. data/website/images/tab_bottom.gif +0 -0
  149. data/website/style.css +0 -198
@@ -17,19 +17,22 @@ require 'opengl/test_case'
17
17
 
18
18
  class TestGl12 < OpenGL::TestCase
19
19
 
20
+ def setup
21
+ super
22
+ supported? 1.2
23
+ end
24
+
20
25
  def test_glblend
21
- supported?(1.2)
22
26
  glBlendColor(0.0, 1.0, 0.0, 1.0)
23
27
  assert_equal(glGetDoublev(GL_BLEND_COLOR), [0, 1, 0, 1])
24
28
 
25
29
  glBlendEquation(GL_MIN)
26
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION), GL_MIN)
30
+ assert_equal(GL_MIN, glGetIntegerv(GL_BLEND_EQUATION))
27
31
  glBlendEquation(GL_MAX)
28
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION), GL_MAX)
32
+ assert_equal(GL_MAX, glGetIntegerv(GL_BLEND_EQUATION))
29
33
  end
30
34
 
31
35
  def test_gldrawrangeelements
32
- supported?(1.2)
33
36
  va = [0, 0, 0, 1, 1, 1].pack("f*")
34
37
  glVertexPointer(2, GL_FLOAT, 0, va)
35
38
 
@@ -40,124 +43,12 @@ class TestGl12 < OpenGL::TestCase
40
43
 
41
44
  glDrawRangeElements(GL_POINTS, 0, 2, 3, GL_UNSIGNED_BYTE, [0, 1, 2].pack("C*"))
42
45
  count = glRenderMode(GL_RENDER)
43
- assert_equal(count, 12)
46
+ assert_equal(12, count)
44
47
 
45
48
  glDisableClientState(GL_VERTEX_ARRAY)
46
49
  end
47
50
 
48
- def test_colortable
49
- supported?(1.2)
50
-
51
- ct = ([0]*3+[1]*3+[0]*3+[1]*3).pack("f*")
52
- ct2 = ([1]*3+[0]*3+[1]*3+[0]*3).pack("f*")
53
- glColorTable(GL_COLOR_TABLE, GL_RGB8, 4, GL_RGB, GL_FLOAT, ct)
54
- assert_equal(glGetColorTable(GL_COLOR_TABLE, GL_RGB, GL_FLOAT), ct)
55
-
56
- glColorSubTable(GL_COLOR_TABLE, 0, 4, GL_RGB, GL_FLOAT, ct2)
57
- assert_equal(glGetColorTable(GL_COLOR_TABLE, GL_RGB, GL_FLOAT), ct2)
58
-
59
- glDrawPixels(4, 1, GL_RGB, GL_FLOAT, ct)
60
- glCopyColorTable(GL_COLOR_TABLE, GL_RGB8, 0, 0, 4)
61
- assert_equal(glGetColorTable(GL_COLOR_TABLE, GL_RGB, GL_FLOAT), ct)
62
-
63
- glDrawPixels(4, 1, GL_RGB, GL_FLOAT, ct2)
64
- glCopyColorSubTable(GL_COLOR_TABLE, 0, 0, 0, 4)
65
- assert_equal(glGetColorTable(GL_COLOR_TABLE, GL_RGB, GL_FLOAT), ct2)
66
-
67
- glColorTableParameterfv(GL_COLOR_TABLE, GL_COLOR_TABLE_BIAS, [0, 1, 0, 1])
68
- assert_equal(glGetColorTableParameterfv(GL_COLOR_TABLE, GL_COLOR_TABLE_BIAS), [0, 1, 0, 1])
69
-
70
- glColorTableParameteriv(GL_COLOR_TABLE, GL_COLOR_TABLE_BIAS, [1, 0, 1, 0])
71
- assert_equal(glGetColorTableParameteriv(GL_COLOR_TABLE, GL_COLOR_TABLE_BIAS), [1, 0, 1, 0])
72
- end
73
-
74
- def test_convolutionfilter
75
- supported?(1.2)
76
-
77
- cf = ([0]*3+[1]*3+[0]*3+[1]*3).pack("f*")
78
- cf2 = ([1]*3+[0]*3+[1]*3+[0]*3).pack("f*")
79
- glConvolutionFilter1D(GL_CONVOLUTION_1D, GL_RGB8, 4, GL_RGB, GL_FLOAT,cf)
80
- assert_equal(glGetConvolutionFilter(GL_CONVOLUTION_1D, GL_RGB, GL_FLOAT),cf)
81
-
82
- glConvolutionFilter2D(GL_CONVOLUTION_2D, GL_RGB8, 2,2, GL_RGB, GL_FLOAT,cf2)
83
- assert_equal(glGetConvolutionFilter(GL_CONVOLUTION_2D, GL_RGB, GL_FLOAT),cf2)
84
-
85
- glDrawPixels(4,1,GL_RGB,GL_FLOAT,cf2)
86
- glCopyConvolutionFilter1D(GL_CONVOLUTION_1D,GL_RGB8,0,0,4)
87
- assert_equal(glGetConvolutionFilter(GL_CONVOLUTION_1D, GL_RGB, GL_FLOAT),cf2)
88
-
89
- glDrawPixels(2,2,GL_RGB,GL_FLOAT,cf)
90
- glCopyConvolutionFilter2D(GL_CONVOLUTION_2D,GL_RGB8,0,0,2,2)
91
- assert_equal(glGetConvolutionFilter(GL_CONVOLUTION_2D, GL_RGB, GL_FLOAT),cf)
92
-
93
- glConvolutionParameterf(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE,GL_CONSTANT_BORDER)
94
- assert_equal(glGetConvolutionParameterfv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE),GL_CONSTANT_BORDER)
95
-
96
- glConvolutionParameterf(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE,GL_REPLICATE_BORDER)
97
- assert_equal(glGetConvolutionParameterfv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE),GL_REPLICATE_BORDER)
98
-
99
- glConvolutionParameterfv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE,[GL_CONSTANT_BORDER])
100
- assert_equal(glGetConvolutionParameterfv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE),GL_CONSTANT_BORDER)
101
-
102
- glConvolutionParameteri(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE,GL_REPLICATE_BORDER)
103
- assert_equal(glGetConvolutionParameteriv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE),GL_REPLICATE_BORDER)
104
-
105
- glConvolutionParameteriv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE,[GL_CONSTANT_BORDER])
106
- assert_equal(glGetConvolutionParameteriv(GL_CONVOLUTION_1D,GL_CONVOLUTION_BORDER_MODE),GL_CONSTANT_BORDER)
107
- end
108
-
109
- def test_separablefilter
110
- supported?(1.2)
111
- sf_a = ([0]*3+[1]*3).pack("f*")
112
- sf_b = ([1]*3+[0]*3).pack("f*")
113
-
114
- glSeparableFilter2D(GL_SEPARABLE_2D, GL_RGB8, 2, 2, GL_RGB, GL_FLOAT, sf_a, sf_b)
115
- assert_equal(glGetSeparableFilter(GL_SEPARABLE_2D, GL_RGB, GL_FLOAT), [sf_a, sf_b])
116
- end
117
-
118
- def test_histogram
119
- supported?(1.2)
120
-
121
- glEnable(GL_HISTOGRAM)
122
-
123
- glHistogram(GL_HISTOGRAM, 1, GL_RGB, GL_FALSE)
124
- assert_equal(glGetHistogramParameterfv(GL_HISTOGRAM, GL_HISTOGRAM_WIDTH), 1)
125
- assert_equal(glGetHistogramParameteriv(GL_HISTOGRAM, GL_HISTOGRAM_FORMAT), GL_RGB)
126
- assert_equal(glGetHistogramParameteriv(GL_HISTOGRAM, GL_HISTOGRAM_SINK), GL_FALSE)
127
-
128
- glDrawPixels(2, 1, GL_RGB, GL_FLOAT, [1, 1, 1, 1, 1, 1].pack("f*"))
129
- h = glGetHistogram(GL_HISTOGRAM, GL_FALSE, GL_RGB, GL_FLOAT)
130
- assert_equal(h.unpack("f*"), [2, 2, 2])
131
- glResetHistogram(GL_HISTOGRAM)
132
- h = glGetHistogram(GL_HISTOGRAM, GL_FALSE, GL_RGB, GL_FLOAT)
133
- assert_equal(h.unpack("f*"), [0, 0, 0])
134
-
135
- glDisable(GL_HISTOGRAM)
136
- end
137
-
138
- def test_minmax
139
- supported?(1.2)
140
-
141
- glEnable(GL_MINMAX)
142
-
143
- glMinmax(GL_MINMAX, GL_RGB, GL_FALSE)
144
- assert_equal(glGetMinmaxParameteriv(GL_MINMAX, GL_MINMAX_FORMAT), GL_RGB)
145
- assert_equal(glGetMinmaxParameterfv(GL_MINMAX, GL_MINMAX_FORMAT), GL_RGB)
146
- assert_equal(glGetMinmaxParameteriv(GL_MINMAX, GL_MINMAX_SINK), GL_FALSE)
147
-
148
- glDrawPixels(2, 1, GL_RGB, GL_FLOAT, [0, 0, 0, 1, 1, 1].pack("f*"))
149
- mm = glGetMinmax(GL_MINMAX, GL_FALSE, GL_RGB, GL_FLOAT)
150
- assert_each_in_delta [0, 0, 0, 1, 1, 1], mm.unpack("f*")
151
-
152
- glResetMinmax(GL_MINMAX)
153
- mm = glGetMinmax(GL_MINMAX, GL_FALSE, GL_RGB, GL_UNSIGNED_BYTE)
154
- assert_equal [-1, -1, -1, 0, 0, 0], mm.unpack("c*")
155
-
156
- glDisable(GL_MINMAX)
157
- end
158
-
159
51
  def test_texture_3D
160
- supported?(1.2)
161
52
  image = ([0, 0, 0, 1, 1, 1] * 2 * 2).pack("f*")
162
53
  image2 = ([1, 1, 1, 0, 0, 0] * 2 * 2).pack("f*")
163
54
 
@@ -165,18 +56,16 @@ class TestGl12 < OpenGL::TestCase
165
56
  glBindTexture(GL_TEXTURE_3D, textures[0])
166
57
 
167
58
  glTexImage3D(GL_TEXTURE_3D, 0, GL_RGB8, 2, 2, 2, 0, GL_RGB, GL_FLOAT, image)
168
- assert_equal(glGetTexImage(GL_TEXTURE_3D, 0, GL_RGB, GL_FLOAT), image)
59
+ assert_equal(image, glGetTexImage(GL_TEXTURE_3D, 0, GL_RGB, GL_FLOAT))
169
60
 
170
61
  glTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, 2, 2, 2, GL_RGB, GL_FLOAT, image2)
171
- assert_equal(glGetTexImage(GL_TEXTURE_3D, 0, GL_RGB, GL_FLOAT), image2)
62
+ assert_equal(image2, glGetTexImage(GL_TEXTURE_3D, 0, GL_RGB, GL_FLOAT))
172
63
 
173
64
  glDrawPixels(2, 2, GL_RGB, GL_FLOAT, image)
174
65
  glCopyTexSubImage3D(GL_TEXTURE_3D, 0, 0, 0, 0, 0, 0, 2, 2)
175
66
  ti = glGetTexImage(GL_TEXTURE_3D, 0, GL_RGB, GL_FLOAT).unpack("f*")
176
- assert_equal(ti, ([0]*3 + [1]*3) * 2 + ([1]*3 + [0]*3) * 2)
67
+ assert_equal(([0]*3 + [1]*3) * 2 + ([1]*3 + [0]*3) * 2, ti)
177
68
 
178
69
  glDeleteTextures(textures)
179
70
  end
180
-
181
71
  end
182
-
@@ -16,214 +16,206 @@
16
16
  require 'opengl/test_case'
17
17
 
18
18
  class TestGl13 < OpenGL::TestCase
19
- def setup
20
- super()
21
- end
22
-
23
- def teardown
24
- super()
25
- end
26
-
27
- def test_glsamplecoverage
28
- supported?(1.3)
29
- glSampleCoverage(0.0,GL_TRUE)
30
- assert_equal(glGetDoublev(GL_SAMPLE_COVERAGE_VALUE),0.0)
31
- assert_equal(glGetBooleanv(GL_SAMPLE_COVERAGE_INVERT),GL_TRUE)
32
- glSampleCoverage(1.0,GL_FALSE)
33
- assert_equal(glGetDoublev(GL_SAMPLE_COVERAGE_VALUE),1.0)
34
- assert_equal(glGetBooleanv(GL_SAMPLE_COVERAGE_INVERT),GL_FALSE)
35
- end
36
-
37
- def test_multitexture
38
- supported?(1.3)
39
- glActiveTexture(GL_TEXTURE1)
40
- glClientActiveTexture(GL_TEXTURE2)
41
- assert_equal(glGetIntegerv(GL_ACTIVE_TEXTURE),GL_TEXTURE1)
42
- assert_equal(glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE),GL_TEXTURE2)
43
- end
44
-
45
- def test_transposematrix
46
- supported?(1.3)
47
- m_a = [[1.0,2.0,3.0,4.0],
48
- [0.0,2.0,0.0,0.0],
49
- [0.0,0.0,2.0,0.0],
50
- [0.0,0.0,0.0,2.0]]
51
-
52
- m_b = [[1.0,2.0,3.0,4.0],
53
- [0.0,3.0,0.0,0.0],
54
- [0.0,0.0,3.0,0.0],
55
- [0.0,0.0,0.0,3.0]]
56
-
57
- glMatrixMode(GL_MODELVIEW)
58
- glLoadTransposeMatrixf(m_a)
59
- assert_equal(glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX), m_a)
60
-
61
- glLoadTransposeMatrixd(m_b)
62
- assert_equal(glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX), m_b)
63
-
64
- glLoadIdentity()
65
- glMultTransposeMatrixf(m_a)
66
- assert_equal(glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX), m_a)
67
-
68
- glLoadIdentity()
69
- glMultTransposeMatrixd(m_b)
70
- assert_equal(glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX), m_b)
71
-
72
- # 2
73
- m = Matrix.rows([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]])
74
- glMatrixMode(GL_MODELVIEW)
75
- glLoadTransposeMatrixf(m)
76
- assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX), m.to_a.transpose)
77
- glLoadIdentity()
78
- glLoadTransposeMatrixd(m)
79
- assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX), m.to_a.transpose)
80
- glLoadIdentity()
81
- glMultTransposeMatrixf(m)
82
- assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX), m.to_a.transpose)
83
- glLoadIdentity()
84
- glMultTransposeMatrixd(m)
85
- assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX), m.to_a.transpose)
86
-
87
- assert_raises ArgumentError do glLoadTransposeMatrixf([1,2,3,4]) end
88
- assert_raises ArgumentError do glLoadTransposeMatrixd([1,2,3,4]) end
89
- assert_raises ArgumentError do glMultTransposeMatrixf([1,2,3,4]) end
90
- assert_raises ArgumentError do glMultTransposeMatrixd([1,2,3,4]) end
91
- end
92
-
93
- def test_texturecompression
94
- supported?(1.3)
95
- supported?("GL_EXT_texture_compression_s3tc")
96
-
97
- # S3TC/DXT5 compressed 2x2 pixels stipple patterns [w,b,b,w] and [b,w,w,b]
98
- image_1 = [0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x01,0x54,0x5C,0x5C].pack("C*")
99
- image_2 = [0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x54,0x01,0x0D,0x0D].pack("C*")
100
-
101
- textures = glGenTextures(3)
102
- glBindTexture(GL_TEXTURE_1D,textures[0])
103
- glBindTexture(GL_TEXTURE_2D,textures[1])
104
- glBindTexture(GL_TEXTURE_3D,textures[2])
105
-
106
- # Note: 1D and 3D compressed textures are not supported by S3TC/DXTn, and usually not supported at all
107
-
108
- # 1D
109
- begin
110
- glCompressedTexImage1D(GL_TEXTURE_1D,0,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,4,0,16,image_1)
111
- assert_equal(glGetCompressedTexImage(GL_TEXTURE_1D,0), image_1)
112
- rescue Gl::Error => err
113
- assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
114
- end
115
-
116
- begin
117
- glCompressedTexSubImage1D(GL_TEXTURE_1D,0,0,4,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,16,image_2)
118
- assert_equal(glGetCompressedTexImage(GL_TEXTURE_1D,0), image_2)
119
- rescue Gl::Error => err
120
- assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
121
- end
122
-
123
- # 2D
124
- glCompressedTexImage2D(GL_TEXTURE_2D,0,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,2,2,0,16,image_1)
125
- assert_equal(glGetCompressedTexImage(GL_TEXTURE_2D,0), image_1)
126
-
127
- glCompressedTexSubImage2D(GL_TEXTURE_2D,0,0,0,2,2,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,16,image_2)
128
- assert_equal(glGetCompressedTexImage(GL_TEXTURE_2D,0), image_2)
129
-
130
- # 3D
131
- begin
132
- glCompressedTexImage3D(GL_TEXTURE_3D,0,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,2,2,1,0,16,image_1)
133
- assert_equal(glGetCompressedTexImage(GL_TEXTURE_3D,0), image_1)
134
- rescue Gl::Error => err
135
- assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
136
- end
137
-
138
- begin
139
- glCompressedTexSubImage3D(GL_TEXTURE_3D,0, 0,0,0, 2,2,1, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, 16, image_2)
140
- assert_equal(glGetCompressedTexImage(GL_TEXTURE_3D,0), image_2)
141
- rescue Gl::Error => err
142
- assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
143
- end
144
-
145
- glDeleteTextures(textures)
146
-
147
- n = glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
148
- if (n>0)
149
- assert_equal(glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS).size,n)
150
- end
151
- end
152
-
153
- def test_glmultitexcoord
154
- supported?(1.3)
155
-
156
- glActiveTexture(GL_TEXTURE1)
157
-
158
- # 1
159
- glMultiTexCoord1d(GL_TEXTURE1, 1.0)
160
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,0,0,1])
161
- glMultiTexCoord1dv(GL_TEXTURE1, [0.0])
162
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
163
- glMultiTexCoord1f(GL_TEXTURE1, 1.0)
164
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,0,0,1])
165
- glMultiTexCoord1fv(GL_TEXTURE1, [0.0])
166
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
167
- glMultiTexCoord1i(GL_TEXTURE1, 1)
168
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,0,0,1])
169
- glMultiTexCoord1iv(GL_TEXTURE1, [0])
170
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
171
- glMultiTexCoord1s(GL_TEXTURE1, 1)
172
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,0,0,1])
173
- glMultiTexCoord1sv(GL_TEXTURE1, [0])
174
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
175
- # 2
176
- glMultiTexCoord2d(GL_TEXTURE1, 1.0,1.0)
177
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,0,1])
178
- glMultiTexCoord2dv(GL_TEXTURE1, [0.0,0.0])
179
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
180
- glMultiTexCoord2f(GL_TEXTURE1, 1.0,1.0)
181
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,0,1])
182
- glMultiTexCoord2fv(GL_TEXTURE1, [0.0,0.0])
183
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
184
- glMultiTexCoord2i(GL_TEXTURE1, 1,1)
185
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,0,1])
186
- glMultiTexCoord2iv(GL_TEXTURE1, [0,0])
187
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
188
- glMultiTexCoord2s(GL_TEXTURE1, 1,1)
189
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,0,1])
190
- glMultiTexCoord2sv(GL_TEXTURE1, [0,0])
191
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
192
- # 3
193
- glMultiTexCoord3d(GL_TEXTURE1, 1.0,1.0,1.0)
194
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
195
- glMultiTexCoord3dv(GL_TEXTURE1, [0.0,0.0,0.0])
196
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
197
- glMultiTexCoord3f(GL_TEXTURE1, 1.0,1.0,1.0)
198
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
199
- glMultiTexCoord3fv(GL_TEXTURE1, [0.0,0.0,0.0])
200
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
201
- glMultiTexCoord3i(GL_TEXTURE1, 1,1,1)
202
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
203
- glMultiTexCoord3iv(GL_TEXTURE1, [0,0,0])
204
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
205
- glMultiTexCoord3s(GL_TEXTURE1, 1,1,1)
206
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
207
- glMultiTexCoord3sv(GL_TEXTURE1, [0,0,0])
208
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,1])
209
- # 4
210
- glMultiTexCoord4d(GL_TEXTURE1, 1.0,1.0,1.0,1.0)
211
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
212
- glMultiTexCoord4dv(GL_TEXTURE1, [0.0,0.0,0.0,0.0])
213
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,0])
214
- glMultiTexCoord4f(GL_TEXTURE1, 1.0,1.0,1.0,1.0)
215
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
216
- glMultiTexCoord4fv(GL_TEXTURE1, [0.0,0.0,0.0,0.0])
217
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,0])
218
- glMultiTexCoord4i(GL_TEXTURE1, 1,1,1,1)
219
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
220
- glMultiTexCoord4iv(GL_TEXTURE1, [0,0,0,0])
221
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,0])
222
- glMultiTexCoord4s(GL_TEXTURE1, 1,1,1,1)
223
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [1,1,1,1])
224
- glMultiTexCoord4sv(GL_TEXTURE1, [0,0,0,0])
225
- assert_equal(glGetDoublev(GL_CURRENT_TEXTURE_COORDS), [0,0,0,0])
226
-
227
- glActiveTexture(GL_TEXTURE0)
228
- end
19
+
20
+ def setup
21
+ super
22
+ supported? 1.3
23
+ end
24
+
25
+ def test_glsamplecoverage
26
+ glSampleCoverage(0.0, GL_TRUE)
27
+ assert_equal(0.0, glGetDoublev(GL_SAMPLE_COVERAGE_VALUE))
28
+ assert_equal(GL_TRUE, glGetBooleanv(GL_SAMPLE_COVERAGE_INVERT))
29
+ glSampleCoverage(1.0, GL_FALSE)
30
+ assert_equal(1.0, glGetDoublev(GL_SAMPLE_COVERAGE_VALUE))
31
+ assert_equal(GL_FALSE, glGetBooleanv(GL_SAMPLE_COVERAGE_INVERT))
32
+ end
33
+
34
+ def test_multitexture
35
+ glActiveTexture(GL_TEXTURE1)
36
+ glClientActiveTexture(GL_TEXTURE2)
37
+ assert_equal(GL_TEXTURE1, glGetIntegerv(GL_ACTIVE_TEXTURE))
38
+ assert_equal(GL_TEXTURE2, glGetIntegerv(GL_CLIENT_ACTIVE_TEXTURE))
39
+ end
40
+
41
+ def test_transposematrix
42
+ m_a = [[1.0,2.0,3.0,4.0],
43
+ [0.0,2.0,0.0,0.0],
44
+ [0.0,0.0,2.0,0.0],
45
+ [0.0,0.0,0.0,2.0]]
46
+
47
+ m_b = [[1.0,2.0,3.0,4.0],
48
+ [0.0,3.0,0.0,0.0],
49
+ [0.0,0.0,3.0,0.0],
50
+ [0.0,0.0,0.0,3.0]]
51
+
52
+ glMatrixMode(GL_MODELVIEW)
53
+ glLoadTransposeMatrixf(m_a)
54
+ assert_equal(m_a, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX))
55
+
56
+ glLoadTransposeMatrixd(m_b)
57
+ assert_equal(m_b, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX))
58
+
59
+ glLoadIdentity()
60
+ glMultTransposeMatrixf(m_a)
61
+ assert_equal(m_a, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX))
62
+
63
+ glLoadIdentity()
64
+ glMultTransposeMatrixd(m_b)
65
+ assert_equal(m_b, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX))
66
+
67
+ # 2
68
+ m = Matrix.rows([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]])
69
+ glMatrixMode(GL_MODELVIEW)
70
+ glLoadTransposeMatrixf(m)
71
+ assert_equal(m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX))
72
+ glLoadIdentity()
73
+ glLoadTransposeMatrixd(m)
74
+ assert_equal(m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX))
75
+ glLoadIdentity()
76
+ glMultTransposeMatrixf(m)
77
+ assert_equal(m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX))
78
+ glLoadIdentity()
79
+ glMultTransposeMatrixd(m)
80
+ assert_equal(m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX))
81
+
82
+ assert_raises ArgumentError do glLoadTransposeMatrixf([1,2,3,4]) end
83
+ assert_raises ArgumentError do glLoadTransposeMatrixd([1,2,3,4]) end
84
+ assert_raises ArgumentError do glMultTransposeMatrixf([1,2,3,4]) end
85
+ assert_raises ArgumentError do glMultTransposeMatrixd([1,2,3,4]) end
86
+ end
87
+
88
+ def test_texturecompression
89
+ supported?("GL_EXT_texture_compression_s3tc")
90
+
91
+ # S3TC/DXT5 compressed 2x2 pixels stipple patterns [w,b,b,w] and [b,w,w,b]
92
+ image_1 = [0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x01,0x54,0x5C,0x5C].pack("C*")
93
+ image_2 = [0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x54,0x01,0x0D,0x0D].pack("C*")
94
+
95
+ textures = glGenTextures(3)
96
+ glBindTexture(GL_TEXTURE_1D,textures[0])
97
+ glBindTexture(GL_TEXTURE_2D,textures[1])
98
+ glBindTexture(GL_TEXTURE_3D,textures[2])
99
+
100
+ # Note: 1D and 3D compressed textures are not supported by S3TC/DXTn, and usually not supported at all
101
+
102
+ # 1D
103
+ begin
104
+ glCompressedTexImage1D(GL_TEXTURE_1D,0,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,4,0,16,image_1)
105
+ assert_equal(image_1, glGetCompressedTexImage(GL_TEXTURE_1D,0))
106
+ rescue Gl::Error => err
107
+ assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
108
+ end
109
+
110
+ begin
111
+ glCompressedTexSubImage1D(GL_TEXTURE_1D,0,0,4,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,16,image_2)
112
+ assert_equal(image_2, glGetCompressedTexImage(GL_TEXTURE_1D,0))
113
+ rescue Gl::Error => err
114
+ assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
115
+ end
116
+
117
+ # 2D
118
+ glCompressedTexImage2D(GL_TEXTURE_2D,0,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,2,2,0,16,image_1)
119
+ assert_equal(image_1, glGetCompressedTexImage(GL_TEXTURE_2D,0))
120
+
121
+ glCompressedTexSubImage2D(GL_TEXTURE_2D,0,0,0,2,2,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,16,image_2)
122
+ assert_equal(image_2, glGetCompressedTexImage(GL_TEXTURE_2D,0))
123
+
124
+ # 3D
125
+ begin
126
+ glCompressedTexImage3D(GL_TEXTURE_3D,0,GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,2,2,1,0,16,image_1)
127
+ assert_equal(image_1, glGetCompressedTexImage(GL_TEXTURE_3D,0))
128
+ rescue Gl::Error => err
129
+ assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
130
+ end
131
+
132
+ begin
133
+ glCompressedTexSubImage3D(GL_TEXTURE_3D,0, 0,0,0, 2,2,1, GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, 16, image_2)
134
+ assert_equal(image_2, glGetCompressedTexImage(GL_TEXTURE_3D,0))
135
+ rescue Gl::Error => err
136
+ assert(err.id == GL_INVALID_ENUM || err.id == GL_INVALID_OPERATION)
137
+ end
138
+
139
+ glDeleteTextures(textures)
140
+
141
+ n = glGetIntegerv(GL_NUM_COMPRESSED_TEXTURE_FORMATS)
142
+ if (n>0)
143
+ assert_equal(n, glGetIntegerv(GL_COMPRESSED_TEXTURE_FORMATS).size)
144
+ end
145
+ end
146
+
147
+ def test_glmultitexcoord
148
+ glActiveTexture(GL_TEXTURE1)
149
+
150
+ # 1
151
+ glMultiTexCoord1d(GL_TEXTURE1, 1.0)
152
+ assert_equal([1,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
153
+ glMultiTexCoord1dv(GL_TEXTURE1, [0.0])
154
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
155
+ glMultiTexCoord1f(GL_TEXTURE1, 1.0)
156
+ assert_equal([1,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
157
+ glMultiTexCoord1fv(GL_TEXTURE1, [0.0])
158
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
159
+ glMultiTexCoord1i(GL_TEXTURE1, 1)
160
+ assert_equal([1,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
161
+ glMultiTexCoord1iv(GL_TEXTURE1, [0])
162
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
163
+ glMultiTexCoord1s(GL_TEXTURE1, 1)
164
+ assert_equal([1,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
165
+ glMultiTexCoord1sv(GL_TEXTURE1, [0])
166
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
167
+ # 2
168
+ glMultiTexCoord2d(GL_TEXTURE1, 1.0,1.0)
169
+ assert_equal([1,1,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
170
+ glMultiTexCoord2dv(GL_TEXTURE1, [0.0,0.0])
171
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
172
+ glMultiTexCoord2f(GL_TEXTURE1, 1.0,1.0)
173
+ assert_equal([1,1,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
174
+ glMultiTexCoord2fv(GL_TEXTURE1, [0.0,0.0])
175
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
176
+ glMultiTexCoord2i(GL_TEXTURE1, 1,1)
177
+ assert_equal([1,1,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
178
+ glMultiTexCoord2iv(GL_TEXTURE1, [0,0])
179
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
180
+ glMultiTexCoord2s(GL_TEXTURE1, 1,1)
181
+ assert_equal([1,1,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
182
+ glMultiTexCoord2sv(GL_TEXTURE1, [0,0])
183
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
184
+ # 3
185
+ glMultiTexCoord3d(GL_TEXTURE1, 1.0,1.0,1.0)
186
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
187
+ glMultiTexCoord3dv(GL_TEXTURE1, [0.0,0.0,0.0])
188
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
189
+ glMultiTexCoord3f(GL_TEXTURE1, 1.0,1.0,1.0)
190
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
191
+ glMultiTexCoord3fv(GL_TEXTURE1, [0.0,0.0,0.0])
192
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
193
+ glMultiTexCoord3i(GL_TEXTURE1, 1,1,1)
194
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
195
+ glMultiTexCoord3iv(GL_TEXTURE1, [0,0,0])
196
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
197
+ glMultiTexCoord3s(GL_TEXTURE1, 1,1,1)
198
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
199
+ glMultiTexCoord3sv(GL_TEXTURE1, [0,0,0])
200
+ assert_equal([0,0,0,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
201
+ # 4
202
+ glMultiTexCoord4d(GL_TEXTURE1, 1.0,1.0,1.0,1.0)
203
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
204
+ glMultiTexCoord4dv(GL_TEXTURE1, [0.0,0.0,0.0,0.0])
205
+ assert_equal([0,0,0,0], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
206
+ glMultiTexCoord4f(GL_TEXTURE1, 1.0,1.0,1.0,1.0)
207
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
208
+ glMultiTexCoord4fv(GL_TEXTURE1, [0.0,0.0,0.0,0.0])
209
+ assert_equal([0,0,0,0], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
210
+ glMultiTexCoord4i(GL_TEXTURE1, 1,1,1,1)
211
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
212
+ glMultiTexCoord4iv(GL_TEXTURE1, [0,0,0,0])
213
+ assert_equal([0,0,0,0], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
214
+ glMultiTexCoord4s(GL_TEXTURE1, 1,1,1,1)
215
+ assert_equal([1,1,1,1], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
216
+ glMultiTexCoord4sv(GL_TEXTURE1, [0,0,0,0])
217
+ assert_equal([0,0,0,0], glGetDoublev(GL_CURRENT_TEXTURE_COORDS))
218
+
219
+ glActiveTexture(GL_TEXTURE0)
220
+ end
229
221
  end