opengl 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (145) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +0 -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/test_case.rb +1 -2
  103. data/test/dummy.xorg.conf +140 -0
  104. data/test/test_gl.rb +18 -22
  105. data/test/test_gl_10_11.rb +220 -220
  106. data/test/test_gl_12.rb +11 -122
  107. data/test/test_gl_13.rb +202 -210
  108. data/test/test_gl_14.rb +16 -19
  109. data/test/test_gl_15.rb +2 -4
  110. data/test/test_gl_20.rb +45 -58
  111. data/test/test_gl_21.rb +46 -163
  112. data/test/test_gl_ext_arb.rb +54 -72
  113. data/test/test_gl_ext_ati.rb +0 -2
  114. data/test/test_gl_ext_ext.rb +66 -66
  115. data/test/test_gl_ext_gremedy.rb +8 -15
  116. data/test/test_gl_ext_nv.rb +109 -112
  117. data/test/test_opengl_buffer.rb +8 -25
  118. data/utils/README +0 -5
  119. data/utils/enumgen.rb +72 -76
  120. data/utils/extlistgen.rb +55 -55
  121. metadata +87 -66
  122. metadata.gz.sig +2 -0
  123. data/Rakefile.cross +0 -107
  124. data/docs/build_install.txt +0 -119
  125. data/docs/extensions.txt.in +0 -348
  126. data/docs/history.txt +0 -66
  127. data/docs/requirements_and_design.txt +0 -117
  128. data/docs/roadmap.txt +0 -28
  129. data/docs/scientific_use.txt +0 -35
  130. data/docs/supplies/page_template.html +0 -71
  131. data/docs/thanks.txt +0 -29
  132. data/docs/tutorial.txt +0 -469
  133. data/ext/opengl/glu-enums.c +0 -164
  134. data/ext/opengl/glu-enums.h +0 -463
  135. data/ext/opengl/glu.c +0 -1534
  136. data/ext/opengl/glut.c +0 -1145
  137. data/ext/opengl/glut_callbacks.c +0 -845
  138. data/lib/glu.rb +0 -1
  139. data/lib/glut.rb +0 -1
  140. data/test/test_glu.rb +0 -309
  141. data/utils/mkdn2html.rb +0 -59
  142. data/utils/post-mkdn2html.rb +0 -91
  143. data/website/images/ogl.jpg +0 -0
  144. data/website/images/tab_bottom.gif +0 -0
  145. data/website/style.css +0 -198
@@ -16,21 +16,14 @@
16
16
  require 'opengl/test_case'
17
17
 
18
18
  class TestGlExtGremedy < OpenGL::TestCase
19
- def setup
20
- super()
21
- end
22
19
 
23
- def teardown
24
- super()
25
- end
20
+ def test_gl_gremedy_string_marker
21
+ supported?("GL_GREMEDY_string_marker")
22
+ glStringMarkerGREMEDY("test")
23
+ end
26
24
 
27
- def test_gl_gremedy_string_marker
28
- supported?("GL_GREMEDY_string_marker")
29
- glStringMarkerGREMEDY("test")
30
- end
31
-
32
- def test_gl_gremedy_frame_terminator
33
- supported?("GL_GREMEDY_frame_terminator")
34
- glFrameTerminatorGREMEDY()
35
- end
25
+ def test_gl_gremedy_frame_terminator
26
+ supported?("GL_GREMEDY_frame_terminator")
27
+ glFrameTerminatorGREMEDY()
28
+ end
36
29
  end
@@ -1,4 +1,3 @@
1
-
2
1
  # Copyright (C) 2007 Jan Dvorak <jan.dvorak@kraxnet.cz>
3
2
  #
4
3
  # This program is distributed under the terms of the MIT license.
@@ -20,144 +19,144 @@ class TestGlExtNv < OpenGL::TestCase
20
19
  def test_gl_nv_vertex_program
21
20
  supported?("GL_NV_vertex_program")
22
21
 
23
- assert_equal(glIsProgramNV(0),false)
22
+ assert_equal(false, glIsProgramNV(0))
24
23
  programs = glGenProgramsNV(2)
25
- assert_equal(programs.size,2)
24
+ assert_equal(2, programs.size)
26
25
 
27
26
  program = "!!VSP1.0\nEND"
28
27
 
29
28
  glBindProgramNV(GL_VERTEX_PROGRAM_NV, programs[1])
