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
@@ -31,33 +31,33 @@ class TestGlExtArb < OpenGL::TestCase
31
31
 
32
32
  glMatrixMode(GL_MODELVIEW)
33
33
  glLoadTransposeMatrixfARB(m_a)
34
- assert_equal m_a, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
34
+ assert_each_in_delta m_a, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
35
35
 
36
36
  glLoadTransposeMatrixdARB(m_b)
37
- assert_equal m_b, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
37
+ assert_each_in_delta m_b, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
38
38
 
39
39
  glLoadIdentity()
40
40
  glMultTransposeMatrixfARB(m_a)
41
- assert_equal m_a, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
41
+ assert_each_in_delta m_a, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
42
42
 
43
43
  glLoadIdentity()
44
44
  glMultTransposeMatrixdARB(m_b)
45
- assert_equal m_b, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
45
+ assert_each_in_delta m_b, glGetDoublev(GL_TRANSPOSE_MODELVIEW_MATRIX_ARB)
46
46
 
47
47
  # 2
48
48
  m = Matrix.rows([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 11, 12], [13, 14, 15, 16]])
49
49
  glMatrixMode(GL_MODELVIEW)
50
50
  glLoadTransposeMatrixfARB(m)
51
- assert_equal m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
51
+ assert_each_in_delta m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
52
52
  glLoadIdentity()
53
53
  glLoadTransposeMatrixdARB(m)
54
- assert_equal m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
54
+ assert_each_in_delta m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
55
55
  glLoadIdentity()
56
56
  glMultTransposeMatrixfARB(m)
57
- assert_equal m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
57
+ assert_each_in_delta m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
58
58
  glLoadIdentity()
59
59
  glMultTransposeMatrixdARB(m)
60
- assert_equal m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
60
+ assert_each_in_delta m.to_a.transpose, glGetDoublev(GL_MODELVIEW_MATRIX)
61
61
 
62
62
  assert_raises ArgumentError do glLoadTransposeMatrixfARB([1, 2, 3, 4]) end
63
63
  assert_raises ArgumentError do glLoadTransposeMatrixdARB([1, 2, 3, 4]) end
@@ -87,16 +87,16 @@ class TestGlExtArb < OpenGL::TestCase
87
87
  def test_gl_arb_vertex_program
88
88
  supported? "GL_ARB_vertex_program"
89
89
 
90
- assert_equal(glIsProgramARB(0), false)
90
+ assert_equal(false, glIsProgramARB(0))
91
91
  programs = glGenProgramsARB(1)
92
- assert_equal(programs.size, 1)
92
+ assert_equal(1, programs.size)
93
93
 
94
94
  program = "!!ARBvp1.0\nTEMP vv;\nEND"
95
95
 
96
96
  glBindProgramARB(GL_VERTEX_PROGRAM_ARB, programs[0])
97
97
  glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, program)
98
98
  assert_equal program, glGetProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_STRING_ARB)
99
- assert_equal(glIsProgramARB(programs[0]), true)
99
+ assert_equal(glIsProgramARB(programs[0]), true)
100
100
 
101
101
  assert_equal program.size, glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_LENGTH_ARB)
102
102
  assert_equal programs[0], glGetProgramivARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_BINDING_ARB)
@@ -128,17 +128,17 @@ class TestGlExtArb < OpenGL::TestCase
128
128
  assert_equal([5, 6, 7, 8], glGetProgramLocalParameterfvARB(GL_VERTEX_PROGRAM_ARB, 1))
129
129
 
130
130
  glVertexAttrib1dARB(1, 1)