30
29
  glLoadProgramNV(GL_VERTEX_STATE_PROGRAM_NV, programs[0], program)
31
- assert_equal(glGetProgramStringNV(programs[0], GL_PROGRAM_STRING_NV), program)
32
- assert_equal(glIsProgramNV(programs[0]),true)
30
+ assert_equal(program, glGetProgramStringNV(programs[0], GL_PROGRAM_STRING_NV))
31
+ assert_equal(true, glIsProgramNV(programs[0]))
33
32
 
34
- assert_equal(glGetProgramivNV(programs[0],GL_PROGRAM_LENGTH_NV),program.size)
33
+ assert_equal(program.size, glGetProgramivNV(programs[0],GL_PROGRAM_LENGTH_NV))
35
34
 
36
35
  glVertexAttribPointerNV(1,2,GL_FLOAT,0,[1,1].pack("f*"))
37
- assert_equal(glGetVertexAttribPointervNV(1),[1,1].pack("f*"))
36
+ assert_equal([1,1].pack("f*"), glGetVertexAttribPointervNV(1))
38
37
 
39
38
  glExecuteProgramNV(GL_VERTEX_STATE_PROGRAM_NV,programs[0],[1,1,1,1])
40
39
 
41
40
  glProgramParameter4dNV(GL_VERTEX_PROGRAM_NV,1, 1,2,3,4)
42
- assert_equal(glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV),[1,2,3,4])
41
+ assert_equal([1,2,3,4], glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV))
43
42
  glProgramParameter4fNV(GL_VERTEX_PROGRAM_NV,1, 5,6,7,8)
44
- assert_equal(glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV),[5,6,7,8])
43
+ assert_equal([5,6,7,8], glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV))
45
44
  glProgramParameter4dvNV(GL_VERTEX_PROGRAM_NV,1, [1,2,3,4])
46
- assert_equal(glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV),[1,2,3,4])
45
+ assert_equal([1,2,3,4], glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV))
47
46
  glProgramParameter4fvNV(GL_VERTEX_PROGRAM_NV,1, [5,6,7,8])
48
- assert_equal(glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV),[5,6,7,8])
47
+ assert_equal([5,6,7,8], glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV))
49
48
 
50
49
  glProgramParameters4fvNV(GL_VERTEX_PROGRAM_NV,1, [1,2,3,4,5,6,7,8])
51
- assert_equal(glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV),[1,2,3,4])
52
- assert_equal(glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,2,GL_PROGRAM_PARAMETER_NV),[5,6,7,8])
50
+ assert_equal([1,2,3,4], glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV))
51
+ assert_equal([5,6,7,8], glGetProgramParameterfvNV(GL_VERTEX_PROGRAM_NV,2,GL_PROGRAM_PARAMETER_NV))
53
52
 
54
53
  glProgramParameters4dvNV(GL_VERTEX_PROGRAM_NV,1, [8,7,6,5,4,3,2,1])
55
- assert_equal(glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV),[8,7,6,5])
56
- assert_equal(glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,2,GL_PROGRAM_PARAMETER_NV),[4,3,2,1])
54
+ assert_equal([8,7,6,5], glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,1,GL_PROGRAM_PARAMETER_NV))
55
+ assert_equal([4,3,2,1], glGetProgramParameterdvNV(GL_VERTEX_PROGRAM_NV,2,GL_PROGRAM_PARAMETER_NV))
57
56
 
58
57
 
59
58
  glVertexAttrib1dNV(1,1)
60
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0],1)
59
+ assert_equal(1, glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0])
61
60
  glVertexAttrib1fNV(1,2)
62
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0],2)
61
+ assert_equal(2, glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0])
63
62
  glVertexAttrib1sNV(1,3)
64
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0],3)
63
+ assert_equal(3, glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0])
65
64
  glVertexAttrib1dvNV(1,[1])
66
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0],1)
65
+ assert_equal(1, glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0])
67
66
  glVertexAttrib1fvNV(1,[2])
68
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0],2)
67
+ assert_equal(2, glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0])
69
68
  glVertexAttrib1svNV(1,[3])
70
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0],3)
69
+ assert_equal(3, glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0])
71
70
 
72
71
  glVertexAttrib2dNV(1,1,2)
73
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[1,2])
72
+ assert_equal([1,2], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
74
73
  glVertexAttrib2fNV(1,2,3)
75
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[2,3])
74
+ assert_equal([2,3], glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
76
75
  glVertexAttrib2sNV(1,3,4)
77
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[3,4])
76
+ assert_equal([3,4], glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
78
77
  glVertexAttrib2dvNV(1,[1,2])
79
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[1,2])
78
+ assert_equal([1,2], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
80
79
  glVertexAttrib2fvNV(1,[2,3])
81
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[2,3])
80
+ assert_equal([2,3], glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
82
81
  glVertexAttrib2svNV(1,[3,4])
83
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[3,4])
82
+ assert_equal([3,4], glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
84
83
 
85
84
  glVertexAttrib3dNV(1,1,2,3)
86
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[1,2,3])
85
+ assert_equal([1,2,3], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
87
86
  glVertexAttrib3fNV(1,2,3,4)
88
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[2,3,4])
87
+ assert_equal([2,3,4], glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
89
88
  glVertexAttrib3sNV(1,3,4,5)
90
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[3,4,5])
89
+ assert_equal([3,4,5], glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
91
90
  glVertexAttrib3dvNV(1,[1,2,3])
92
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[1,2,3])
91
+ assert_equal([1,2,3], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
93
92
  glVertexAttrib3fvNV(1,[2,3,4])
94
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[2,3,4])
93
+ assert_equal([2,3,4], glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
95
94
  glVertexAttrib3svNV(1,[3,4,5])
96
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[3,4,5])
95
+ assert_equal([3,4,5], glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
97
96
 
98
97
  glVertexAttrib4dNV(1,1,2,3,4)
99
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[1,2,3,4])
98
+ assert_equal([1,2,3,4], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
100
99
  glVertexAttrib4fNV(1,2,3,4,5)
101
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[2,3,4,5])
100
+ assert_equal([2,3,4,5], glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
102
101
  glVertexAttrib4sNV(1,3,4,5,6)
103
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[3,4,5,6])
102
+ assert_equal([3,4,5,6], glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
104
103
  glVertexAttrib4dvNV(1,[1,2,3,4])
105
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[1,2,3,4])
104
+ assert_equal([1,2,3,4], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
106
105
  glVertexAttrib4fvNV(1,[2,3,4,5])
107
- assert_equal(glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[2,3,4,5])
106
+ assert_equal([2,3,4,5], glGetVertexAttribfvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
108
107
  glVertexAttrib4svNV(1,[3,4,5,6])
109
- assert_equal(glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[3,4,5,6])
108
+ assert_equal([3,4,5,6], glGetVertexAttribivNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
110
109
 
111
110
  glVertexAttrib4ubNV(1,2**8-1,0,2**8-1,0)
112
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[1,0,1,0])
111
+ assert_equal([1,0,1,0], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
113
112
  glVertexAttrib4ubvNV(1,[0,2**8-1,0,2**8-1])
114
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[0,1,0,1])
113
+ assert_equal([0,1,0,1], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
115
114
 
116
115
  glVertexAttribs1dvNV(1,[1,2])
117
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0],1)
118
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0],2)
116
+ assert_equal(1, glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0])
117
+ assert_equal(2, glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0])
119
118
  glVertexAttribs1fvNV(1,[3,4])
120
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0],3)
121
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0],4)
119
+ assert_equal(3, glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0])
120
+ assert_equal(4, glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0])
122
121
  glVertexAttribs1svNV(1,[5,6])
123
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0],5)
124
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0],6)
122
+ assert_equal(5, glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0])
123
+ assert_equal(6, glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0])
125
124
 
126
125
  glVertexAttribs2dvNV(1,[1,2,3,4])
127
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[1,2])
128
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,2],[3,4])
126
+ assert_equal([1,2], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
127
+ assert_equal([3,4], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,2])
129
128
  glVertexAttribs2fvNV(1,[3,4,5,6])
130
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[3,4])
131
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,2],[5,6])
129
+ assert_equal([3,4], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
130
+ assert_equal([5,6], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,2])
132
131
  glVertexAttribs2svNV(1,[5,6,7,8])
133
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2],[5,6])
134
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,2],[7,8])
132
+ assert_equal([5,6], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,2])
133
+ assert_equal([7,8], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,2])
135
134
 