131
- assert_equal(glGetVertexAttribdvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 1)
131
+ assert_equal(1, glGetVertexAttribdvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
132
132
  glVertexAttrib1fARB(1, 2)
133
- assert_equal(glGetVertexAttribfvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 2)
133
+ assert_equal(2, glGetVertexAttribfvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
134
134
  glVertexAttrib1sARB(1, 3)
135
- assert_equal(glGetVertexAttribivARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 3)
135
+ assert_equal(3, glGetVertexAttribivARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
136
136
  glVertexAttrib1dvARB(1, [1])
137
- assert_equal(glGetVertexAttribdvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 1)
137
+ assert_equal(1, glGetVertexAttribdvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
138
138
  glVertexAttrib1fvARB(1, [2])
139
- assert_equal(glGetVertexAttribfvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 2)
139
+ assert_equal(2, glGetVertexAttribfvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
140
140
  glVertexAttrib1svARB(1, [3])
141
- assert_equal(glGetVertexAttribivARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 3)
141
+ assert_equal(3, glGetVertexAttribivARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
142
142
 
143
143
  glVertexAttrib2dARB(1, 1, 2)
144
144
  assert_equal([1, 2], glGetVertexAttribdvARB(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2])
@@ -215,58 +215,58 @@ class TestGlExtArb < OpenGL::TestCase
215
215
  supported? "GL_ARB_window_pos"
216
216
  # 2
217
217
  glWindowPos2dARB(1.0, 2.0)
218
- assert_equal([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
218
+ assert_each_in_delta([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
219
219
  glWindowPos2dvARB([2.0, 1.0])
220
- assert_equal([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
220
+ assert_each_in_delta([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
221
221
  glWindowPos2fARB(1.0, 2.0)
222
- assert_equal([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
222
+ assert_each_in_delta([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
223
223
  glWindowPos2fvARB([2.0, 1.0])
224
- assert_equal([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
224
+ assert_each_in_delta([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
225
225
  glWindowPos2iARB(1, 2)
226
- assert_equal([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
226
+ assert_each_in_delta([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
227
227
  glWindowPos2ivARB([2, 1])
228
- assert_equal([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
228
+ assert_each_in_delta([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
229
229
  glWindowPos2sARB(1, 2)
230
- assert_equal([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
230
+ assert_each_in_delta([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
231
231
  glWindowPos2svARB([2, 1])
232
- assert_equal([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
232
+ assert_each_in_delta([2, 1, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
233
233
 
234
234
  # 3
235
235
  glWindowPos3dARB(1.0, 2.0, 0.5)
236
- assert_equal([1, 2, 0.5, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
236
+ assert_each_in_delta([1, 2, 0.5, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
237
237
  glWindowPos3dvARB([3.0, 2.0, 1.0])
238
- assert_equal([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
238
+ assert_each_in_delta([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
239
239
  glWindowPos3fARB(1.0, 2.0, 0.5)
240
- assert_equal([1, 2, 0.5, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
240
+ assert_each_in_delta([1, 2, 0.5, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
241
241
  glWindowPos3fvARB([3.0, 2.0, 1.0])
242
- assert_equal([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
242
+ assert_each_in_delta([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
243
243
  glWindowPos3iARB(1, 2, 0)
244
- assert_equal([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
244
+ assert_each_in_delta([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
245
245
  glWindowPos3ivARB([3, 2, 1])
246
- assert_equal([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
246
+ assert_each_in_delta([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
247
247
  glWindowPos3sARB(1, 2, 0)
248
- assert_equal([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
248
+ assert_each_in_delta([1, 2, 0, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
249
249
  glWindowPos3svARB([3, 2, 1])
250
- assert_equal([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
250
+ assert_each_in_delta([3, 2, 1, 1], glGetDoublev(GL_CURRENT_RASTER_POSITION))
251
251
  end
252
252
 
253
253
  def test_gl_arb_pointparameter
254
254
  supported? "GL_ARB_point_parameters"
255
255
  glPointParameterfARB(GL_POINT_SIZE_MIN, 1.0)
256
- assert_equal 1.0, glGetDoublev(GL_POINT_SIZE_MIN)
256
+ assert_in_delta 1.0, glGetDoublev(GL_POINT_SIZE_MIN)
257
257
 
258
258
  glPointParameterfvARB(GL_POINT_DISTANCE_ATTENUATION, [1, 0, 1])
259
- assert_equal([1, 0, 1], glGetDoublev(GL_POINT_DISTANCE_ATTENUATION))
259
+ assert_each_in_delta([1, 0, 1], glGetDoublev(GL_POINT_DISTANCE_ATTENUATION))
260
260
  end
261
261
 
262
262
  def test_gl_arb_occlusion_query
263
263
  supported? "GL_ARB_occlusion_query"
264
264
 
265
265
  queries = glGenQueriesARB(2)
266
- assert_equal(queries.size, 2)
266
+ assert_equal(2, queries.size)
267
267
 
268
268
  glBeginQueryARB(GL_SAMPLES_PASSED, queries[1])
269
- assert_equal(glIsQueryARB(queries[1]), true)
269
+ assert_equal(true, glIsQueryARB(queries[1]))
270
270
 
271
271
  glEndQueryARB(GL_SAMPLES_PASSED)
272
272
  r = glGetQueryObjectivARB(queries[1], GL_QUERY_RESULT_AVAILABLE)
@@ -274,7 +274,7 @@ class TestGlExtArb < OpenGL::TestCase
274
274
  assert(glGetQueryObjectuivARB(queries[1], GL_QUERY_RESULT)>=0)
275
275
 
276
276
  glDeleteQueriesARB(queries)
277
- assert_equal(glIsQueryARB(queries[1]), false)
277
+ assert_equal(false, glIsQueryARB(queries[1]))
278
278
  end
279
279
 
280
280
  def test_gl_arb_shader_objects
@@ -296,7 +296,7 @@ class TestGlExtArb < OpenGL::TestCase
296
296
  assert_equal GL_TRUE, glGetObjectParameterivARB(vs, GL_OBJECT_COMPILE_STATUS_ARB)
297
297
 
298
298
  vslog = glGetInfoLogARB(vs)
299
- assert_equal(vslog.class, String)
299
+ assert_equal(String, vslog.class)
300
300
 
301
301
  glAttachObjectARB(program, vs)
302
302
  assert_equal vs, glGetAttachedObjectsARB(program)
@@ -333,18 +333,11 @@ uniform int testivec1;
333
333
  uniform ivec2 testivec2;
334
334
  uniform ivec3 testivec3;
335
335
  uniform ivec4 testivec4;
336
+
336
337
  void main() {
337
- testvec1;
338
- test;
339
- testvec2.x;
340
- testvec3.x;
341
- testivec1;
342
- testivec2.x;
343
- testivec3.x;
344
- testivec4.x;
345
- testvec4;
346
-
347
- gl_Position = ftransform();
338
+ gl_Position = ftransform() * test[0] *
339
+ testvec1 * testvec2.x * testvec3.x * testvec4.x *
340
+ float(testivec1) * float(testivec2.x) * float(testivec3.x) * float(testivec4.x);
348
341
  }
349
342
  SHADER
350
343
 
@@ -384,7 +377,7 @@ void main() {
384
377
  assert_equal([2.0, 2.0, 2.0], glGetUniformfvARB(program, tv3l))
385
378
  glUniform4fARB(tv4l, 2.0, 2.0, 2.0, 2.0)
386
379
  assert_equal([2.0, 2.0, 2.0, 2.0], glGetUniformfvARB(program, tv4l))
387
- # i
380
+ # i
388
381
  glUniform1iARB(tv1il, 3)
389
382
  assert_equal 3, glGetUniformivARB(program, tv1il)
390
383
  glUniform2iARB(tv2il, 3, 3)
@@ -448,19 +441,18 @@ void main() {
448
441
  uniforms[uniform.last] = i
449
442
  end
450
443
 
451
- glUniformMatrix2fvARB(uniforms['testmat2'], GL_TRUE, [0, 1, 1, 0])
452
- assert_each_in_delta([0, 1, 1, 0],
444
+ glUniformMatrix2fvARB(uniforms['testmat2'], GL_TRUE, [0, 1, 2, 3])
445
+ assert_each_in_delta([0, 2, 1, 3],
453
446
  glGetUniformfvARB(program, uniforms['testmat2']))
454
447
 
455
- skip "glUniformMatrix3fvARB complains but I don't know why"
456
448
  glUniformMatrix3fvARB(uniforms['testmat3'], GL_TRUE,
457
- [0, 1, 0, 1, 0, 1, 0, 1, 0])
458
- assert_each_in_delta([0, 1, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0],
449
+ [0, 1, 2, 3, 4, 5, 6, 7, 8])
450
+ assert_each_in_delta([0, 3, 6, 1, 4, 7, 2, 5, 8],
459
451
  glGetUniformfvARB(program, uniforms['testmat3']))
460
452
 
461
453
  glUniformMatrix4fvARB(uniforms['testmat4'], GL_TRUE,
462
- [0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0])
463
- assert_each_in_delta([0, 1, 0, 1, 1, 0, 1, 0, 0, 1, 0, 1, 1, 0, 1, 0],
454
+ [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15])
455
+ assert_each_in_delta([0, 4, 8, 12, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15],
464
456
  glGetUniformfvARB(program, uniforms['testmat4']))
465
457
 
466
458
  glDeleteObjectARB(vs)
@@ -484,17 +476,9 @@ uniform ivec3 testivec3;
484
476
  uniform ivec4 testivec4;
485
477
 
486
478
  void main() {
487
- testvec1;
488
- test;
489
- testvec2.x;
490
- testvec3.x;
491
- testivec1;
492
- testivec2.x;
493
- testivec3.x;
494
- testivec4.x;
495
- testvec4;
496
-
497
- gl_Position = ftransform();
479
+ gl_Position = ftransform() * test[0] *
480
+ testvec1 * testvec2.x * testvec3.x * testvec4.x *
481
+ float(testivec1) * float(testivec2.x) * float(testivec3.x) * float(testivec4.x);
498
482
  }
499
483
  SHADER
500
484
 
@@ -516,11 +500,9 @@ void main() {
516
500
  glUseProgramObjectARB(program)
517
501
 
518
502
  assert_equal 2, glGetAttribLocationARB(program, "test")
519
- assert_equal [1, GL_FLOAT_VEC4, "gl_Vertex"], glGetActiveAttribARB(program, 0)
503
+ assert_equal [1, GL_FLOAT_VEC4, "gl_Vertex"], glGetActiveAttribARB(program, 1)
520
504
 
521
505
  glDeleteObjectARB(vs)
522
506
  glDeleteObjectARB(program)
523
507
  end
524
-
525
508
  end
526
-
@@ -25,6 +25,4 @@ class TestGlExtAti < OpenGL::TestCase
25
25
  assert_equal GL_BACK_LEFT, glGetIntegerv(GL_DRAW_BUFFER0)
26
26
  assert_equal GL_FRONT_LEFT, glGetIntegerv(GL_DRAW_BUFFER1)
27
27
  end
28
-
29
28
  end
30
-
@@ -30,8 +30,8 @@ class TestGlExtExt < OpenGL::TestCase
30
30
  supported?("GL_EXT_polygon_offset")
31
31
 
32
32
  glPolygonOffsetEXT(1.0, 2.0)
33
- assert_equal(glGetIntegerv(GL_POLYGON_OFFSET_FACTOR_EXT), 1.0)
34
- assert_equal(glGetIntegerv(GL_POLYGON_OFFSET_BIAS_EXT), 2.0)
33
+ assert_equal(1.0, glGetIntegerv(GL_POLYGON_OFFSET_FACTOR_EXT))
34
+ assert_equal(2.0, glGetIntegerv(GL_POLYGON_OFFSET_BIAS_EXT))
35
35
  end
36
36
 
37
37
  def test_gl_ext_framebuffer_object
@@ -49,14 +49,14 @@ class TestGlExtExt < OpenGL::TestCase
49
49
  fb = glGenFramebuffersEXT(1)
50
50
  assert(fb.size==1)
51
51
  glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fb[0])
52
- assert_equal(glIsFramebufferEXT(fb[0]), true)
52
+ assert_equal(true, glIsFramebufferEXT(fb[0]))
53
53
 
54
54
  rb = glGenRenderbuffersEXT(1)
55
55
  assert(rb.size==1)
56
56
  glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rb[0])
57
- assert_equal(glIsRenderbufferEXT(rb[0]), true)
57
+ assert_equal(true, glIsRenderbufferEXT(rb[0]))
58
58
 
59
- glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, WINDOW_SIZE, WINDOW_SIZE)
59
+ glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, WINDOW_SIZE, WINDOW_SIZE)
60
60
 
61
61
  assert_equal WINDOW_SIZE, glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_WIDTH_EXT)
62
62
  assert_equal WINDOW_SIZE, glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_HEIGHT_EXT)
@@ -81,12 +81,12 @@ class TestGlExtExt < OpenGL::TestCase
81
81
  glDeleteTextures(t)
82
82
  end
83
83
 
84
- def test_gl_ext_gpu_program_parameters
84
+ def test_gl_ext_gpu_program_parameters
85
85
  supported?("GL_EXT_gpu_program_parameters")
86
86
 
87
87
  glProgramEnvParameters4fvEXT(GL_VERTEX_PROGRAM_ARB, 1, [1, 2, 3, 4, 5, 6, 7, 8])
88
- assert_equal(glGetProgramEnvParameterdvARB(GL_VERTEX_PROGRAM_ARB, 1), [1, 2, 3, 4])
89
- assert_equal(glGetProgramEnvParameterdvARB(GL_VERTEX_PROGRAM_ARB, 2), [5, 6, 7, 8])
88
+ assert_equal([1, 2, 3, 4], glGetProgramEnvParameterdvARB(GL_VERTEX_PROGRAM_ARB, 1))
89
+ assert_equal([5, 6, 7, 8], glGetProgramEnvParameterdvARB(GL_VERTEX_PROGRAM_ARB, 2))
90
90
  end
91
91
 
92
92
  def test_gl_ext_framebuffer_blit
@@ -110,9 +110,9 @@ class TestGlExtExt < OpenGL::TestCase
110
110
  glFramebufferTexture2DEXT(GL_DRAW_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texture[1], 0)
111
111
 
112
112
  status = glCheckFramebufferStatusEXT(GL_READ_FRAMEBUFFER_EXT)
113
- assert_equal(status, GL_FRAMEBUFFER_COMPLETE_EXT)
113
+ assert_equal(GL_FRAMEBUFFER_COMPLETE_EXT, status)
114
114
  status = glCheckFramebufferStatusEXT(GL_DRAW_FRAMEBUFFER_EXT)
115
- assert_equal(status, GL_FRAMEBUFFER_COMPLETE_EXT)
115
+ assert_equal(GL_FRAMEBUFFER_COMPLETE_EXT, status)
116
116
 
117
117
  glBlitFramebufferEXT(0, 0, 2, 2,
118
118
  0, 0, 2, 2,
@@ -121,7 +121,7 @@ class TestGlExtExt < OpenGL::TestCase
121
121
 
122
122
  glBindTexture(GL_TEXTURE_2D, texture[1])
123
123
  tex = glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE).unpack("C*")
124
- assert_equal(tex, data)
124
+ assert_equal(data, tex)
125
125
 
126
126
  glDeleteTextures(texture)
127
127
  glDeleteFramebuffersEXT(fbo)
@@ -134,7 +134,7 @@ class TestGlExtExt < OpenGL::TestCase
134
134
  glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, rb)
135
135
  glRenderbufferStorageMultisampleEXT(GL_RENDERBUFFER_EXT, 4, GL_RGBA, 2, 2)
136
136
  samples = glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_SAMPLES_EXT)
137
- assert_equal(samples, 4)
137
+ assert_equal(4, samples)
138
138
 
139
139
  glDeleteRenderbuffersEXT(rb)
140
140
  end
@@ -142,25 +142,25 @@ class TestGlExtExt < OpenGL::TestCase
142
142
  def test_gl_ext_pointparameter
143
143
  supported?("GL_EXT_point_parameters")
144
144
  glPointParameterfEXT(GL_POINT_SIZE_MIN, 1.0)
145
- assert_equal(glGetDoublev(GL_POINT_SIZE_MIN), 1.0)
145
+ assert_equal(1.0, glGetDoublev(GL_POINT_SIZE_MIN))
146
146
 
147
147
  glPointParameterfvEXT(GL_POINT_DISTANCE_ATTENUATION, [1, 0, 1])
148
- assert_equal(glGetDoublev(GL_POINT_DISTANCE_ATTENUATION), [1, 0, 1])
148
+ assert_equal([1, 0, 1], glGetDoublev(GL_POINT_DISTANCE_ATTENUATION))
149
149
  end
150
150
 
151
151
  def test_gl_ext_stencil_two_side
152
152
  supported?("GL_EXT_stencil_two_side")
153
153
  glActiveStencilFaceEXT(GL_FRONT)
154
- assert_equal(glGetIntegerv(GL_ACTIVE_STENCIL_FACE_EXT), GL_FRONT)
154
+ assert_equal(GL_FRONT, glGetIntegerv(GL_ACTIVE_STENCIL_FACE_EXT))
155
155
  glActiveStencilFaceEXT(GL_BACK)
156
- assert_equal(glGetIntegerv(GL_ACTIVE_STENCIL_FACE_EXT), GL_BACK)
156
+ assert_equal(GL_BACK, glGetIntegerv(GL_ACTIVE_STENCIL_FACE_EXT))
157
157
  end
158
158
 
159
159
  def test_gl_ext_stencil_clear_tag
160
160
  supported?("GL_EXT_stencil_clear_tag")
161
161
  glStencilClearTagEXT(1, 2)
162
- assert_equal(glGetIntegerv(GL_STENCIL_TAG_BITS_EXT), 1)
163
- assert_equal(glGetIntegerv(GL_STENCIL_CLEAR_TAG_VALUE_EXT), 2)
162
+ assert_equal(1, glGetIntegerv(GL_STENCIL_TAG_BITS_EXT))
163
+ assert_equal(2, glGetIntegerv(GL_STENCIL_CLEAR_TAG_VALUE_EXT))
164
164
  end
165
165
 
166
166
  def test_gl_ext_secondary_color
@@ -216,7 +216,7 @@ class TestGlExtExt < OpenGL::TestCase
216
216
 
217
217
  sc = [0, 1, 0, 1, 0, 1].pack("f*")
218
218
 
219
- glSecondaryColorPointerEXT(3, GL_FLOAT, 0, sc)
219
+ glSecondaryColorPointerEXT(3, GL_FLOAT, 12, sc)
220
220
  assert_equal 3, glGetIntegerv(GL_SECONDARY_COLOR_ARRAY_SIZE)
221
221
  assert_equal GL_FLOAT, glGetIntegerv(GL_SECONDARY_COLOR_ARRAY_TYPE)
222
222
  assert_equal 12, glGetIntegerv(GL_SECONDARY_COLOR_ARRAY_STRIDE)
@@ -249,33 +249,33 @@ class TestGlExtExt < OpenGL::TestCase
249
249
  def test_gl_ext_blend_minmax
250
250
  supported?("GL_EXT_blend_minmax")
251
251
  glBlendEquationEXT(GL_MIN_EXT)
252
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION_EXT), GL_MIN_EXT)
252
+ assert_equal(GL_MIN_EXT, glGetIntegerv(GL_BLEND_EQUATION_EXT))
253
253
  glBlendEquationEXT(GL_MAX_EXT)
254
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION_EXT), GL_MAX_EXT)
254
+ assert_equal(GL_MAX_EXT, glGetIntegerv(GL_BLEND_EQUATION_EXT))
255
255
  end
256
256
 
257
257
  def test_gl_ext_blend_func_separate
258
258
  supported?("GL_EXT_blend_func_separate")
259
259
  glBlendFuncSeparateEXT(GL_ZERO, GL_ONE, GL_ZERO, GL_ONE)
260
- assert_equal(glGetIntegerv(GL_BLEND_SRC_RGB_EXT), GL_ZERO)
261
- assert_equal(glGetIntegerv(GL_BLEND_DST_RGB_EXT), GL_ONE)
262
- assert_equal(glGetIntegerv(GL_BLEND_SRC_ALPHA_EXT), GL_ZERO)
260
+ assert_equal(GL_ZERO, glGetIntegerv(GL_BLEND_SRC_RGB_EXT))
261
+ assert_equal(GL_ONE, glGetIntegerv(GL_BLEND_DST_RGB_EXT))
262
+ assert_equal(GL_ZERO, glGetIntegerv(GL_BLEND_SRC_ALPHA_EXT))
263
263
  assert_equal(glGetIntegerv(GL_BLEND_DST_ALPHA_EXT), GL_ONE)
264
264
  glBlendFuncSeparateEXT(GL_ONE, GL_ZERO, GL_ONE, GL_ZERO)
265
- assert_equal(glGetIntegerv(GL_BLEND_SRC_RGB_EXT), GL_ONE)
266
- assert_equal(glGetIntegerv(GL_BLEND_DST_RGB_EXT), GL_ZERO)
267
- assert_equal(glGetIntegerv(GL_BLEND_SRC_ALPHA_EXT), GL_ONE)
268
- assert_equal(glGetIntegerv(GL_BLEND_DST_ALPHA_EXT), GL_ZERO)
265
+ assert_equal(GL_ONE, glGetIntegerv(GL_BLEND_SRC_RGB_EXT))
266
+ assert_equal(GL_ZERO, glGetIntegerv(GL_BLEND_DST_RGB_EXT))
267
+ assert_equal(GL_ONE, glGetIntegerv(GL_BLEND_SRC_ALPHA_EXT))
268
+ assert_equal(GL_ZERO, glGetIntegerv(GL_BLEND_DST_ALPHA_EXT))
269
269
  end
270
270
 
271
271
  def test_gl_ext_blend_equation_separate
272
272
  supported?("GL_EXT_blend_equation_separate")
273
273
  glBlendEquationSeparateEXT(GL_FUNC_ADD, GL_FUNC_SUBTRACT)
274
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION_RGB_EXT), GL_FUNC_ADD)
275
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION_ALPHA_EXT), GL_FUNC_SUBTRACT)
274
+ assert_equal(GL_FUNC_ADD, glGetIntegerv(GL_BLEND_EQUATION_RGB_EXT))
275
+ assert_equal(GL_FUNC_SUBTRACT, glGetIntegerv(GL_BLEND_EQUATION_ALPHA_EXT))
276
276
  glBlendEquationSeparateEXT(GL_FUNC_SUBTRACT, GL_FUNC_ADD)
277
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION_RGB_EXT), GL_FUNC_SUBTRACT)
278
- assert_equal(glGetIntegerv(GL_BLEND_EQUATION_ALPHA_EXT), GL_FUNC_ADD)
277
+ assert_equal(GL_FUNC_SUBTRACT, glGetIntegerv(GL_BLEND_EQUATION_RGB_EXT))
278
+ assert_equal(GL_FUNC_ADD, glGetIntegerv(GL_BLEND_EQUATION_ALPHA_EXT))
279
279
  end
280
280
 
281
281
  def test_gl_ext_depth_bounds_test
@@ -310,22 +310,22 @@ class TestGlExtExt < OpenGL::TestCase
310
310
  textures = glGenTexturesEXT(2)
311
311
  glBindTextureEXT(GL_TEXTURE_1D, textures[0])
312
312
  glBindTextureEXT(GL_TEXTURE_2D, textures[1])
313
- assert_equal(glIsTextureEXT(textures[0]), true)
314
- assert_equal(glAreTexturesResidentEXT(textures).size, 2)
313
+ assert_equal(true, glIsTextureEXT(textures[0]))
314
+ assert_equal(2, glAreTexturesResidentEXT(textures).size)
315
315
 
316
316
  glPrioritizeTexturesEXT(textures, [0.5, 1.0])
317
- assert_equal(glGetTexParameterfv(GL_TEXTURE_1D, GL_TEXTURE_PRIORITY), 0.5)
318
- assert_equal(glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY), 1.0)
317
+ assert_equal(0.5, glGetTexParameterfv(GL_TEXTURE_1D, GL_TEXTURE_PRIORITY))
318
+ assert_equal(1.0, glGetTexParameterfv(GL_TEXTURE_2D, GL_TEXTURE_PRIORITY))
319
319
 
320
320
  glDeleteTexturesEXT(textures)
321
- assert_equal(glIsTextureEXT(textures[0]), false)
321
+ assert_equal(false, glIsTextureEXT(textures[0]))
322
322
  end
323
323
 
324
324
  def test_gl_ext_compiled_vertex_array
325
325
  supported?("GL_EXT_compiled_vertex_array")
326
326
  glLockArraysEXT(1, 2)
327
- assert_equal(glGetIntegerv(GL_ARRAY_ELEMENT_LOCK_FIRST_EXT), 1)
328
- assert_equal(glGetIntegerv(GL_ARRAY_ELEMENT_LOCK_COUNT_EXT), 2)
327
+ assert_equal(1, glGetIntegerv(GL_ARRAY_ELEMENT_LOCK_FIRST_EXT))
328
+ assert_equal(2, glGetIntegerv(GL_ARRAY_ELEMENT_LOCK_COUNT_EXT))
329
329
  glUnlockArraysEXT()
330
330
  end
331
331
 
@@ -343,7 +343,7 @@ class TestGlExtExt < OpenGL::TestCase
343
343
  assert_equal 3.0, glGetDoublev(GL_CURRENT_FOG_COORD)
344
344
 
345
345
  fc = [1, 0].pack("f*")
346
- glFogCoordPointerEXT(GL_FLOAT, 0, fc)
346
+ glFogCoordPointerEXT(GL_FLOAT, 4, fc)
347
347
  assert_equal GL_FLOAT, glGetIntegerv(GL_FOG_COORD_ARRAY_TYPE)
348
348
  assert_equal 4, glGetIntegerv(GL_FOG_COORD_ARRAY_STRIDE)
349
349
  assert_equal fc, glGetPointerv(GL_FOG_COORD_ARRAY_POINTER)
@@ -398,7 +398,7 @@ class TestGlExtExt < OpenGL::TestCase
398
398
 
399
399
  glDrawRangeElementsEXT(GL_POINTS, 0, 2, 3, GL_UNSIGNED_BYTE, [0, 1, 2].pack("C*"))
400
400
  count = glRenderMode(GL_RENDER)
401
- assert_equal(count, 12)
401
+ assert_equal(12, count)
402
402
 
403
403
  glDisableClientState(GL_VERTEX_ARRAY)
404
404
  end
@@ -408,7 +408,7 @@ class TestGlExtExt < OpenGL::TestCase
408
408
  program = glCreateProgramObjectARB()
409
409
 
410
410
  glProgramParameteriEXT(program, GL_GEOMETRY_INPUT_TYPE_EXT , GL_LINES_ADJACENCY_EXT)
411
- assert_equal(glGetObjectParameterivARB(program, GL_GEOMETRY_INPUT_TYPE_EXT), GL_LINES_ADJACENCY_EXT)
411
+ assert_equal(GL_LINES_ADJACENCY_EXT, glGetObjectParameterivARB(program, GL_GEOMETRY_INPUT_TYPE_EXT))
412
412
 
413
413
  glDeleteObjectARB(program)
414
414
  end
@@ -423,31 +423,31 @@ class TestGlExtExt < OpenGL::TestCase
423
423
  glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, program)
424
424
 
425
425
  glVertexAttribI1iEXT(1, 1)
426
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 1)
426
+ assert_equal(1, glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
427
427
  glVertexAttribI1uiEXT(1, 2)
428
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 2)
428
+ assert_equal(2, glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
429
429
  glVertexAttribI1ivEXT(1, [3])
430
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 3)
430
+ assert_equal(3, glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
431
431
  glVertexAttribI1uivEXT(1, [4])
432
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0], 4)
432
+ assert_equal(4, glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0])
433
433
 
434
434
  glVertexAttribI2iEXT(1, 1, 2)
435
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2], [1, 2])
435
+ assert_equal([1, 2], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2])
436
436
  glVertexAttribI2uiEXT(1, 2, 3)
437
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2], [2, 3])
437
+ assert_equal([2, 3], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2])
438
438
  glVertexAttribI2ivEXT(1, [3, 4])
439
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2], [3, 4])
439
+ assert_equal([3, 4], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2])
440
440
  glVertexAttribI2uivEXT(1, [4, 5])
441
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2], [4, 5])
441
+ assert_equal([4, 5], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 2])
442
442
 
443
443
  glVertexAttribI3iEXT(1, 1, 2, 3)
444
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3], [1, 2, 3])
444
+ assert_equal([1, 2, 3], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3])
445
445
  glVertexAttribI3uiEXT(1, 2, 3, 4)
446
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3], [2, 3, 4])
446
+ assert_equal([2, 3, 4], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3])
447
447
  glVertexAttribI3ivEXT(1, [3, 4, 5])
448
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3], [3, 4, 5])
448
+ assert_equal([3, 4, 5], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3])
449
449
  glVertexAttribI3uivEXT(1, [4, 5, 6])
450
- assert_equal(glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3], [4, 5, 6])
450
+ assert_equal([4, 5, 6], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)[0, 3])
451
451
 
452
452
  glVertexAttribI4iEXT(1, 1, 2, 3, 4)
453
453
  assert_equal [1, 2, 3, 4], glGetVertexAttribIivEXT(1, GL_CURRENT_VERTEX_ATTRIB_ARB)
@@ -505,16 +505,16 @@ void main() {
505
505
  glUseProgramObjectARB(program)
506
506
 
507
507
  tv1il = glGetUniformLocation program, "testivec1"
508
- refute_equal -1, tv1il, "testivec1 missing!"
508
+ refute_equal(-1, tv1il, "testivec1 missing!")
509
509
 
510
510
  tv2il = glGetUniformLocation program, "testivec2"
511
- refute_equal -1, tv2il, "testivec2 missing!"
511
+ refute_equal(-1, tv2il, "testivec2 missing!")
512
512
 
513
513
  tv3il = glGetUniformLocation program, "testivec3"
514
- refute_equal -1, tv3il, "testivec3 missing!"
514
+ refute_equal(-1, tv3il, "testivec3 missing!")
515
515
 
516
516
  tv4il = glGetUniformLocation program, "testivec4"
517
- refute_equal -1, tv4il, "testivec4 missing!"
517
+ refute_equal(-1, tv4il, "testivec4 missing!")
518
518
 
519
519
  skip "glGetUniformLocation is broken" if
520
520
  glGetActiveUniform(program, tv1il).last != "testivec1"
@@ -554,7 +554,7 @@ void main() {
554
554
  assert_equal [3, 4, 5, 6], glGetUniformuivEXT(program, tv4il)
555
555
 
556
556
  glBindFragDataLocationEXT(program, 1, "test")
557
- assert_equal -1, glGetFragDataLocationEXT(program, "test")
557
+ assert_equal(-1, glGetFragDataLocationEXT(program, "test"))
558
558
  end
559
559
 
560
560
  def test_gl_ext_draw_instanced
@@ -572,7 +572,7 @@ void main() {
572
572
 
573
573
  glDrawElementsInstancedEXT(GL_TRIANGLES, 3, GL_UNSIGNED_BYTE, [0, 1, 2].pack("C*"), 2)
574
574
  count = glRenderMode(GL_RENDER)
575
- assert_equal(count, 2*2*11)
575
+ assert_equal(2*2*11, count)
576
576
 
577
577
  glDisableClientState(GL_VERTEX_ARRAY)
578
578
  end
@@ -587,8 +587,8 @@ void main() {
587
587
  glBindTexture(GL_TEXTURE_BUFFER_EXT, tex)
588
588
  glTexBufferEXT(GL_TEXTURE_BUFFER_EXT, GL_RGBA32F_ARB, buf)
589
589
 
590
- assert_equal(glGetIntegerv(GL_TEXTURE_BINDING_BUFFER_EXT), tex)
591
- assert_equal(glGetIntegerv(GL_TEXTURE_BUFFER_FORMAT_EXT), GL_RGBA32F_ARB)
590
+ assert_equal(tex, glGetIntegerv(GL_TEXTURE_BINDING_BUFFER_EXT))
591
+ assert_equal(GL_RGBA32F_ARB, glGetIntegerv(GL_TEXTURE_BUFFER_FORMAT_EXT))
592
592
 
593
593
  glDeleteBuffers(buf)
594
594
  glDeleteTextures(tex)
@@ -597,12 +597,12 @@ void main() {
597
597
  def test_gl_ext_texture_integer
598
598
  supported?("GL_EXT_texture_integer")
599
599
 
600
- glClearColorIiEXT(1, 2, 3, 4)
601
- glClearColorIuiEXT(1, 2, 3, 4)
600
+ glClearColorIiEXT(1, 2, 3, 4)
601
+ glClearColorIuiEXT(1, 2, 3, 4)
602
602
 
603
603
  glTexParameterIivEXT(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, [1, 2, 3, 4])
604
- assert_equal(glGetTexParameterIivEXT(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR), [1, 2, 3, 4])
604
+ assert_equal([1, 2, 3, 4], glGetTexParameterIivEXT(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR))
605
605
  glTexParameterIuivEXT(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR, [5, 6, 7, 8])
606
- assert_equal(glGetTexParameterIuivEXT(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR), [5, 6, 7, 8])
606
+ assert_equal([5, 6, 7, 8], glGetTexParameterIuivEXT(GL_TEXTURE_2D, GL_TEXTURE_BORDER_COLOR))
607
607
  end
608
608
  end