136
135
  glVertexAttribs3dvNV(1,[1,2,3,4,5,6])
137
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[1,2,3])
138
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,3],[4,5,6])
136
+ assert_equal([1,2,3], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
137
+ assert_equal([4,5,6], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,3])
139
138
  glVertexAttribs3fvNV(1,[3,4,5,6,7,8])
140
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[3,4,5])
141
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,3],[6,7,8])
139
+ assert_equal([3,4,5], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
140
+ assert_equal([6,7,8], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,3])
142
141
  glVertexAttribs3svNV(1,[5,6,7,8,9,10])
143
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3],[5,6,7])
144
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,3],[8,9,10])
142
+ assert_equal([5,6,7], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,3])
143
+ assert_equal([8,9,10], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,3])
145
144
 
146
145
  glVertexAttribs4dvNV(1,[1,2,3,4,5,6,7,8])
147
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[1,2,3,4])
148
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4],[5,6,7,8])
146
+ assert_equal([1,2,3,4], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
147
+ assert_equal([5,6,7,8], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4])
149
148
  glVertexAttribs4fvNV(1,[3,4,5,6,7,8,9,10])
150
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[3,4,5,6])
151
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4],[7,8,9,10])
149
+ assert_equal([3,4,5,6], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
150
+ assert_equal([7,8,9,10], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4])
152
151
  glVertexAttribs4svNV(1,[5,6,7,8,9,10,11,12])
153
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[5,6,7,8])
154
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4],[9,10,11,12])
152
+ assert_equal([5,6,7,8], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
153
+ assert_equal([9,10,11,12], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4])
155
154
  glVertexAttribs4ubvNV(1,[2**8-1,0,2**8-1,0,2**8-1,0,2**8-1,0])
156
- assert_equal(glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4],[1,0,1,0])
157
- assert_equal(glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4],[1,0,1,0])
155
+ assert_equal([1,0,1,0], glGetVertexAttribdvNV(1,GL_CURRENT_ATTRIB_NV)[0,4])
156
+ assert_equal([1,0,1,0], glGetVertexAttribdvNV(2,GL_CURRENT_ATTRIB_NV)[0,4])
158
157
 
159
158
  glTrackMatrixNV(GL_VERTEX_PROGRAM_NV, 4, GL_MATRIX0_NV, GL_IDENTITY_NV);
160
- assert_equal(glGetTrackMatrixivNV(GL_VERTEX_PROGRAM_NV, 4, GL_TRACK_MATRIX_NV),GL_MATRIX0_NV)
159
+ assert_equal(GL_MATRIX0_NV, glGetTrackMatrixivNV(GL_VERTEX_PROGRAM_NV, 4, GL_TRACK_MATRIX_NV))
161
160
 
162
161
  glRequestResidentProgramsNV(programs[0])
163
162
  res = glAreProgramsResidentNV(programs[0])
@@ -174,13 +173,13 @@ class TestGlExtNv < OpenGL::TestCase
174
173
  glLoadProgramNV(GL_FRAGMENT_PROGRAM_NV, programs[0], program)
175
174
 
176
175
  glProgramNamedParameter4fNV(programs[0],"test",1,2,3,4)
177
- assert_equal(glGetProgramNamedParameterfvNV(programs[0],"test"),[1,2,3,4])
176
+ assert_equal([1,2,3,4], glGetProgramNamedParameterfvNV(programs[0],"test"))
178
177
  glProgramNamedParameter4dNV(programs[0],"test",5,6,7,8)
179
- assert_equal(glGetProgramNamedParameterdvNV(programs[0],"test"),[5,6,7,8])
178
+ assert_equal([5,6,7,8], glGetProgramNamedParameterdvNV(programs[0],"test"))
180
179
  glProgramNamedParameter4fvNV(programs[0],"test",[1,2,3,4])
181
- assert_equal(glGetProgramNamedParameterfvNV(programs[0],"test"),[1,2,3,4])
180
+ assert_equal([1,2,3,4], glGetProgramNamedParameterfvNV(programs[0],"test"))
182
181
  glProgramNamedParameter4dvNV(programs[0],"test",[5,6,7,8])
183
- assert_equal(glGetProgramNamedParameterdvNV(programs[0],"test"),[5,6,7,8])
182
+ assert_equal([5,6,7,8], glGetProgramNamedParameterdvNV(programs[0],"test"))
184
183
 
185
184
  glDeleteProgramsNV(programs)
186
185
  end
@@ -192,9 +191,9 @@ class TestGlExtNv < OpenGL::TestCase
192
191
  glBindRenderbufferEXT(GL_RENDERBUFFER_EXT,rb)
193
192
  glRenderbufferStorageMultisampleCoverageNV(GL_RENDERBUFFER_EXT,4,4, GL_RGBA,2,2)
194
193
  samples = glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,GL_RENDERBUFFER_COVERAGE_SAMPLES_NV)
195
- assert_equal(samples,4)
194
+ assert_equal(4, samples)
196
195
  samples = glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT,GL_RENDERBUFFER_COLOR_SAMPLES_NV)
197
- assert_equal(samples,4)
196
+ assert_equal(4, samples)
198
197
 
199
198
  glDeleteRenderbuffersEXT(rb)
200
199
  end
@@ -205,11 +204,11 @@ class TestGlExtNv < OpenGL::TestCase
205
204
  assert_equal(fences.size,2)
206
205
 
207
206
  glSetFenceNV(fences[0],GL_ALL_COMPLETED_NV)
208
- assert_equal(glGetFenceivNV(fences[0],GL_FENCE_CONDITION_NV),GL_ALL_COMPLETED_NV)
209
- assert_equal(glIsFenceNV(fences[0]),true)
207
+ assert_equal(GL_ALL_COMPLETED_NV, glGetFenceivNV(fences[0],GL_FENCE_CONDITION_NV))
208
+ assert_equal(true, glIsFenceNV(fences[0]))
210
209
 
211
210
  glFinishFenceNV(fences[0])
212
- assert_equal(glTestFenceNV(fences[0]),true)
211
+ assert_equal(true, glTestFenceNV(fences[0]))
213
212
 
214
213
  glDeleteFencesNV(fences)
215
214
  end
@@ -217,11 +216,11 @@ class TestGlExtNv < OpenGL::TestCase
217
216
  def test_gl_nv_depth_buffer_float
218
217
  supported?("GL_NV_depth_buffer_float")
219
218
  glDepthRangedNV(0.1,0.2)
220
- assert(assert_in_delta(glGetFloatv(GL_DEPTH_RANGE),[0.1,0.2]))
219
+ assert_in_delta([0.1,0.2], glGetFloatv(GL_DEPTH_RANGE))
221
220
  glDepthBoundsdNV(0.1,0.2)
222
- assert(assert_in_delta(glGetFloatv(GL_DEPTH_BOUNDS_EXT),[0.1,0.2]))
221
+ assert_in_delta([0.1,0.2], glGetFloatv(GL_DEPTH_BOUNDS_EXT))
223
222
  glClearDepthdNV(0.3)
224
- assert(assert_in_delta([glGetDoublev(GL_DEPTH_CLEAR_VALUE)],[0.3]))
223
+ assert_in_delta([0.3], [glGetDoublev(GL_DEPTH_CLEAR_VALUE)])
225
224
  end
226
225
 
227
226
  def test_gl_nv_occlusion_query
@@ -231,7 +230,7 @@ class TestGlExtNv < OpenGL::TestCase
231
230
  assert_equal(queries.size,2)
232
231
 
233
232
  glBeginOcclusionQueryNV(queries[0])
234
- assert_equal(glIsOcclusionQueryNV(queries[0]),true)
233
+ assert_equal(true, glIsOcclusionQueryNV(queries[0]))
235
234
 
236
235
  glEndOcclusionQueryNV()
237
236
  r = glGetOcclusionQueryivNV(queries[0],GL_PIXEL_COUNT_AVAILABLE_NV)
@@ -239,7 +238,7 @@ class TestGlExtNv < OpenGL::TestCase
239
238
  assert(glGetOcclusionQueryuivNV(queries[0],GL_PIXEL_COUNT_NV)>=0)
240
239
 
241
240
  glDeleteOcclusionQueriesNV(queries)
242
- assert_equal(glIsOcclusionQueryNV(queries[1]),false)
241
+ assert_equal(false, glIsOcclusionQueryNV(queries[1]))
243
242
  end
244
243
 
245
244
  def test_gl_nv_gpu_program4
@@ -252,30 +251,30 @@ class TestGlExtNv < OpenGL::TestCase
252
251
  glProgramStringARB(GL_VERTEX_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, program)
253
252
 
254
253
  glProgramLocalParameterI4iNV(GL_VERTEX_PROGRAM_ARB,1, 1,2,3,4)
255
- assert_equal(glGetProgramLocalParameterIivNV(GL_VERTEX_PROGRAM_ARB,1),[1,2,3,4])
254
+ assert_equal([1,2,3,4], glGetProgramLocalParameterIivNV(GL_VERTEX_PROGRAM_ARB,1))
256
255
  glProgramLocalParameterI4uiNV(GL_VERTEX_PROGRAM_ARB,1, 5,6,7,8)
257
- assert_equal(glGetProgramLocalParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1),[5,6,7,8])
256
+ assert_equal([5,6,7,8], glGetProgramLocalParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1))
258
257
  glProgramLocalParameterI4ivNV(GL_VERTEX_PROGRAM_ARB,1, [1,2,3,4])
259
- assert_equal(glGetProgramLocalParameterIivNV(GL_VERTEX_PROGRAM_ARB,1),[1,2,3,4])
258
+ assert_equal([1,2,3,4], glGetProgramLocalParameterIivNV(GL_VERTEX_PROGRAM_ARB,1))
260
259
  glProgramLocalParameterI4uivNV(GL_VERTEX_PROGRAM_ARB,1, [5,6,7,8])
261
- assert_equal(glGetProgramLocalParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1),[5,6,7,8])
260
+ assert_equal([5,6,7,8], glGetProgramLocalParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1))
262
261
  glProgramLocalParametersI4ivNV(GL_VERTEX_PROGRAM_ARB,1, [1,2,3,4])
263
- assert_equal(glGetProgramLocalParameterIivNV(GL_VERTEX_PROGRAM_ARB,1),[1,2,3,4])
262
+ assert_equal([1,2,3,4], glGetProgramLocalParameterIivNV(GL_VERTEX_PROGRAM_ARB,1))
264
263
  glProgramLocalParametersI4uivNV(GL_VERTEX_PROGRAM_ARB,1, [5,6,7,8])
265
- assert_equal(glGetProgramLocalParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1),[5,6,7,8])
264
+ assert_equal([5,6,7,8], glGetProgramLocalParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1))
266
265
 
267
266
  glProgramEnvParameterI4iNV(GL_VERTEX_PROGRAM_ARB,1, 1,2,3,4)
268
- assert_equal(glGetProgramEnvParameterIivNV(GL_VERTEX_PROGRAM_ARB,1),[1,2,3,4])
267
+ assert_equal([1,2,3,4], glGetProgramEnvParameterIivNV(GL_VERTEX_PROGRAM_ARB,1))
269
268
  glProgramEnvParameterI4uiNV(GL_VERTEX_PROGRAM_ARB,1, 5,6,7,8)
270
- assert_equal(glGetProgramEnvParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1),[5,6,7,8])
269
+ assert_equal([5,6,7,8], glGetProgramEnvParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1))
271
270
  glProgramEnvParameterI4ivNV(GL_VERTEX_PROGRAM_ARB,1, [1,2,3,4])
272
- assert_equal(glGetProgramEnvParameterIivNV(GL_VERTEX_PROGRAM_ARB,1),[1,2,3,4])
271
+ assert_equal([1,2,3,4], glGetProgramEnvParameterIivNV(GL_VERTEX_PROGRAM_ARB,1))
273
272
  glProgramEnvParameterI4uivNV(GL_VERTEX_PROGRAM_ARB,1, [5,6,7,8])
274
- assert_equal(glGetProgramEnvParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1),[5,6,7,8])
273
+ assert_equal([5,6,7,8], glGetProgramEnvParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1))
275
274
  glProgramEnvParametersI4ivNV(GL_VERTEX_PROGRAM_ARB,1, [1,2,3,4])
276
- assert_equal(glGetProgramEnvParameterIivNV(GL_VERTEX_PROGRAM_ARB,1),[1,2,3,4])
275
+ assert_equal([1,2,3,4], glGetProgramEnvParameterIivNV(GL_VERTEX_PROGRAM_ARB,1))
277
276
  glProgramEnvParametersI4uivNV(GL_VERTEX_PROGRAM_ARB,1, [5,6,7,8])
278
- assert_equal(glGetProgramEnvParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1),[5,6,7,8])
277
+ assert_equal([5,6,7,8], glGetProgramEnvParameterIuivNV(GL_VERTEX_PROGRAM_ARB,1))
279
278
 
280
279
  glDeleteProgramsARB(programs)
281
280
  end
@@ -294,9 +293,9 @@ END
294
293
  glBindProgramARB(GL_GEOMETRY_PROGRAM_NV, program_id)
295
294
  glProgramStringARB(GL_GEOMETRY_PROGRAM_NV, GL_PROGRAM_FORMAT_ASCII_ARB, geometry_program);
296
295
 
297
- assert_equal(glGetProgramivARB(GL_GEOMETRY_PROGRAM_NV,GL_GEOMETRY_VERTICES_OUT_EXT),1)
296
+ assert_equal(1, glGetProgramivARB(GL_GEOMETRY_PROGRAM_NV,GL_GEOMETRY_VERTICES_OUT_EXT))
298
297
  glProgramVertexLimitNV(GL_GEOMETRY_PROGRAM_NV, 2)
299
- assert_equal(glGetProgramivARB(GL_GEOMETRY_PROGRAM_NV,GL_GEOMETRY_VERTICES_OUT_EXT),2)
298
+ assert_equal(2, glGetProgramivARB(GL_GEOMETRY_PROGRAM_NV,GL_GEOMETRY_VERTICES_OUT_EXT))
300
299
 
301
300
  #
302
301
 
@@ -308,18 +307,18 @@ END
308
307
  glBindTexture(GL_TEXTURE_3D, texture3d)
309
308
  glBindTexture(GL_TEXTURE_CUBE_MAP, texture_cube)
310
309
 
311
- glFramebufferTextureEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,texture2d,0)
312
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT),texture2d)
313
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT),0)
314
- glFramebufferTextureLayerEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,texture3d,0,1)
315
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT),texture3d)
316
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT),0)
317
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT),1)
310
+ glFramebufferTextureEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,texture2d, 0)
311
+ assert_equal(texture2d, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT, GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT))
312
+ assert_equal(0, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT))
313
+ glFramebufferTextureLayerEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,texture3d, 0,1)
314
+ assert_equal(texture3d, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT))
315
+ assert_equal(0, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT))
316
+ assert_equal(1, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER_EXT))
318
317
 
319
318
  glFramebufferTextureFaceEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,texture_cube,0,GL_TEXTURE_CUBE_MAP_POSITIVE_X)
320
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT),texture_cube)
321
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT),0)
322
- assert_equal(glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT),GL_TEXTURE_CUBE_MAP_POSITIVE_X)
319
+ assert_equal(texture_cube, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME_EXT))
320
+ assert_equal(0, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL_EXT))
321
+ assert_equal(GL_TEXTURE_CUBE_MAP_POSITIVE_X, glGetFramebufferAttachmentParameterivEXT(GL_FRAMEBUFFER_EXT,GL_COLOR_ATTACHMENT0_EXT,GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE_EXT))
323
322
 
324
323
  glDeleteTextures([texture2d,texture3d])
325
324
  glDeleteFramebuffersEXT(fbo)
@@ -338,15 +337,13 @@ END
338
337
  def test_gl_nv_point_sprite
339
338
  supported?("GL_NV_point_sprite")
340
339
  glPointParameteriNV(GL_POINT_SPRITE_R_MODE_NV, GL_ZERO)
341
- assert_equal(glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV),GL_ZERO)
340
+ assert_equal(GL_ZERO, glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV))
342
341
  glPointParameteriNV(GL_POINT_SPRITE_R_MODE_NV, GL_S)
343
- assert_equal(glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV),GL_S)
342
+ assert_equal(GL_S, glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV))
344
343
 
345
344
  glPointParameterivNV(GL_POINT_SPRITE_R_MODE_NV, [GL_ZERO])
346
- assert_equal(glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV),GL_ZERO)
345
+ assert_equal(GL_ZERO, glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV))
347
346
  glPointParameterivNV(GL_POINT_SPRITE_R_MODE_NV, [GL_S])
348
- assert_equal(glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV),GL_S)
347
+ assert_equal(GL_S, glGetIntegerv(GL_POINT_SPRITE_R_MODE_NV))
349
348
  end
350
-
351
349
  end
352
-
@@ -3,14 +3,12 @@ require 'opengl/test_case'
3
3
  class TestOpenGLBuffer < OpenGL::TestCase
4
4
 
5
5
  def test_class_map
6
- buffer, = glGenBuffers 1
6
+ buffer = glGenBuffers(1).first
7
7
 
8
8
  glBindBuffer GL_ARRAY_BUFFER, buffer
9
-
10
9
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
11
10
 
12
11
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_ONLY
13
-
14
12
  assert_equal 'hello', buf.read(5)
15
13
 
16
14
  ensure
@@ -18,38 +16,33 @@ class TestOpenGLBuffer < OpenGL::TestCase
18
16
  end
19
17
 
20
18
  def test_read_length
21
- buffer, = glGenBuffers 1
19
+ buffer = glGenBuffers(1).first
22
20
 
23
21
  glBindBuffer GL_ARRAY_BUFFER, buffer
24
-
25
22
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
26
23
 
27
24
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_ONLY
28
-
29
25
  assert_equal 'he', buf.read(2)
30
26
  ensure
31
27
  buf.unmap
32
28
  end
33
29
 
34
30
  def test_read_offset
35
- buffer, = glGenBuffers 1
31
+ buffer = glGenBuffers(1).first
36
32
 
37
33
  glBindBuffer GL_ARRAY_BUFFER, buffer
38
-
39
34
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
40
35
 
41
36
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_ONLY
42
-
43
37
  assert_equal 'el', buf.read(2, 1)
44
38
  ensure
45
39
  buf.unmap
46
40
  end
47
41
 
48
42
  def test_read_unbounded
49
- buffer, = glGenBuffers 1
43
+ buffer = glGenBuffers(1).first
50
44
 
51
45
  glBindBuffer GL_ARRAY_BUFFER, buffer
52
-
53
46
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
54
47
 
55
48
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_ONLY
@@ -64,31 +57,26 @@ class TestOpenGLBuffer < OpenGL::TestCase
64
57
  end
65
58
 
66
59
  def test_write
67
- buffer, = glGenBuffers 1
60
+ buffer = glGenBuffers(1).first
68
61
 
69
62
  glBindBuffer GL_ARRAY_BUFFER, buffer
70
-
71
63
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
72
64
 
73
65
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_WRITE
74
66
 
75
67
  buf.write 'world'
76
-
77
68
  assert_equal 'world', buf.read(5)
78
69
 
79
70
  buf.unmap
80
-
81
71
  assert_equal 'world', glGetBufferSubData(GL_ARRAY_BUFFER, 0, 5)
82
-
83
72
  ensure
84
73
  buf.unmap
85
74
  end
86
75
 
87
76
  def test_write_nil
88
- buffer, = glGenBuffers 1
77
+ buffer = glGenBuffers(1).first
89
78
 
90
79
  glBindBuffer GL_ARRAY_BUFFER, buffer
91
-
92
80
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
93
81
 
94
82
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_WRITE
@@ -98,29 +86,26 @@ class TestOpenGLBuffer < OpenGL::TestCase
98
86
  end
99
87
 
100
88
  assert_equal 'cannot write nil to buffer', e.message
101
-
102
89
  ensure
103
90
  buf.unmap
104
91
  end
105
92
 
106
93
  def test_write_offset
107
- buffer, = glGenBuffers 1
94
+ buffer = glGenBuffers(1).first
108
95
 
109
96
  glBindBuffer GL_ARRAY_BUFFER, buffer
110
-
111
97
  glBufferData GL_ARRAY_BUFFER, 5, 'hello', GL_STREAM_READ
112
98
 
113
99
  buf = OpenGL::Buffer.map GL_ARRAY_BUFFER, GL_READ_WRITE
114
100
 
115
101
  buf.write 'O', 4
116
-
117
102
  assert_equal 'hellO', buf.read(5)
118
103
  ensure
119
104
  buf.unmap
120
105
  end
121
106
 
122
107
  def test_write_unmapped
123
- buffer, = glGenBuffers 1
108
+ buffer = glGenBuffers(1).first
124
109
 
125
110
  glBindBuffer GL_ARRAY_BUFFER, buffer
126
111
 
@@ -132,6 +117,4 @@ class TestOpenGLBuffer < OpenGL::TestCase
132
117
 
133
118
  assert_equal 'write to unmapped buffer', e.message
134
119
  end
135
-
136
120
  end
137
-