opengl 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +1 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +2 -1
- data/.travis.yml +19 -0
- data/History.rdoc +26 -0
- data/Manifest.txt +3 -23
- data/README.rdoc +43 -37
- data/Rakefile +6 -62
- data/examples/NeHe/nehe_lesson02.rb +3 -2
- data/examples/NeHe/nehe_lesson03.rb +3 -2
- data/examples/NeHe/nehe_lesson04.rb +3 -1
- data/examples/NeHe/nehe_lesson05.rb +4 -1
- data/examples/NeHe/nehe_lesson06.rb +9 -6
- data/examples/NeHe/nehe_lesson07.rb +9 -6
- data/examples/NeHe/nehe_lesson08.rb +9 -6
- data/examples/NeHe/nehe_lesson09.rb +10 -6
- data/examples/NeHe/nehe_lesson11.rb +9 -6
- data/examples/NeHe/nehe_lesson12.rb +9 -6
- data/examples/NeHe/nehe_lesson16.rb +50 -47
- data/examples/NeHe/nehe_lesson19.rb +10 -7
- data/examples/NeHe/nehe_lesson36.rb +234 -229
- data/examples/OrangeBook/brick.rb +227 -225
- data/examples/OrangeBook/particle.rb +233 -231
- data/examples/RedBook/aapoly.rb +71 -70
- data/examples/RedBook/aargb.rb +54 -52
- data/examples/RedBook/accanti.rb +96 -94
- data/examples/RedBook/accpersp.rb +106 -104
- data/examples/RedBook/alpha.rb +54 -52
- data/examples/RedBook/alpha3D.rb +90 -88
- data/examples/RedBook/bezcurve.rb +48 -46
- data/examples/RedBook/bezmesh.rb +71 -69
- data/examples/RedBook/checker.rb +57 -55
- data/examples/RedBook/clip.rb +41 -39
- data/examples/RedBook/colormat.rb +72 -70
- data/examples/RedBook/cube.rb +39 -37
- data/examples/RedBook/depthcue.rb +37 -35
- data/examples/RedBook/dof.rb +110 -109
- data/examples/RedBook/double.rb +40 -38
- data/examples/RedBook/drawf.rb +30 -28
- data/examples/RedBook/feedback.rb +79 -77
- data/examples/RedBook/fog.rb +90 -89
- data/examples/RedBook/font.rb +78 -76
- data/examples/RedBook/hello.rb +29 -27
- data/examples/RedBook/image.rb +57 -55
- data/examples/RedBook/jitter.rb +131 -131
- data/examples/RedBook/light.rb +2 -1
- data/examples/RedBook/lines.rb +70 -68
- data/examples/RedBook/list.rb +48 -46
- data/examples/RedBook/material.rb +200 -199
- data/examples/RedBook/mipmap.rb +84 -82
- data/examples/RedBook/model.rb +55 -53
- data/examples/RedBook/movelight.rb +52 -50
- data/examples/RedBook/pickdepth.rb +103 -101
- data/examples/RedBook/planet.rb +46 -44
- data/examples/RedBook/quadric.rb +97 -95
- data/examples/RedBook/robot.rb +55 -53
- data/examples/RedBook/select.rb +118 -116
- data/examples/RedBook/smooth.rb +35 -33
- data/examples/RedBook/stencil.rb +96 -94
- data/examples/RedBook/stroke.rb +75 -73
- data/examples/RedBook/surface.rb +93 -91
- data/examples/RedBook/teaambient.rb +71 -69
- data/examples/RedBook/teapots.rb +105 -103
- data/examples/RedBook/tess.rb +96 -94
- data/examples/RedBook/texbind.rb +79 -77
- data/examples/RedBook/texgen.rb +88 -86
- data/examples/RedBook/texturesurf.rb +57 -55
- data/examples/RedBook/varray.rb +85 -83
- data/examples/RedBook/wrap.rb +76 -74
- data/examples/misc/OGLBench.rb +114 -113
- data/examples/misc/anisotropic.rb +154 -152
- data/examples/misc/fbo_test.rb +37 -36
- data/examples/misc/font-glut.rb +47 -46
- data/examples/misc/glfwtest.rb +16 -16
- data/examples/misc/plane.rb +13 -13
- data/examples/misc/readpixel.rb +66 -65
- data/examples/misc/sdltest.rb +21 -19
- data/examples/misc/trislam.rb +548 -547
- data/ext/opengl/common.h +16 -38
- data/ext/opengl/conv.h +39 -41
- data/ext/opengl/extconf.rb +4 -31
- data/ext/opengl/funcdef.h +126 -124
- data/ext/opengl/gl-1.0-1.1.c +1917 -1917
- data/ext/opengl/gl-1.2.c +4 -667
- data/ext/opengl/gl-1.3.c +9 -9
- data/ext/opengl/gl-1.4.c +8 -8
- data/ext/opengl/gl-1.5.c +1 -1
- data/ext/opengl/gl-2.0.c +392 -388
- data/ext/opengl/gl-3.0.c +493 -0
- data/ext/opengl/gl-enums.c +1523 -5
- data/ext/opengl/gl-enums.h +4679 -122
- data/ext/opengl/gl-error.c +7 -7
- data/ext/opengl/gl-error.h +4 -4
- data/ext/opengl/gl-ext-arb.c +468 -464
- data/ext/opengl/gl-ext-ext.c +18 -18
- data/ext/opengl/gl-ext-nv.c +15 -15
- data/ext/opengl/gl.c +2 -0
- data/ext/opengl/gl_buffer.c +92 -92
- data/ext/opengl/opengl.c +1 -7
- data/lib/opengl.rb +23 -59
- data/lib/opengl/test_case.rb +1 -2
- data/test/dummy.xorg.conf +140 -0
- data/test/test_gl.rb +18 -22
- data/test/test_gl_10_11.rb +220 -220
- data/test/test_gl_12.rb +11 -122
- data/test/test_gl_13.rb +202 -210
- data/test/test_gl_14.rb +16 -19
- data/test/test_gl_15.rb +2 -4
- data/test/test_gl_20.rb +45 -58
- data/test/test_gl_21.rb +46 -163
- data/test/test_gl_ext_arb.rb +54 -72
- data/test/test_gl_ext_ati.rb +0 -2
- data/test/test_gl_ext_ext.rb +66 -66
- data/test/test_gl_ext_gremedy.rb +8 -15
- data/test/test_gl_ext_nv.rb +109 -112
- data/test/test_opengl_buffer.rb +8 -25
- data/utils/README +0 -5
- data/utils/enumgen.rb +72 -76
- data/utils/extlistgen.rb +55 -55
- metadata +87 -66
- metadata.gz.sig +2 -0
- data/Rakefile.cross +0 -107
- data/docs/build_install.txt +0 -119
- data/docs/extensions.txt.in +0 -348
- data/docs/history.txt +0 -66
- data/docs/requirements_and_design.txt +0 -117
- data/docs/roadmap.txt +0 -28
- data/docs/scientific_use.txt +0 -35
- data/docs/supplies/page_template.html +0 -71
- data/docs/thanks.txt +0 -29
- data/docs/tutorial.txt +0 -469
- data/ext/opengl/glu-enums.c +0 -164
- data/ext/opengl/glu-enums.h +0 -463
- data/ext/opengl/glu.c +0 -1534
- data/ext/opengl/glut.c +0 -1145
- data/ext/opengl/glut_callbacks.c +0 -845
- data/lib/glu.rb +0 -1
- data/lib/glut.rb +0 -1
- data/test/test_glu.rb +0 -309
- data/utils/mkdn2html.rb +0 -59
- data/utils/post-mkdn2html.rb +0 -91
- data/website/images/ogl.jpg +0 -0
- data/website/images/tab_bottom.gif +0 -0
- data/website/style.css +0 -198
data/ext/opengl/opengl.c
CHANGED
data/lib/opengl.rb
CHANGED
@@ -21,69 +21,33 @@
|
|
21
21
|
# and to Bill Kelly for a version before that one.
|
22
22
|
|
23
23
|
module OpenGL
|
24
|
-
|
25
|
-
VERSION = '0.8.0'
|
26
|
-
|
24
|
+
VERSION = '0.9.0'
|
27
25
|
end
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
27
|
+
begin
|
28
|
+
RUBY_VERSION =~ /(\d+.\d+)/
|
29
|
+
require "opengl/#{$1}/opengl"
|
30
|
+
rescue LoadError
|
31
|
+
require 'opengl/opengl'
|
32
|
+
end
|
32
33
|
|
33
34
|
# (Gl.)glVertex -> GL.Vertex
|
34
35
|
# (Gl::)GL_TRUE -> GL::TRUE
|
35
36
|
module GL
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
end
|
53
|
-
|
54
|
-
# (Glu.)gluSphere -> GLU.Sphere
|
55
|
-
# (Glu::)GLU_INSIDE -> GLU::INSIDE
|
56
|
-
module GLU
|
57
|
-
extend self
|
58
|
-
include Glu
|
59
|
-
|
60
|
-
Glu.constants.each do |cn|
|
61
|
-
n = cn.to_s.sub(/^GLU_/,'')
|
62
|
-
const_set( n, Glu.const_get( cn ) )
|
63
|
-
end
|
64
|
-
|
65
|
-
Glu.methods( false ).each do |mn|
|
66
|
-
n = mn.to_s.sub(/^glu/,'')
|
67
|
-
alias_method( n, mn )
|
68
|
-
public( n )
|
69
|
-
end
|
70
|
-
end
|
71
|
-
|
72
|
-
# (Glut.)glutInit -> GLUT.Init
|
73
|
-
# (Glut::)GLUT_RGBA -> GLUT::RGBA
|
74
|
-
module GLUT
|
75
|
-
extend self
|
76
|
-
include Glut
|
77
|
-
|
78
|
-
Glut.constants.each do |cn|
|
79
|
-
n = cn.to_s.sub(/^GLUT_/,'')
|
80
|
-
next if n =~ /^[0-9]/
|
81
|
-
const_set( n, Glut.const_get( cn ) )
|
82
|
-
end
|
83
|
-
|
84
|
-
Glut.methods( false ).each do |mn|
|
85
|
-
n = mn.to_s.sub(/^glut/,'')
|
86
|
-
alias_method( n, mn )
|
87
|
-
public( n )
|
88
|
-
end
|
37
|
+
extend self
|
38
|
+
include Gl
|
39
|
+
|
40
|
+
Gl.constants.each do |cn|
|
41
|
+
n = cn.to_s.sub(/^GL_/,'')
|
42
|
+
# due to ruby naming scheme, we can't export constants with leading decimal,
|
43
|
+
# e.g. (Gl::)GL_2D would under old syntax become (GL::)2D which is illegal
|
44
|
+
next if n =~ /^[0-9]/
|
45
|
+
const_set( n, Gl.const_get( cn ) )
|
46
|
+
end
|
47
|
+
|
48
|
+
Gl.methods( false ).each do |mn|
|
49
|
+
n = mn.to_s.sub(/^gl/,'')
|
50
|
+
alias_method( n, mn )
|
51
|
+
public( n )
|
52
|
+
end
|
89
53
|
end
|
data/lib/opengl/test_case.rb
CHANGED
@@ -64,7 +64,7 @@ class OpenGL::TestCase < MiniTest::Unit::TestCase
|
|
64
64
|
|
65
65
|
# in case there is an GL error that escaped error checking routines ...
|
66
66
|
error = glGetError
|
67
|
-
assert_equal
|
67
|
+
assert_equal 0, error, gluErrorString(error)
|
68
68
|
|
69
69
|
glutDestroyWindow @window
|
70
70
|
end
|
@@ -84,4 +84,3 @@ class OpenGL::TestCase < MiniTest::Unit::TestCase
|
|
84
84
|
end
|
85
85
|
|
86
86
|
end
|
87
|
-
|
@@ -0,0 +1,140 @@
|
|
1
|
+
# This file is used to setup a dummy X server for testing on http://travis-ci.org
|
2
|
+
# See config file ".travis.yml"
|
3
|
+
|
4
|
+
##Xdummy:##
|
5
|
+
Section "ServerFlags"
|
6
|
+
Option "DontVTSwitch" "true"
|
7
|
+
Option "AllowMouseOpenFail" "true"
|
8
|
+
Option "PciForceNone" "true"
|
9
|
+
Option "AutoEnableDevices" "false"
|
10
|
+
Option "AutoAddDevices" "false"
|
11
|
+
EndSection
|
12
|
+
|
13
|
+
Section "Module"
|
14
|
+
Load "/usr/lib/xorg/modules/extensions/libglx.so"
|
15
|
+
EndSection
|
16
|
+
|
17
|
+
Section "Extensions"
|
18
|
+
Option "GLX" "Enable"
|
19
|
+
Option "NV-GLX" "Disable"
|
20
|
+
EndSection
|
21
|
+
|
22
|
+
|
23
|
+
##Xdummy:##
|
24
|
+
Section "InputDevice"
|
25
|
+
Identifier "NoMouse"
|
26
|
+
Option "CorePointer" "true"
|
27
|
+
Driver "void"
|
28
|
+
EndSection
|
29
|
+
|
30
|
+
Section "InputDevice"
|
31
|
+
Identifier "NoKeyboard"
|
32
|
+
Option "CoreKeyboard" "true"
|
33
|
+
Driver "void"
|
34
|
+
EndSection
|
35
|
+
|
36
|
+
##Xdummy:##
|
37
|
+
Section "Device"
|
38
|
+
Identifier "Videocard0"
|
39
|
+
Driver "dummy"
|
40
|
+
#VideoRam 4096000
|
41
|
+
VideoRam 256000
|
42
|
+
EndSection
|
43
|
+
|
44
|
+
##Xdummy:##
|
45
|
+
Section "Monitor"
|
46
|
+
Identifier "Monitor0"
|
47
|
+
HorizSync 10.0 - 300.0
|
48
|
+
VertRefresh 10.0 - 200.0
|
49
|
+
DisplaySize 4335 1084
|
50
|
+
#The following modeline is invalid (calculator overflowed):
|
51
|
+
#Modeline "32000x32000@0" -38917.43 32000 32032 -115848 -115816 32000 32775 32826 33601
|
52
|
+
Modeline "16384x8192@10" 2101.93 16384 16416 24400 24432 8192 8390 8403 8602
|
53
|
+
Modeline "8192x4096@10" 424.46 8192 8224 9832 9864 4096 4195 4202 4301
|
54
|
+
Modeline "5120x3200@10" 199.75 5120 5152 5904 5936 3200 3277 3283 3361
|
55
|
+
Modeline "3840x2880@10" 133.43 3840 3872 4376 4408 2880 2950 2955 3025
|
56
|
+
Modeline "3840x2560@10" 116.93 3840 3872 4312 4344 2560 2622 2627 2689
|
57
|
+
Modeline "3840x2048@10" 91.45 3840 3872 4216 4248 2048 2097 2101 2151
|
58
|
+
Modeline "2048x2048@10" 49.47 2048 2080 2264 2296 2048 2097 2101 2151
|
59
|
+
Modeline "2560x1600@10" 47.12 2560 2592 2768 2800 1600 1639 1642 1681
|
60
|
+
Modeline "1920x1200@10" 26.28 1920 1952 2048 2080 1200 1229 1231 1261
|
61
|
+
Modeline "1920x1080@10" 23.53 1920 1952 2040 2072 1080 1106 1108 1135
|
62
|
+
Modeline "1680x1050@10" 20.08 1680 1712 1784 1816 1050 1075 1077 1103
|
63
|
+
Modeline "1600x900@20" 33.92 1600 1632 1760 1792 900 921 924 946
|
64
|
+
Modeline "1440x900@20" 30.66 1440 1472 1584 1616 900 921 924 946
|
65
|
+
Modeline "1360x768@20" 24.49 1360 1392 1480 1512 768 786 789 807
|
66
|
+
#common resolutions for android devices (both orientations):
|
67
|
+
Modeline "800x1280@20" 25.89 800 832 928 960 1280 1310 1315 1345
|
68
|
+
Modeline "1280x800@20" 24.15 1280 1312 1400 1432 800 819 822 841
|
69
|
+
Modeline "720x1280@25" 30.22 720 752 864 896 1280 1309 1315 1345
|
70
|
+
Modeline "1280x720@25" 27.41 1280 1312 1416 1448 720 737 740 757
|
71
|
+
Modeline "768x1024@25" 24.93 768 800 888 920 1024 1047 1052 1076
|
72
|
+
Modeline "1024x768@25" 23.77 1024 1056 1144 1176 768 785 789 807
|
73
|
+
Modeline "600x1024@25" 19.90 600 632 704 736 1024 1047 1052 1076
|
74
|
+
Modeline "1024x600@25" 18.26 1024 1056 1120 1152 600 614 617 631
|
75
|
+
Modeline "536x960@25" 16.74 536 568 624 656 960 982 986 1009
|
76
|
+
Modeline "960x536@25" 15.23 960 992 1048 1080 536 548 551 563
|
77
|
+
Modeline "600x800@25" 15.17 600 632 688 720 800 818 822 841
|
78
|
+
Modeline "800x600@25" 14.50 800 832 880 912 600 614 617 631
|
79
|
+
Modeline "480x854@25" 13.34 480 512 560 592 854 873 877 897
|
80
|
+
Modeline "848x480@25" 12.09 848 880 920 952 480 491 493 505
|
81
|
+
Modeline "480x800@25" 12.43 480 512 552 584 800 818 822 841
|
82
|
+
Modeline "800x480@25" 11.46 800 832 872 904 480 491 493 505
|
83
|
+
Modeline "320x480@50" 10.73 320 352 392 424 480 490 494 505
|
84
|
+
Modeline "480x320@50" 9.79 480 512 544 576 320 327 330 337
|
85
|
+
Modeline "240x400@50" 6.96 240 272 296 328 400 408 412 421
|
86
|
+
Modeline "400x240@50" 6.17 400 432 448 480 240 245 247 253
|
87
|
+
Modeline "240x320@50" 5.47 240 272 288 320 320 327 330 337
|
88
|
+
Modeline "320x240@50" 5.10 320 352 368 400 240 245 247 253
|
89
|
+
#resolutions for android devices (both orientations)
|
90
|
+
#minus the status bar
|
91
|
+
#38px status bar (and width rounded up)
|
92
|
+
Modeline "800x1242@20" 25.03 800 832 920 952 1242 1271 1275 1305
|
93
|
+
Modeline "1280x762@20" 22.93 1280 1312 1392 1424 762 780 783 801
|
94
|
+
Modeline "720x1242@25" 29.20 720 752 856 888 1242 1271 1276 1305
|
95
|
+
Modeline "1280x682@25" 25.85 1280 1312 1408 1440 682 698 701 717
|
96
|
+
Modeline "768x986@25" 23.90 768 800 888 920 986 1009 1013 1036
|
97
|
+
Modeline "1024x730@25" 22.50 1024 1056 1136 1168 730 747 750 767
|
98
|
+
Modeline "600x986@25" 19.07 600 632 704 736 986 1009 1013 1036
|
99
|
+
Modeline "1024x562@25" 17.03 1024 1056 1120 1152 562 575 578 591
|
100
|
+
Modeline "536x922@25" 16.01 536 568 624 656 922 943 947 969
|
101
|
+
Modeline "960x498@25" 14.09 960 992 1040 1072 498 509 511 523
|
102
|
+
Modeline "600x762@25" 14.39 600 632 680 712 762 779 783 801
|
103
|
+
Modeline "800x562@25" 13.52 800 832 880 912 562 575 578 591
|
104
|
+
Modeline "480x810@25" 12.59 480 512 552 584 810 828 832 851
|
105
|
+
Modeline "848x442@25" 11.09 848 880 920 952 442 452 454 465
|
106
|
+
Modeline "480x762@25" 11.79 480 512 552 584 762 779 783 801
|
107
|
+
Modeline "800x442@25" 10.51 800 832 864 896 442 452 454 465
|
108
|
+
#32px status bar (no need for rounding):
|
109
|
+
Modeline "320x448@50" 9.93 320 352 384 416 448 457 461 471
|
110
|
+
Modeline "480x288@50" 8.75 480 512 544 576 288 294 297 303
|
111
|
+
#24px status bar:
|
112
|
+
Modeline "240x376@50" 6.49 240 272 296 328 376 384 387 395
|
113
|
+
Modeline "400x216@50" 5.50 400 432 448 480 216 220 222 227
|
114
|
+
Modeline "240x296@50" 5.02 240 272 288 320 296 302 305 311
|
115
|
+
Modeline "320x216@50" 4.55 320 352 368 400 216 220 222 227
|
116
|
+
EndSection
|
117
|
+
|
118
|
+
##Xdummy:##
|
119
|
+
Section "Screen"
|
120
|
+
Identifier "Screen0"
|
121
|
+
Device "Videocard0"
|
122
|
+
Monitor "Monitor0"
|
123
|
+
DefaultDepth 24
|
124
|
+
SubSection "Display"
|
125
|
+
Viewport 0 0
|
126
|
+
Depth 24
|
127
|
+
Modes "32000x32000" "16384x8192" "8192x4096" "5120x3200" "3840x2880" "3840x2560" "3840x2048" "2048x2048" "2560x1600" "1920x1440" "1920x1200" "1920x1080" "1600x1200" "1680x1050" "1600x900" "1400x1050" "1440x900" "1280x1024" "1366x768" "1280x800" "1024x768" "1024x600" "800x600" "320x200"
|
128
|
+
#Virtual 32000 32000
|
129
|
+
#Virtual 16384 8192
|
130
|
+
#Virtual 8192 4096
|
131
|
+
Virtual 1920 1440
|
132
|
+
EndSubSection
|
133
|
+
EndSection
|
134
|
+
|
135
|
+
Section "ServerLayout"
|
136
|
+
Identifier "dummy_layout"
|
137
|
+
Screen "screen0"
|
138
|
+
InputDevice "NoMouse"
|
139
|
+
InputDevice "NoKeyboard"
|
140
|
+
EndSection
|
data/test/test_gl.rb
CHANGED
@@ -14,29 +14,25 @@
|
|
14
14
|
#
|
15
15
|
|
16
16
|
require 'opengl/test_case'
|
17
|
-
require 'gl'
|
18
|
-
require 'glut'
|
19
|
-
include Gl
|
20
|
-
include Glut
|
21
17
|
|
22
18
|
class TestGl < OpenGL::TestCase
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
19
|
+
def test_isavailable
|
20
|
+
assert_equal(true, is_available?(1.1))
|
21
|
+
assert_equal(true, is_available?("GL_ARB_multitexture"))
|
22
|
+
assert_equal(false, is_available?("GL_NON_EXISTENT"))
|
23
|
+
end
|
28
24
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
25
|
+
def test_errorchecking
|
26
|
+
Gl.disable_error_checking
|
27
|
+
assert_equal(false, Gl.is_error_checking_enabled?)
|
28
|
+
Gl.enable_error_checking
|
29
|
+
assert_equal(true, Gl.is_error_checking_enabled?)
|
30
|
+
begin
|
31
|
+
glEnable(0)
|
32
|
+
rescue Gl::Error => err
|
33
|
+
assert_equal(err.id, GL_INVALID_ENUM)
|
34
|
+
else
|
35
|
+
assert(false) # error not detected
|
36
|
+
end
|
37
|
+
end
|
42
38
|
end
|
data/test/test_gl_10_11.rb
CHANGED
@@ -25,60 +25,60 @@ class TestGl10_11 < OpenGL::TestCase
|
|
25
25
|
|
26
26
|
def test_glindex
|
27
27
|
glIndexd(2.0)
|
28
|
-
assert_in_delta(glGetDoublev(GL_CURRENT_INDEX),
|
28
|
+
assert_in_delta(2.0, glGetDoublev(GL_CURRENT_INDEX), 0.001)
|
29
29
|
glIndexdv([3.0])
|
30
|
-
assert_in_delta(glGetDoublev(GL_CURRENT_INDEX),
|
30
|
+
assert_in_delta(3.0, glGetDoublev(GL_CURRENT_INDEX), 0.001)
|
31
31
|
|
32
32
|
glIndexf(4.0)
|
33
|
-
assert_in_delta(glGetFloatv(GL_CURRENT_INDEX),
|
33
|
+
assert_in_delta(4.0, glGetFloatv(GL_CURRENT_INDEX), 0.001)
|
34
34
|
glIndexfv([5.0])
|
35
|
-
assert_in_delta(glGetFloatv(GL_CURRENT_INDEX),
|
35
|
+
assert_in_delta(5.0, glGetFloatv(GL_CURRENT_INDEX), 0.001)
|
36
36
|
|
37
37
|
glIndexi(6)
|
38
|
-
assert_in_delta(glGetIntegerv(GL_CURRENT_INDEX),
|
38
|
+
assert_in_delta(6, glGetIntegerv(GL_CURRENT_INDEX), 0.001)
|
39
39
|
glIndexiv([7])
|
40
|
-
assert_in_delta(glGetIntegerv(GL_CURRENT_INDEX),
|
40
|
+
assert_in_delta(7, glGetIntegerv(GL_CURRENT_INDEX), 0.001)
|
41
41
|
|
42
42
|
glIndexs(8)
|
43
|
-
assert_in_delta(glGetIntegerv(GL_CURRENT_INDEX),
|
43
|
+
assert_in_delta(8, glGetIntegerv(GL_CURRENT_INDEX), 0.001)
|
44
44
|
glIndexsv([9])
|
45
|
-
assert_in_delta(glGetIntegerv(GL_CURRENT_INDEX),
|
45
|
+
assert_in_delta(9, glGetIntegerv(GL_CURRENT_INDEX), 0.001)
|
46
46
|
|
47
47
|
glIndexub(10)
|
48
|
-
assert_in_delta(glGetIntegerv(GL_CURRENT_INDEX),
|
48
|
+
assert_in_delta(10, glGetIntegerv(GL_CURRENT_INDEX), 0.001)
|
49
49
|
glIndexubv([11])
|
50
|
-
assert_in_delta(glGetIntegerv(GL_CURRENT_INDEX),
|
50
|
+
assert_in_delta(11, glGetIntegerv(GL_CURRENT_INDEX), 0.001)
|
51
51
|
|
52
52
|
# index pointer
|
53
|
-
glIndexPointer(GL_INT,2,"")
|
54
|
-
assert_equal(glGetIntegerv(GL_INDEX_ARRAY_STRIDE)
|
55
|
-
assert_equal(glGetIntegerv(GL_INDEX_ARRAY_TYPE)
|
53
|
+
glIndexPointer(GL_INT, 2, "")
|
54
|
+
assert_equal(2, glGetIntegerv(GL_INDEX_ARRAY_STRIDE))
|
55
|
+
assert_equal(GL_INT, glGetIntegerv(GL_INDEX_ARRAY_TYPE))
|
56
56
|
end
|
57
57
|
|
58
58
|
def test_glclear
|
59
59
|
glClearColor(1,0,1,0)
|
60
|
-
assert_equal(
|
60
|
+
assert_equal([1,0,1,0], glGetDoublev(GL_COLOR_CLEAR_VALUE))
|
61
61
|
|
62
62
|
glClearIndex(2)
|
63
|
-
assert_equal(glGetDoublev(GL_INDEX_CLEAR_VALUE)
|
63
|
+
assert_equal(2, glGetDoublev(GL_INDEX_CLEAR_VALUE))
|
64
64
|
|
65
65
|
glClearAccum(0.5,0.5,0.5,0.5)
|
66
|
-
assert_equal(
|
66
|
+
assert_equal([0.5,0.5,0.5,0.5], glGetDoublev(GL_ACCUM_CLEAR_VALUE))
|
67
67
|
|
68
68
|
glClearStencil(1)
|
69
|
-
assert_equal(glGetIntegerv(GL_STENCIL_CLEAR_VALUE)
|
69
|
+
assert_equal(1, glGetIntegerv(GL_STENCIL_CLEAR_VALUE))
|
70
70
|
|
71
71
|
glClearDepth(0.5)
|
72
|
-
assert_equal(glGetDoublev(GL_DEPTH_CLEAR_VALUE)
|
72
|
+
assert_equal(0.5, glGetDoublev(GL_DEPTH_CLEAR_VALUE))
|
73
73
|
end
|
74
74
|
|
75
75
|
def test_glclientattrib
|
76
76
|
glPixelStorei(GL_PACK_ALIGNMENT,2)
|
77
77
|
glPushClientAttrib(GL_CLIENT_PIXEL_STORE_BIT)
|
78
78
|
glPixelStorei(GL_PACK_ALIGNMENT,4)
|
79
|
-
assert_equal(glGetIntegerv(GL_PACK_ALIGNMENT)
|
79
|
+
assert_equal(4, glGetIntegerv(GL_PACK_ALIGNMENT))
|
80
80
|
glPopClientAttrib()
|
81
|
-
assert_equal(glGetIntegerv(GL_PACK_ALIGNMENT)
|
81
|
+
assert_equal(2, glGetIntegerv(GL_PACK_ALIGNMENT))
|
82
82
|
end
|
83
83
|
|
84
84
|
def test_matrix
|
@@ -97,21 +97,21 @@ class TestGl10_11 < OpenGL::TestCase
|
|
97
97
|
[0.0,0.0,1.0,0.0],
|
98
98
|
[0.0,0.0,0.0,1.0]]
|
99
99
|
|
100
|
-
# 1
|
100
|
+
# 1
|
101
101
|
glMatrixMode(GL_MODELVIEW)
|
102
102
|
glLoadMatrixf(m_a)
|
103
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
103
|
+
assert_equal(m_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
104
104
|
glLoadMatrixd(m_b)
|
105
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
105
|
+
assert_equal(m_b, glGetDoublev(GL_MODELVIEW_MATRIX))
|
106
106
|
|
107
107
|
glLoadIdentity()
|
108
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
108
|
+
assert_equal( m_ident, glGetDoublev(GL_MODELVIEW_MATRIX))
|
109
109
|
|
110
110
|
glMultMatrixf(m_a)
|
111
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
111
|
+
assert_equal(m_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
112
112
|
glLoadIdentity()
|
113
113
|
glMultMatrixd(m_b)
|
114
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
114
|
+
assert_equal(m_b, glGetDoublev(GL_MODELVIEW_MATRIX))
|
115
115
|
|
116
116
|
# 2
|
117
117
|
glMatrixMode(GL_MODELVIEW)
|
@@ -119,31 +119,31 @@ class TestGl10_11 < OpenGL::TestCase
|
|
119
119
|
glMatrixMode(GL_PROJECTION)
|
120
120
|
glLoadMatrixf(m_b)
|
121
121
|
|
122
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
123
|
-
assert_equal(glGetDoublev(GL_PROJECTION_MATRIX)
|
122
|
+
assert_equal(m_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
123
|
+
assert_equal(m_b, glGetDoublev(GL_PROJECTION_MATRIX))
|
124
124
|
|
125
125
|
glMatrixMode(GL_MODELVIEW)
|
126
126
|
glLoadMatrixf(m_a)
|
127
127
|
glPushMatrix()
|
128
128
|
glLoadMatrixf(m_b)
|
129
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
129
|
+
assert_equal(m_b, glGetDoublev(GL_MODELVIEW_MATRIX))
|
130
130
|
glPopMatrix()
|
131
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
131
|
+
assert_equal(m_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
132
132
|
|
133
133
|
# 3
|
134
134
|
m = Matrix.rows([[1,2,3,4],[5,6,7,8],[9,10,11,12],[13,14,15,16]])
|
135
135
|
glMatrixMode(GL_MODELVIEW)
|
136
136
|
glLoadMatrixf(m)
|
137
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
137
|
+
assert_equal(m.to_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
138
138
|
glLoadIdentity()
|
139
139
|
glLoadMatrixd(m)
|
140
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
140
|
+
assert_equal(m.to_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
141
141
|
glLoadIdentity()
|
142
142
|
glMultMatrixf(m)
|
143
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
143
|
+
assert_equal(m.to_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
144
144
|
glLoadIdentity()
|
145
145
|
glMultMatrixd(m)
|
146
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
146
|
+
assert_equal(m.to_a, glGetDoublev(GL_MODELVIEW_MATRIX))
|
147
147
|
|
148
148
|
assert_raises ArgumentError do glLoadMatrixf([1,2,3,4]) end
|
149
149
|
assert_raises ArgumentError do glLoadMatrixd([1,2,3,4]) end
|
@@ -153,63 +153,63 @@ class TestGl10_11 < OpenGL::TestCase
|
|
153
153
|
|
154
154
|
def test_gledge
|
155
155
|
glEdgeFlag(GL_FALSE)
|
156
|
-
assert_equal(glGetBooleanv(GL_EDGE_FLAG)
|
156
|
+
assert_equal(false, glGetBooleanv(GL_EDGE_FLAG))
|
157
157
|
|
158
158
|
glEdgeFlag(GL_TRUE)
|
159
|
-
assert_equal(glGetBooleanv(GL_EDGE_FLAG)
|
159
|
+
assert_equal(true, glGetBooleanv(GL_EDGE_FLAG))
|
160
160
|
|
161
161
|
glEdgeFlagv([GL_FALSE])
|
162
|
-
assert_equal(glGetBooleanv(GL_EDGE_FLAG)
|
162
|
+
assert_equal(false, glGetBooleanv(GL_EDGE_FLAG))
|
163
163
|
end
|
164
164
|
|
165
165
|
def test_clientstate
|
166
166
|
glEnableClientState(GL_COLOR_ARRAY)
|
167
|
-
assert_equal(glIsEnabled(GL_COLOR_ARRAY)
|
167
|
+
assert_equal(true, glIsEnabled(GL_COLOR_ARRAY))
|
168
168
|
glDisableClientState(GL_COLOR_ARRAY)
|
169
|
-
assert_equal(glIsEnabled(GL_COLOR_ARRAY)
|
169
|
+
assert_equal(false, glIsEnabled(GL_COLOR_ARRAY))
|
170
170
|
end
|
171
171
|
|
172
172
|
def test_glshademodel
|
173
173
|
glShadeModel(GL_FLAT)
|
174
|
-
assert_equal(glGetIntegerv(GL_SHADE_MODEL)
|
174
|
+
assert_equal(GL_FLAT, glGetIntegerv(GL_SHADE_MODEL))
|
175
175
|
glShadeModel(GL_SMOOTH)
|
176
|
-
assert_equal(glGetIntegerv(GL_SHADE_MODEL)
|
176
|
+
assert_equal(GL_SMOOTH, glGetIntegerv(GL_SHADE_MODEL))
|
177
177
|
end
|
178
178
|
|
179
179
|
def test_glclipplane
|
180
180
|
glClipPlane(GL_CLIP_PLANE0,[1,2,3,4])
|
181
|
-
assert_equal(
|
181
|
+
assert_equal([1,2,3,4], glGetClipPlane(GL_CLIP_PLANE0))
|
182
182
|
end
|
183
183
|
|
184
184
|
def test_polygonoffset
|
185
185
|
glPolygonOffset(2.0,3.0)
|
186
|
-
assert_equal(glGetDoublev(GL_POLYGON_OFFSET_FACTOR)
|
187
|
-
assert_equal(glGetDoublev(GL_POLYGON_OFFSET_UNITS)
|
186
|
+
assert_equal(2.0, glGetDoublev(GL_POLYGON_OFFSET_FACTOR))
|
187
|
+
assert_equal(3.0, glGetDoublev(GL_POLYGON_OFFSET_UNITS))
|
188
188
|
end
|
189
189
|
|
190
190
|
def test_glviewport
|
191
191
|
glViewport(1,2,3,4)
|
192
|
-
assert_equal(
|
192
|
+
assert_equal([1,2,3,4], glGetIntegerv(GL_VIEWPORT))
|
193
193
|
end
|
194
194
|
|
195
195
|
def test_mask
|
196
196
|
glStencilMask(2)
|
197
|
-
assert_equal(glGetIntegerv(GL_STENCIL_WRITEMASK)
|
197
|
+
assert_equal( 2, glGetIntegerv(GL_STENCIL_WRITEMASK))
|
198
198
|
glStencilMask(1)
|
199
|
-
assert_equal(glGetIntegerv(GL_STENCIL_BACK_WRITEMASK)
|
199
|
+
assert_equal( 1, glGetIntegerv(GL_STENCIL_BACK_WRITEMASK))
|
200
200
|
|
201
201
|
glColorMask(GL_TRUE,GL_FALSE,GL_TRUE,GL_FALSE)
|
202
|
-
assert_equal(
|
202
|
+
assert_equal([true,false,true,false], glGetBooleanv(GL_COLOR_WRITEMASK))
|
203
203
|
|
204
204
|
glDepthMask(GL_TRUE)
|
205
|
-
assert_equal(glGetBooleanv(GL_DEPTH_WRITEMASK)
|
205
|
+
assert_equal(true, glGetBooleanv(GL_DEPTH_WRITEMASK))
|
206
206
|
glDepthMask(GL_FALSE)
|
207
|
-
assert_equal(glGetBooleanv(GL_DEPTH_WRITEMASK)
|
207
|
+
assert_equal(false, glGetBooleanv(GL_DEPTH_WRITEMASK))
|
208
208
|
|
209
209
|
glIndexMask(2)
|
210
|
-
assert_equal(glGetIntegerv(GL_INDEX_WRITEMASK)
|
210
|
+
assert_equal(2, glGetIntegerv(GL_INDEX_WRITEMASK))
|
211
211
|
glIndexMask(1)
|
212
|
-
assert_equal(glGetIntegerv(GL_INDEX_WRITEMASK)
|
212
|
+
assert_equal(1, glGetIntegerv(GL_INDEX_WRITEMASK))
|
213
213
|
end
|
214
214
|
|
215
215
|
def test_glflush
|
@@ -219,7 +219,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
219
219
|
glEnd
|
220
220
|
rescue Gl::Error => err
|
221
221
|
assert(err.id == GL_INVALID_OPERATION)
|
222
|
-
end
|
222
|
+
end
|
223
223
|
end
|
224
224
|
|
225
225
|
def test_glfinish
|
@@ -229,7 +229,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
229
229
|
glEnd
|
230
230
|
rescue Gl::Error => err
|
231
231
|
assert(err.id == GL_INVALID_OPERATION)
|
232
|
-
end
|
232
|
+
end
|
233
233
|
end
|
234
234
|
|
235
235
|
def test_glgetstring
|
@@ -238,26 +238,26 @@ class TestGl10_11 < OpenGL::TestCase
|
|
238
238
|
|
239
239
|
def test_glscissor
|
240
240
|
glScissor(1,2,3,4)
|
241
|
-
assert_equal(
|
241
|
+
assert_equal([1,2,3,4], glGetIntegerv(GL_SCISSOR_BOX))
|
242
242
|
end
|
243
243
|
|
244
244
|
def test_glstencilfunc
|
245
245
|
glStencilFunc(GL_LEQUAL,2,3)
|
246
|
-
assert_equal(glGetIntegerv(GL_STENCIL_FUNC)
|
247
|
-
assert_equal(glGetIntegerv(GL_STENCIL_REF)
|
248
|
-
assert_equal(glGetIntegerv(GL_STENCIL_VALUE_MASK)
|
246
|
+
assert_equal(GL_LEQUAL, glGetIntegerv(GL_STENCIL_FUNC))
|
247
|
+
assert_equal(2, glGetIntegerv(GL_STENCIL_REF))
|
248
|
+
assert_equal(3, glGetIntegerv(GL_STENCIL_VALUE_MASK))
|
249
249
|
end
|
250
250
|
|
251
251
|
def test_glstencilop
|
252
252
|
glStencilOp(GL_ZERO,GL_REPLACE,GL_INCR)
|
253
|
-
assert_equal(glGetIntegerv(GL_STENCIL_FAIL)
|
254
|
-
assert_equal(glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL)
|
255
|
-
assert_equal(glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS)
|
253
|
+
assert_equal(GL_ZERO, glGetIntegerv(GL_STENCIL_FAIL))
|
254
|
+
assert_equal(GL_REPLACE, glGetIntegerv(GL_STENCIL_PASS_DEPTH_FAIL))
|
255
|
+
assert_equal(GL_INCR, glGetIntegerv(GL_STENCIL_PASS_DEPTH_PASS))
|
256
256
|
end
|
257
257
|
|
258
258
|
def test_gllogicop
|
259
259
|
glLogicOp(GL_NAND)
|
260
|
-
assert_equal(glGetIntegerv(GL_LOGIC_OP_MODE)
|
260
|
+
assert_equal(GL_NAND, glGetIntegerv(GL_LOGIC_OP_MODE))
|
261
261
|
end
|
262
262
|
|
263
263
|
def test_glfrustum
|
@@ -265,68 +265,68 @@ class TestGl10_11 < OpenGL::TestCase
|
|
265
265
|
glLoadIdentity()
|
266
266
|
|
267
267
|
glFrustum(1,2,3,4,5,6)
|
268
|
-
assert_equal(
|
268
|
+
assert_equal([[10.0, 0.0, 0.0, 0.0], [0.0, 10.0, 0.0, 0.0], [3.0, 7.0, -11.0, -1.0], [0.0, 0.0, -60.0, 0.0]], glGetDoublev(GL_PROJECTION_MATRIX))
|
269
269
|
end
|
270
270
|
|
271
271
|
def test_gldepthrange
|
272
272
|
glDepthRange(0.5,0.5)
|
273
|
-
assert_equal(
|
273
|
+
assert_equal([0.5,0.5], glGetDoublev(GL_DEPTH_RANGE))
|
274
274
|
end
|
275
275
|
|
276
276
|
def test_func
|
277
|
-
glAlphaFunc(GL_GREATER,0.5)
|
278
|
-
assert_equal(glGetIntegerv(GL_ALPHA_TEST_FUNC)
|
279
|
-
assert_equal(glGetDoublev(GL_ALPHA_TEST_REF)
|
277
|
+
glAlphaFunc(GL_GREATER, 0.5)
|
278
|
+
assert_equal(GL_GREATER, glGetIntegerv(GL_ALPHA_TEST_FUNC))
|
279
|
+
assert_equal(0.5, glGetDoublev(GL_ALPHA_TEST_REF))
|
280
280
|
|
281
281
|
glBlendFunc(GL_CONSTANT_ALPHA, GL_ONE_MINUS_DST_COLOR)
|
282
|
-
assert_equal(glGetIntegerv(GL_BLEND_SRC)
|
283
|
-
assert_equal(glGetIntegerv(GL_BLEND_DST)
|
282
|
+
assert_equal(GL_CONSTANT_ALPHA, glGetIntegerv(GL_BLEND_SRC))
|
283
|
+
assert_equal(GL_ONE_MINUS_DST_COLOR, glGetIntegerv(GL_BLEND_DST))
|
284
284
|
|
285
285
|
glDepthFunc(GL_LEQUAL)
|
286
|
-
assert_equal(glGetIntegerv(GL_DEPTH_FUNC)
|
286
|
+
assert_equal(GL_LEQUAL, glGetIntegerv(GL_DEPTH_FUNC))
|
287
287
|
end
|
288
288
|
|
289
289
|
def test_glpixelzoom
|
290
290
|
glPixelZoom(0.5,0.5)
|
291
|
-
assert_equal(glGetDoublev(GL_ZOOM_X)
|
292
|
-
assert_equal(glGetDoublev(GL_ZOOM_Y)
|
291
|
+
assert_equal(0.5, glGetDoublev(GL_ZOOM_X))
|
292
|
+
assert_equal(0.5, glGetDoublev(GL_ZOOM_Y))
|
293
293
|
end
|
294
294
|
|
295
295
|
def test_glpixelstore
|
296
296
|
glPixelStoref(GL_PACK_IMAGE_HEIGHT,5)
|
297
|
-
assert_equal(glGetIntegerv(GL_PACK_IMAGE_HEIGHT)
|
297
|
+
assert_equal(5, glGetIntegerv(GL_PACK_IMAGE_HEIGHT))
|
298
298
|
glPixelStorei(GL_PACK_IMAGE_HEIGHT,6)
|
299
|
-
assert_equal(glGetIntegerv(GL_PACK_IMAGE_HEIGHT)
|
299
|
+
assert_equal(6, glGetIntegerv(GL_PACK_IMAGE_HEIGHT))
|
300
300
|
end
|
301
301
|
|
302
302
|
def test_glpixeltransfer
|
303
303
|
glPixelTransferf(GL_RED_SCALE,2)
|
304
|
-
assert_equal(glGetIntegerv(GL_RED_SCALE)
|
304
|
+
assert_equal(2, glGetIntegerv(GL_RED_SCALE))
|
305
305
|
glPixelTransferi(GL_RED_SCALE,3)
|
306
|
-
assert_equal(glGetIntegerv(GL_RED_SCALE)
|
306
|
+
assert_equal(3, glGetIntegerv(GL_RED_SCALE))
|
307
307
|
end
|
308
308
|
|
309
309
|
def test_pixelmap
|
310
310
|
glPixelMapfv(GL_PIXEL_MAP_I_TO_I,[1,2,3,4])
|
311
|
-
assert_equal(
|
311
|
+
assert_equal([1,2,3,4], glGetPixelMapfv(GL_PIXEL_MAP_I_TO_I))
|
312
312
|
|
313
313
|
glPixelMapuiv(GL_PIXEL_MAP_I_TO_I,[5,6,7,8])
|
314
|
-
assert_equal(
|
314
|
+
assert_equal([5,6,7,8], glGetPixelMapuiv(GL_PIXEL_MAP_I_TO_I))
|
315
315
|
|
316
316
|
glPixelMapusv(GL_PIXEL_MAP_I_TO_I,[9,10,11,12])
|
317
|
-
assert_equal(
|
317
|
+
assert_equal([9,10,11,12], glGetPixelMapusv(GL_PIXEL_MAP_I_TO_I))
|
318
318
|
end
|
319
319
|
|
320
320
|
def test_buffers
|
321
321
|
glDrawBuffer(GL_FRONT)
|
322
|
-
assert_equal(glGetIntegerv(GL_DRAW_BUFFER)
|
322
|
+
assert_equal(GL_FRONT, glGetIntegerv(GL_DRAW_BUFFER))
|
323
323
|
glDrawBuffer(GL_BACK)
|
324
|
-
assert_equal(glGetIntegerv(GL_DRAW_BUFFER)
|
324
|
+
assert_equal(GL_BACK, glGetIntegerv(GL_DRAW_BUFFER))
|
325
325
|
|
326
326
|
glReadBuffer(GL_FRONT)
|
327
|
-
assert_equal(glGetIntegerv(GL_READ_BUFFER)
|
327
|
+
assert_equal(GL_FRONT, glGetIntegerv(GL_READ_BUFFER))
|
328
328
|
glReadBuffer(GL_BACK)
|
329
|
-
assert_equal(glGetIntegerv(GL_READ_BUFFER)
|
329
|
+
assert_equal(GL_BACK, glGetIntegerv(GL_READ_BUFFER))
|
330
330
|
end
|
331
331
|
|
332
332
|
def test__selection_buffer
|
@@ -350,8 +350,8 @@ class TestGl10_11 < OpenGL::TestCase
|
|
350
350
|
data = buf.unpack("i*")
|
351
351
|
assert(count==1) # number of records
|
352
352
|
assert(data[0]==1) # number of hits in this record
|
353
|
-
#
|
354
|
-
#
|
353
|
+
# assert(data[1]>0) # zbuffer near
|
354
|
+
# assert(data[2]>0) # zbuffer far
|
355
355
|
assert(data[3]==6) # name of hit
|
356
356
|
end
|
357
357
|
|
@@ -370,12 +370,12 @@ class TestGl10_11 < OpenGL::TestCase
|
|
370
370
|
|
371
371
|
count = glRenderMode(GL_RENDER)
|
372
372
|
data = buf.unpack("f*")
|
373
|
-
assert_equal(count
|
374
|
-
assert_equal(data[0]
|
375
|
-
assert_equal(data[1]
|
373
|
+
assert_equal(10, count) # (1 + 1 + 3x2) + (1 + 1)
|
374
|
+
assert_equal(GL_POLYGON_TOKEN, data[0])
|
375
|
+
assert_equal(3, data[1]) # 3 vertices
|
376
376
|
# skip rasterized vertex data
|
377
|
-
assert_equal(data[8]
|
378
|
-
assert_equal(data[9]
|
377
|
+
assert_equal(GL_PASS_THROUGH_TOKEN, data[8])
|
378
|
+
assert_equal(2.0, data[9])
|
379
379
|
end
|
380
380
|
|
381
381
|
def test_glrasterposv
|
@@ -390,69 +390,69 @@ class TestGl10_11 < OpenGL::TestCase
|
|
390
390
|
glOrtho 0, WINDOW_SIZE, 0, WINDOW_SIZE, 0, -1
|
391
391
|
|
392
392
|
glRasterPos2d(1.0,2.0)
|
393
|
-
assert_equal(
|
393
|
+
assert_equal([1.0,2.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
394
394
|
glRasterPos2dv([3.0,4.0])
|
395
|
-
assert_equal(
|
395
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
396
396
|
|
397
397
|
glRasterPos2f(1.0,2.0)
|
398
|
-
assert_equal(
|
398
|
+
assert_equal([1.0,2.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
399
399
|
glRasterPos2fv([3.0,4.0])
|
400
|
-
assert_equal(
|
400
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
401
401
|
|
402
402
|
glRasterPos2i(1,2)
|
403
|
-
assert_equal(
|
403
|
+
assert_equal([1.0,2.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
404
404
|
glRasterPos2iv([3,4])
|
405
|
-
assert_equal(
|
405
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
406
406
|
|
407
407
|
glRasterPos2s(1,2)
|
408
|
-
assert_equal(
|
408
|
+
assert_equal([1.0,2.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
409
409
|
glRasterPos2sv([3,4])
|
410
|
-
assert_equal(
|
410
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
411
411
|
end
|
412
412
|
|
413
413
|
def test_glrasterpos_3
|
414
414
|
glOrtho 0, WINDOW_SIZE, 0, WINDOW_SIZE, 0, -1
|
415
415
|
|
416
416
|
glRasterPos3d(1.0,2.0,1.0)
|
417
|
-
assert_equal(
|
417
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
418
418
|
glRasterPos3dv([3.0,4.0,0.0])
|
419
|
-
assert_equal(
|
419
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
420
420
|
|
421
421
|
glRasterPos3f(1.0,2.0,1.0)
|
422
|
-
assert_equal(
|
422
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
423
423
|
glRasterPos3fv([3.0,4.0,0.0])
|
424
|
-
assert_equal(
|
424
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
425
425
|
|
426
426
|
glRasterPos3i(1,2,1)
|
427
|
-
assert_equal(
|
427
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
428
428
|
glRasterPos3iv([3,4,0])
|
429
|
-
assert_equal(
|
429
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
430
430
|
|
431
431
|
glRasterPos3s(1,2,1)
|
432
|
-
assert_equal(
|
432
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
433
433
|
glRasterPos3sv([3,4,0])
|
434
|
-
assert_equal(
|
434
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
435
435
|
|
436
436
|
# 4
|
437
437
|
glRasterPos4d(1.0,2.0,1.0,1.0)
|
438
|
-
assert_equal(
|
438
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
439
439
|
glRasterPos4dv([3.0,4.0,0.0,1.0])
|
440
|
-
assert_equal(
|
440
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
441
441
|
|
442
442
|
glRasterPos4f(1.0,2.0,1.0,1.0)
|
443
|
-
assert_equal(
|
443
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
444
444
|
glRasterPos4fv([3.0,4.0,0.0,1.0])
|
445
|
-
assert_equal(
|
445
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
446
446
|
|
447
447
|
glRasterPos4i(1,2,1,1)
|
448
|
-
assert_equal(
|
448
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
449
449
|
glRasterPos4iv([3,4,0,1])
|
450
|
-
assert_equal(
|
450
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
451
451
|
|
452
452
|
glRasterPos4s(1,2,1,1)
|
453
|
-
assert_equal(
|
453
|
+
assert_equal([1.0,2.0,1.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
454
454
|
glRasterPos4sv([3,4,0,1])
|
455
|
-
assert_equal(
|
455
|
+
assert_equal([3.0,4.0,0.0,1.0], glGetDoublev(GL_CURRENT_RASTER_POSITION))
|
456
456
|
end
|
457
457
|
|
458
458
|
def test_glbitmap
|
@@ -465,7 +465,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
465
465
|
|
466
466
|
glBitmap(8,8,0,0,0,0,bitmap.pack("c*"))
|
467
467
|
data = glReadPixels(0,0,8,8,GL_RED,GL_UNSIGNED_BYTE)
|
468
|
-
assert_equal(
|
468
|
+
assert_equal([0,255] * 32, data.unpack("C*"))
|
469
469
|
end
|
470
470
|
|
471
471
|
def test_glfog
|
@@ -478,7 +478,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
478
478
|
glFogi(GL_FOG_MODE,GL_EXP)
|
479
479
|
assert_equal(glGetIntegerv(GL_FOG_MODE),GL_EXP)
|
480
480
|
glFogiv(GL_FOG_MODE,[GL_EXP2])
|
481
|
-
assert_equal(glGetIntegerv(GL_FOG_MODE)
|
481
|
+
assert_equal(GL_EXP2, glGetIntegerv(GL_FOG_MODE))
|
482
482
|
end
|
483
483
|
|
484
484
|
def test_glcolorv
|
@@ -593,7 +593,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
593
593
|
glMatrixMode(GL_PROJECTION)
|
594
594
|
glLoadIdentity()
|
595
595
|
glOrtho(0,WINDOW_SIZE,0,WINDOW_SIZE,0,-1)
|
596
|
-
assert_equal(glGetDoublev(GL_PROJECTION_MATRIX)
|
596
|
+
assert_equal(res, glGetDoublev(GL_PROJECTION_MATRIX))
|
597
597
|
end
|
598
598
|
|
599
599
|
def test_glnormal
|
@@ -610,10 +610,10 @@ class TestGl10_11 < OpenGL::TestCase
|
|
610
610
|
assert_equal([4.0, 5.0, 6.0], glGetDoublev(GL_CURRENT_NORMAL))
|
611
611
|
|
612
612
|
glNormal3i(1, 2, 3)
|
613
|
-
assert_equal([
|
613
|
+
assert_equal([1, 2, 3], glGetIntegerv(GL_CURRENT_NORMAL))
|
614
614
|
|
615
615
|
glNormal3iv([4, 5, 6])
|
616
|
-
assert_equal([
|
616
|
+
assert_equal([4, 5, 6], glGetIntegerv(GL_CURRENT_NORMAL))
|
617
617
|
|
618
618
|
glNormal3b(2**7-1, 0, 2**7-1)
|
619
619
|
assert_each_in_delta([1.0, 0.0, 1.0], glGetDoublev(GL_CURRENT_NORMAL))
|
@@ -630,13 +630,13 @@ class TestGl10_11 < OpenGL::TestCase
|
|
630
630
|
|
631
631
|
def test_gllight
|
632
632
|
glLightf(GL_LIGHT0,GL_SPOT_CUTOFF,80.0)
|
633
|
-
assert_equal(glGetLightfv(GL_LIGHT0,GL_SPOT_CUTOFF)
|
633
|
+
assert_equal(80.0, glGetLightfv(GL_LIGHT0,GL_SPOT_CUTOFF))
|
634
634
|
glLighti(GL_LIGHT0,GL_SPOT_CUTOFF,75)
|
635
|
-
assert_equal(glGetLightiv(GL_LIGHT0,GL_SPOT_CUTOFF)
|
635
|
+
assert_equal(75, glGetLightiv(GL_LIGHT0,GL_SPOT_CUTOFF))
|
636
636
|
glLightfv(GL_LIGHT0,GL_AMBIENT,[0.5,0.5,0.5,1.0])
|
637
|
-
assert_equal(
|
637
|
+
assert_equal([0.5,0.5,0.5,1.0], glGetLightfv(GL_LIGHT0,GL_AMBIENT))
|
638
638
|
glLightiv(GL_LIGHT0,GL_CONSTANT_ATTENUATION,[32])
|
639
|
-
assert_equal(glGetLightiv(GL_LIGHT0,GL_CONSTANT_ATTENUATION)
|
639
|
+
assert_equal(32, glGetLightiv(GL_LIGHT0,GL_CONSTANT_ATTENUATION))
|
640
640
|
end
|
641
641
|
|
642
642
|
def test_glmaterial
|
@@ -644,24 +644,24 @@ class TestGl10_11 < OpenGL::TestCase
|
|
644
644
|
assert_equal([0.0,1.0,0.0,1.0], glGetMaterialfv(GL_FRONT,GL_AMBIENT))
|
645
645
|
|
646
646
|
glMaterialiv(GL_FRONT,GL_SHININESS,[50])
|
647
|
-
assert_equal(glGetMaterialiv(GL_FRONT,GL_SHININESS)
|
647
|
+
assert_equal(50, glGetMaterialiv(GL_FRONT,GL_SHININESS))
|
648
648
|
|
649
649
|
glMaterialf(GL_FRONT,GL_SHININESS,49.0)
|
650
|
-
assert_equal(glGetMaterialfv(GL_FRONT,GL_SHININESS)
|
650
|
+
assert_equal(49.0, glGetMaterialfv(GL_FRONT,GL_SHININESS))
|
651
651
|
|
652
652
|
glMateriali(GL_FRONT,GL_SHININESS,48)
|
653
|
-
assert_equal(glGetMaterialiv(GL_FRONT,GL_SHININESS)
|
653
|
+
assert_equal(48, glGetMaterialiv(GL_FRONT,GL_SHININESS))
|
654
654
|
|
655
655
|
end
|
656
656
|
|
657
657
|
def test_glcolormaterial
|
658
658
|
glColorMaterial(GL_FRONT,GL_EMISSION)
|
659
|
-
assert_equal(glGetIntegerv(GL_COLOR_MATERIAL_FACE)
|
660
|
-
assert_equal(glGetIntegerv(GL_COLOR_MATERIAL_PARAMETER)
|
659
|
+
assert_equal(GL_FRONT, glGetIntegerv(GL_COLOR_MATERIAL_FACE))
|
660
|
+
assert_equal(GL_EMISSION, glGetIntegerv(GL_COLOR_MATERIAL_PARAMETER))
|
661
661
|
|
662
662
|
glColorMaterial(GL_BACK,GL_SPECULAR)
|
663
|
-
assert_equal(glGetIntegerv(GL_COLOR_MATERIAL_FACE)
|
664
|
-
assert_equal(glGetIntegerv(GL_COLOR_MATERIAL_PARAMETER)
|
663
|
+
assert_equal(GL_BACK, glGetIntegerv(GL_COLOR_MATERIAL_FACE))
|
664
|
+
assert_equal(GL_SPECULAR, glGetIntegerv(GL_COLOR_MATERIAL_PARAMETER))
|
665
665
|
end
|
666
666
|
|
667
667
|
def test_gllightmodel
|
@@ -675,7 +675,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
675
675
|
assert_equal([0.5, 0.5, 0.5, 1.0], glGetDoublev(GL_LIGHT_MODEL_AMBIENT))
|
676
676
|
|
677
677
|
glLightModeliv(GL_LIGHT_MODEL_AMBIENT, [2, 0, 2, 0])
|
678
|
-
assert_equal([
|
678
|
+
assert_equal([2, 0, 2, 0], glGetIntegerv(GL_LIGHT_MODEL_AMBIENT))
|
679
679
|
end
|
680
680
|
|
681
681
|
def test_gltexcoordv
|
@@ -762,80 +762,80 @@ class TestGl10_11 < OpenGL::TestCase
|
|
762
762
|
|
763
763
|
def test_glenable_disable
|
764
764
|
glEnable(GL_FOG)
|
765
|
-
assert_equal(glIsEnabled(GL_FOG)
|
765
|
+
assert_equal(true, glIsEnabled(GL_FOG))
|
766
766
|
glDisable(GL_FOG)
|
767
|
-
assert_equal(glIsEnabled(GL_FOG)
|
767
|
+
assert_equal(false, glIsEnabled(GL_FOG))
|
768
768
|
end
|
769
769
|
|
770
770
|
def test_gltexparameter
|
771
771
|
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_CLAMP)
|
772
|
-
assert_equal(glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S)
|
772
|
+
assert_equal(GL_CLAMP, glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S))
|
773
773
|
|
774
774
|
glTexParameterf(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,GL_MIRRORED_REPEAT)
|
775
|
-
assert_equal(glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S)
|
775
|
+
assert_equal(GL_MIRRORED_REPEAT, glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S))
|
776
776
|
|
777
777
|
glTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,[GL_CLAMP])
|
778
|
-
assert_equal(glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S)
|
778
|
+
assert_equal(GL_CLAMP, glGetTexParameteriv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S))
|
779
779
|
|
780
780
|
glTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S,[GL_MIRRORED_REPEAT])
|
781
|
-
assert_equal(glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S)
|
781
|
+
assert_equal(GL_MIRRORED_REPEAT, glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_WRAP_S))
|
782
782
|
|
783
|
-
assert_equal(glGetTexLevelParameterfv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH)
|
784
|
-
assert_equal(glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH)
|
783
|
+
assert_equal(0.0, glGetTexLevelParameterfv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH))
|
784
|
+
assert_equal(0, glGetTexLevelParameteriv(GL_TEXTURE_2D,0,GL_TEXTURE_WIDTH))
|
785
785
|
end
|
786
786
|
|
787
787
|
def test_glcullface
|
788
788
|
glCullFace(GL_FRONT)
|
789
|
-
assert_equal(glGetIntegerv(GL_CULL_FACE_MODE)
|
789
|
+
assert_equal(GL_FRONT, glGetIntegerv(GL_CULL_FACE_MODE))
|
790
790
|
glCullFace(GL_BACK)
|
791
|
-
assert_equal(glGetIntegerv(GL_CULL_FACE_MODE)
|
791
|
+
assert_equal(GL_BACK, glGetIntegerv(GL_CULL_FACE_MODE))
|
792
792
|
end
|
793
793
|
|
794
794
|
def test_glfrontface
|
795
795
|
glFrontFace(GL_CW)
|
796
|
-
assert_equal(glGetIntegerv(GL_FRONT_FACE)
|
796
|
+
assert_equal(GL_CW, glGetIntegerv(GL_FRONT_FACE))
|
797
797
|
glFrontFace(GL_CCW)
|
798
|
-
assert_equal(glGetIntegerv(GL_FRONT_FACE)
|
798
|
+
assert_equal(GL_CCW, glGetIntegerv(GL_FRONT_FACE))
|
799
799
|
end
|
800
800
|
|
801
801
|
def test_glpointsize
|
802
802
|
glPointSize(2.0)
|
803
|
-
assert_equal(glGetDoublev(GL_POINT_SIZE)
|
803
|
+
assert_equal(2.0, glGetDoublev(GL_POINT_SIZE))
|
804
804
|
glPointSize(3.0)
|
805
|
-
assert_equal(glGetDoublev(GL_POINT_SIZE)
|
805
|
+
assert_equal(3.0, glGetDoublev(GL_POINT_SIZE))
|
806
806
|
end
|
807
807
|
|
808
808
|
def test_glpolygonmode
|
809
809
|
glPolygonMode(GL_FRONT_AND_BACK,GL_LINE)
|
810
|
-
assert_equal(
|
810
|
+
assert_equal([GL_LINE,GL_LINE], glGetIntegerv(GL_POLYGON_MODE))
|
811
811
|
glPolygonMode(GL_FRONT_AND_BACK,GL_FILL)
|
812
|
-
assert_equal(
|
812
|
+
assert_equal([GL_FILL,GL_FILL], glGetIntegerv(GL_POLYGON_MODE))
|
813
813
|
end
|
814
814
|
|
815
815
|
def test_gllinewidth
|
816
816
|
glLineWidth(2.0)
|
817
|
-
assert_equal(glGetDoublev(GL_LINE_WIDTH)
|
817
|
+
assert_equal(2.0, glGetDoublev(GL_LINE_WIDTH))
|
818
818
|
glLineWidth(3.0)
|
819
|
-
assert_equal(glGetDoublev(GL_LINE_WIDTH)
|
819
|
+
assert_equal(3.0, glGetDoublev(GL_LINE_WIDTH))
|
820
820
|
end
|
821
821
|
|
822
822
|
def test_gllinestipple
|
823
823
|
glLineStipple(3,0x1234)
|
824
|
-
assert_equal(glGetIntegerv(GL_LINE_STIPPLE_REPEAT)
|
825
|
-
assert_equal(glGetIntegerv(GL_LINE_STIPPLE_PATTERN)
|
824
|
+
assert_equal(3, glGetIntegerv(GL_LINE_STIPPLE_REPEAT))
|
825
|
+
assert_equal(0x1234, glGetIntegerv(GL_LINE_STIPPLE_PATTERN))
|
826
826
|
end
|
827
827
|
|
828
828
|
def test_glpolygonstipple
|
829
829
|
stipple = [0x12] * 128
|
830
830
|
glPolygonStipple(stipple.pack("c*"))
|
831
|
-
assert_equal(
|
831
|
+
assert_equal(stipple.pack("c*"), glGetPolygonStipple())
|
832
832
|
end
|
833
833
|
|
834
834
|
def parse_feedback_data(data,count)
|
835
835
|
c = count / 11
|
836
836
|
ret = []
|
837
837
|
(0...c).each do |x|
|
838
|
-
i = x *11
|
838
|
+
i = x * 11
|
839
839
|
type = data[0+i]
|
840
840
|
|
841
841
|
v1 = [data[2+i], data[3+i], data[4+i]]
|
@@ -895,7 +895,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
895
895
|
|
896
896
|
ref = [[GL_POLYGON_TOKEN,[[0,0,0],[1,0,0],[1,1,0]]]] * 8
|
897
897
|
|
898
|
-
assert_equal(parse_feedback_data(data,count)
|
898
|
+
assert_equal(ref, parse_feedback_data(data,count))
|
899
899
|
end
|
900
900
|
|
901
901
|
def test_glrect
|
@@ -919,10 +919,10 @@ class TestGl10_11 < OpenGL::TestCase
|
|
919
919
|
glRectsv([0, 0], [1, 1])
|
920
920
|
|
921
921
|
count = glRenderMode GL_RENDER
|
922
|
-
data = buf.unpack("f*")
|
922
|
+
data = buf.unpack("f*")[0, count]
|
923
923
|
|
924
924
|
# eight 3d polygons with four points
|
925
|
-
assert_equal
|
925
|
+
assert_equal 16 * (3 * 3 + 2), count
|
926
926
|
end
|
927
927
|
|
928
928
|
def test_glrectv
|
@@ -943,62 +943,62 @@ class TestGl10_11 < OpenGL::TestCase
|
|
943
943
|
glClear(GL_COLOR_BUFFER_BIT)
|
944
944
|
|
945
945
|
data = glReadPixels(0,0,1,1,GL_RGB,GL_FLOAT)
|
946
|
-
assert_equal(
|
946
|
+
assert_equal([1.0,1.0, 1.0], data.unpack("f*"))
|
947
947
|
|
948
948
|
glClearColor(0.0,0.0,0.0,0.0)
|
949
949
|
glClear(GL_COLOR_BUFFER_BIT)
|
950
950
|
|
951
951
|
data = glReadPixels(0,0,1,1,GL_RGB,GL_FLOAT)
|
952
|
-
assert_equal(
|
952
|
+
assert_equal([0.0,0.0,0.0], data.unpack("f*"))
|
953
953
|
end
|
954
954
|
|
955
955
|
def test_gltexenv
|
956
956
|
glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_ADD)
|
957
|
-
assert_equal(glGetTexEnvfv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE)
|
957
|
+
assert_equal(GL_ADD, glGetTexEnvfv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE))
|
958
958
|
glTexEnvi(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,GL_MODULATE)
|
959
|
-
assert_equal(glGetTexEnviv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE)
|
959
|
+
assert_equal(GL_MODULATE, glGetTexEnviv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE))
|
960
960
|
|
961
961
|
glTexEnvfv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,[GL_ADD])
|
962
|
-
assert_equal(glGetTexEnvfv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE)
|
962
|
+
assert_equal(GL_ADD, glGetTexEnvfv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE))
|
963
963
|
glTexEnviv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE,[GL_MODULATE])
|
964
|
-
assert_equal(glGetTexEnviv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE)
|
964
|
+
assert_equal(GL_MODULATE, glGetTexEnviv(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE))
|
965
965
|
end
|
966
966
|
|
967
967
|
def test_gltexgen
|
968
968
|
glTexGend(GL_S,GL_TEXTURE_GEN_MODE,GL_REFLECTION_MAP)
|
969
|
-
assert_equal(glGetTexGendv(GL_S,GL_TEXTURE_GEN_MODE)
|
969
|
+
assert_equal(GL_REFLECTION_MAP, glGetTexGendv(GL_S,GL_TEXTURE_GEN_MODE))
|
970
970
|
glTexGenf(GL_S,GL_TEXTURE_GEN_MODE,GL_EYE_LINEAR)
|
971
|
-
assert_equal(glGetTexGenfv(GL_S,GL_TEXTURE_GEN_MODE)
|
971
|
+
assert_equal(GL_EYE_LINEAR, glGetTexGenfv(GL_S,GL_TEXTURE_GEN_MODE))
|
972
972
|
glTexGeni(GL_S,GL_TEXTURE_GEN_MODE,GL_SPHERE_MAP)
|
973
|
-
assert_equal(glGetTexGeniv(GL_S,GL_TEXTURE_GEN_MODE)
|
973
|
+
assert_equal(GL_SPHERE_MAP, glGetTexGeniv(GL_S,GL_TEXTURE_GEN_MODE))
|
974
974
|
|
975
975
|
glTexGendv(GL_S,GL_TEXTURE_GEN_MODE,[GL_REFLECTION_MAP])
|
976
|
-
assert_equal(glGetTexGendv(GL_S,GL_TEXTURE_GEN_MODE)
|
976
|
+
assert_equal(GL_REFLECTION_MAP, glGetTexGendv(GL_S,GL_TEXTURE_GEN_MODE))
|
977
977
|
glTexGenfv(GL_S,GL_TEXTURE_GEN_MODE,[GL_EYE_LINEAR])
|
978
|
-
assert_equal(glGetTexGenfv(GL_S,GL_TEXTURE_GEN_MODE)
|
978
|
+
assert_equal(GL_EYE_LINEAR, glGetTexGenfv(GL_S,GL_TEXTURE_GEN_MODE))
|
979
979
|
glTexGeniv(GL_S,GL_TEXTURE_GEN_MODE,[GL_SPHERE_MAP])
|
980
|
-
assert_equal(glGetTexGeniv(GL_S,GL_TEXTURE_GEN_MODE)
|
980
|
+
assert_equal(GL_SPHERE_MAP, glGetTexGeniv(GL_S,GL_TEXTURE_GEN_MODE))
|
981
981
|
end
|
982
982
|
|
983
983
|
def test_textures
|
984
984
|
textures = glGenTextures(2)
|
985
|
-
assert_equal(textures.size
|
986
|
-
assert_equal(glIsTexture(textures[0])
|
985
|
+
assert_equal(2, textures.size)
|
986
|
+
assert_equal(false, glIsTexture(textures[0]))
|
987
987
|
glBindTexture(GL_TEXTURE_2D,textures[0])
|
988
|
-
assert_equal(glIsTexture(textures[0])
|
988
|
+
assert_equal(true, glIsTexture(textures[0]))
|
989
989
|
|
990
990
|
image = ([0,0,0,1,1,1] * 8).pack("f*") # 16 RGB pixels
|
991
991
|
|
992
992
|
glTexImage2D(GL_TEXTURE_2D,0,GL_RGB8, 4, 4, 0, GL_RGB, GL_FLOAT, image)
|
993
|
-
assert_equal(glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT)
|
993
|
+
assert_equal(image, glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT))
|
994
994
|
|
995
995
|
glBindTexture(GL_TEXTURE_1D,textures[1])
|
996
996
|
|
997
997
|
glTexImage1D(GL_TEXTURE_1D,0,GL_RGB8, 16, 0, GL_RGB, GL_FLOAT, image)
|
998
|
-
assert_equal(glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT)
|
998
|
+
assert_equal(image, glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT))
|
999
999
|
|
1000
1000
|
glDeleteTextures(textures)
|
1001
|
-
assert_equal(glIsTexture(textures[0])
|
1001
|
+
assert_equal(false, glIsTexture(textures[0]))
|
1002
1002
|
end
|
1003
1003
|
|
1004
1004
|
def test_pixels
|
@@ -1006,13 +1006,13 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1006
1006
|
glClear(GL_COLOR_BUFFER_BIT)
|
1007
1007
|
|
1008
1008
|
data = glReadPixels(0,0,4,4,GL_RGB,GL_FLOAT)
|
1009
|
-
assert_equal(
|
1009
|
+
assert_equal([0] * 3 * 16, data.unpack("f*"))
|
1010
1010
|
|
1011
1011
|
image = ([1.0] * 3 * 16).pack("f*")
|
1012
1012
|
glDrawPixels(4,4,GL_RGB,GL_FLOAT,image)
|
1013
1013
|
|
1014
1014
|
data = glReadPixels(0,0,4,4,GL_RGB,GL_FLOAT)
|
1015
|
-
assert_equal(data
|
1015
|
+
assert_equal(image, data)
|
1016
1016
|
|
1017
1017
|
#
|
1018
1018
|
glClearColor(0,0,0,0)
|
@@ -1022,12 +1022,12 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1022
1022
|
glDrawPixels(4,4,GL_RGB,GL_FLOAT,image)
|
1023
1023
|
|
1024
1024
|
data = glReadPixels(0,0,4,4,GL_RGB,GL_FLOAT)
|
1025
|
-
assert_equal(data
|
1025
|
+
assert_equal(image, data)
|
1026
1026
|
|
1027
1027
|
glCopyPixels(0,2,4,2,GL_COLOR)
|
1028
1028
|
|
1029
1029
|
data = glReadPixels(0,0,4,4,GL_RGB,GL_FLOAT)
|
1030
|
-
assert_equal(
|
1030
|
+
assert_equal(([1.0] * 3 * 16).pack("f*"), data)
|
1031
1031
|
end
|
1032
1032
|
|
1033
1033
|
def test_gltranslate
|
@@ -1035,10 +1035,10 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1035
1035
|
glMatrixMode(GL_MODELVIEW)
|
1036
1036
|
glLoadIdentity()
|
1037
1037
|
glTranslated(1.0,2.0,3.0)
|
1038
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
1038
|
+
assert_equal(m, glGetDoublev(GL_MODELVIEW_MATRIX))
|
1039
1039
|
glLoadIdentity()
|
1040
1040
|
glTranslatef(1.0,2.0,3.0)
|
1041
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
1041
|
+
assert_equal(m, glGetDoublev(GL_MODELVIEW_MATRIX))
|
1042
1042
|
end
|
1043
1043
|
|
1044
1044
|
def test_glscale
|
@@ -1046,10 +1046,10 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1046
1046
|
glMatrixMode(GL_MODELVIEW)
|
1047
1047
|
glLoadIdentity()
|
1048
1048
|
glScaled(1.0,2.0,3.0)
|
1049
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
1049
|
+
assert_equal(m, glGetDoublev(GL_MODELVIEW_MATRIX))
|
1050
1050
|
glLoadIdentity()
|
1051
1051
|
glScalef(1.0,2.0,3.0)
|
1052
|
-
assert_equal(glGetDoublev(GL_MODELVIEW_MATRIX)
|
1052
|
+
assert_equal(m, glGetDoublev(GL_MODELVIEW_MATRIX))
|
1053
1053
|
end
|
1054
1054
|
|
1055
1055
|
def test_glrotate
|
@@ -1070,10 +1070,10 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1070
1070
|
textures = glGenTextures(2)
|
1071
1071
|
glBindTexture(GL_TEXTURE_1D,textures[0])
|
1072
1072
|
glBindTexture(GL_TEXTURE_2D,textures[1])
|
1073
|
-
assert_equal(glAreTexturesResident(textures).size
|
1073
|
+
assert_equal(2, glAreTexturesResident(textures).size)
|
1074
1074
|
glPrioritizeTextures(textures,[0.5,1.0])
|
1075
|
-
assert_equal(glGetTexParameterfv(GL_TEXTURE_1D,GL_TEXTURE_PRIORITY)
|
1076
|
-
assert_equal(glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY)
|
1075
|
+
assert_equal(0.5, glGetTexParameterfv(GL_TEXTURE_1D,GL_TEXTURE_PRIORITY))
|
1076
|
+
assert_equal(1.0, glGetTexParameterfv(GL_TEXTURE_2D,GL_TEXTURE_PRIORITY))
|
1077
1077
|
|
1078
1078
|
tex = ([0,0,0,1,1,1] * 2).pack("f*")
|
1079
1079
|
tex2 = ([1] * 3 * 4).pack("f*")
|
@@ -1081,26 +1081,26 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1081
1081
|
# 1d
|
1082
1082
|
glDrawPixels(4,1,GL_RGB,GL_FLOAT,tex)
|
1083
1083
|
glCopyTexImage1D(GL_TEXTURE_1D,0,GL_RGB8,0,0,4,0)
|
1084
|
-
assert_equal(glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT)
|
1084
|
+
assert_equal(tex, glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT))
|
1085
1085
|
|
1086
1086
|
glDrawPixels(4,1,GL_RGB,GL_FLOAT,tex2)
|
1087
1087
|
glCopyTexSubImage1D(GL_TEXTURE_1D,0,0,0,0,4)
|
1088
|
-
assert_equal(glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT)
|
1088
|
+
assert_equal(tex2, glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT))
|
1089
1089
|
|
1090
1090
|
glTexSubImage1D(GL_TEXTURE_1D,0,0,4,GL_RGB,GL_FLOAT,tex)
|
1091
|
-
assert_equal(glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT)
|
1091
|
+
assert_equal(tex, glGetTexImage(GL_TEXTURE_1D,0,GL_RGB,GL_FLOAT))
|
1092
1092
|
|
1093
1093
|
# 2d
|
1094
1094
|
glDrawPixels(2,2,GL_RGB,GL_FLOAT,tex)
|
1095
1095
|
glCopyTexImage2D(GL_TEXTURE_2D,0,GL_RGB8,0,0,2,2,0)
|
1096
|
-
assert_equal(glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT)
|
1096
|
+
assert_equal(tex, glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT))
|
1097
1097
|
|
1098
1098
|
glDrawPixels(2,2,GL_RGB,GL_FLOAT,tex2)
|
1099
1099
|
glCopyTexSubImage2D(GL_TEXTURE_2D,0,0,0,0,0,2,2)
|
1100
|
-
assert_equal(glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT)
|
1100
|
+
assert_equal(tex2, glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT))
|
1101
1101
|
|
1102
1102
|
glTexSubImage2D(GL_TEXTURE_2D,0,0,0,2,2,GL_RGB,GL_FLOAT,tex)
|
1103
|
-
assert_equal(glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT)
|
1103
|
+
assert_equal(tex, glGetTexImage(GL_TEXTURE_2D,0,GL_RGB,GL_FLOAT))
|
1104
1104
|
|
1105
1105
|
glDeleteTextures(textures)
|
1106
1106
|
end
|
@@ -1117,35 +1117,35 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1117
1117
|
]
|
1118
1118
|
|
1119
1119
|
glMap1f(GL_MAP1_VERTEX_3,0,100,3,2,control_points)
|
1120
|
-
assert_equal(glGetMapfv(GL_MAP1_VERTEX_3,GL_COEFF)
|
1120
|
+
assert_equal(control_points, glGetMapfv(GL_MAP1_VERTEX_3,GL_COEFF))
|
1121
1121
|
|
1122
1122
|
glMap1d(GL_MAP1_VERTEX_3,0,100,3,2,control_points_2)
|
1123
|
-
assert_equal(glGetMapdv(GL_MAP1_VERTEX_3,GL_COEFF)
|
1123
|
+
assert_equal(control_points_2, glGetMapdv(GL_MAP1_VERTEX_3,GL_COEFF))
|
1124
1124
|
|
1125
|
-
assert_equal(glGetMapiv(GL_MAP1_VERTEX_3,GL_ORDER)
|
1125
|
+
assert_equal(2, glGetMapiv(GL_MAP1_VERTEX_3,GL_ORDER))
|
1126
1126
|
|
1127
1127
|
glMap2f(GL_MAP2_VERTEX_3,0,100,3,1,0,100,3,2,control_points)
|
1128
|
-
assert_equal(glGetMapfv(GL_MAP2_VERTEX_3,GL_COEFF)
|
1128
|
+
assert_equal(control_points,glGetMapfv(GL_MAP2_VERTEX_3,GL_COEFF))
|
1129
1129
|
|
1130
1130
|
glMap2d(GL_MAP2_VERTEX_3,0,100,3,1,0,100,3,2,control_points_2)
|
1131
|
-
assert_equal(glGetMapdv(GL_MAP2_VERTEX_3,GL_COEFF)
|
1131
|
+
assert_equal(control_points_2, glGetMapdv(GL_MAP2_VERTEX_3,GL_COEFF))
|
1132
1132
|
end
|
1133
1133
|
|
1134
1134
|
def test_glmapgrid
|
1135
1135
|
glMapGrid1d(2,1,100)
|
1136
|
-
assert_equal(glGetIntegerv(GL_MAP1_GRID_SEGMENTS)
|
1137
|
-
assert_equal(
|
1136
|
+
assert_equal(2, glGetIntegerv(GL_MAP1_GRID_SEGMENTS))
|
1137
|
+
assert_equal([1,100], glGetIntegerv(GL_MAP1_GRID_DOMAIN))
|
1138
1138
|
glMapGrid1f(3,2,99)
|
1139
|
-
assert_equal(glGetIntegerv(GL_MAP1_GRID_SEGMENTS)
|
1140
|
-
assert_equal(
|
1139
|
+
assert_equal(3, glGetIntegerv(GL_MAP1_GRID_SEGMENTS))
|
1140
|
+
assert_equal([2,99], glGetIntegerv(GL_MAP1_GRID_DOMAIN))
|
1141
1141
|
#
|
1142
1142
|
glMapGrid2d(2,1,100,3,2,99)
|
1143
|
-
assert_equal(
|
1144
|
-
assert_equal(
|
1143
|
+
assert_equal([2,3], glGetIntegerv(GL_MAP2_GRID_SEGMENTS))
|
1144
|
+
assert_equal([1,100,2,99], glGetIntegerv(GL_MAP2_GRID_DOMAIN))
|
1145
1145
|
|
1146
1146
|
glMapGrid2f(3,2,99,4,3,98)
|
1147
|
-
assert_equal(
|
1148
|
-
assert_equal(
|
1147
|
+
assert_equal([3,4], glGetIntegerv(GL_MAP2_GRID_SEGMENTS))
|
1148
|
+
assert_equal([2,99,3,98], glGetIntegerv(GL_MAP2_GRID_DOMAIN))
|
1149
1149
|
end
|
1150
1150
|
|
1151
1151
|
def test_gleval
|
@@ -1219,7 +1219,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1219
1219
|
i2 = ([1.0] * 3 + [0.0] * 3 ).pack("f*")
|
1220
1220
|
|
1221
1221
|
# init
|
1222
|
-
glClearColor(0,0,0,0)
|
1222
|
+
glClearColor(0,0,0,0)
|
1223
1223
|
glClear(GL_ACCUM_BUFFER_BIT | GL_COLOR_BUFFER_BIT)
|
1224
1224
|
# left
|
1225
1225
|
glDrawPixels(2,1,GL_RGB,GL_FLOAT,i1)
|
@@ -1239,9 +1239,9 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1239
1239
|
base = glGenLists(2)
|
1240
1240
|
assert(base>0)
|
1241
1241
|
glListBase(1)
|
1242
|
-
assert_equal(glGetIntegerv(GL_LIST_BASE)
|
1242
|
+
assert_equal(1, glGetIntegerv(GL_LIST_BASE))
|
1243
1243
|
glListBase(0)
|
1244
|
-
assert_equal(glGetIntegerv(GL_LIST_BASE)
|
1244
|
+
assert_equal(0, glGetIntegerv(GL_LIST_BASE))
|
1245
1245
|
|
1246
1246
|
glNewList(base+0, GL_COMPILE)
|
1247
1247
|
glBegin(GL_TRIANGLES)
|
@@ -1259,11 +1259,11 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1259
1259
|
glEnd()
|
1260
1260
|
glEndList()
|
1261
1261
|
|
1262
|
-
assert_equal(glIsList(base+0)
|
1263
|
-
assert_equal(glIsList(base+1)
|
1264
|
-
assert_equal(glIsList(base+2)
|
1262
|
+
assert_equal(true, glIsList(base+0))
|
1263
|
+
assert_equal(true, glIsList(base+1))
|
1264
|
+
assert_equal(false, glIsList(base+2))
|
1265
1265
|
|
1266
|
-
#
|
1266
|
+
#
|
1267
1267
|
buf = glFeedbackBuffer(256,GL_3D)
|
1268
1268
|
glRenderMode(GL_FEEDBACK)
|
1269
1269
|
|
@@ -1271,13 +1271,13 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1271
1271
|
glCallLists(GL_INT,[base+0,base+1])
|
1272
1272
|
|
1273
1273
|
count = glRenderMode(GL_RENDER)
|
1274
|
-
assert_equal(
|
1274
|
+
assert_equal((3*3+2) * 3, count) # 3 triangles
|
1275
1275
|
#
|
1276
1276
|
|
1277
1277
|
glDeleteLists(base,2)
|
1278
1278
|
|
1279
|
-
assert_equal(glIsList(base+0)
|
1280
|
-
assert_equal(glIsList(base+1)
|
1279
|
+
assert_equal(false, glIsList(base+0))
|
1280
|
+
assert_equal(false, glIsList(base+1))
|
1281
1281
|
end
|
1282
1282
|
|
1283
1283
|
def test_arrays
|
@@ -1285,7 +1285,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1285
1285
|
|
1286
1286
|
va = [0, 0, 0, 1, 1, 1].pack("f*")
|
1287
1287
|
|
1288
|
-
glVertexPointer 2, GL_FLOAT,
|
1288
|
+
glVertexPointer 2, GL_FLOAT, 8, va
|
1289
1289
|
assert_equal va, glGetPointerv(GL_VERTEX_ARRAY_POINTER)
|
1290
1290
|
assert_equal 2, glGetIntegerv(GL_VERTEX_ARRAY_SIZE)
|
1291
1291
|
assert_equal GL_FLOAT, glGetIntegerv(GL_VERTEX_ARRAY_TYPE)
|
@@ -1309,7 +1309,7 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1309
1309
|
glDrawElements(GL_TRIANGLES, 3, GL_UNSIGNED_BYTE, [0, 1, 2].pack("C*"))
|
1310
1310
|
|
1311
1311
|
count = glRenderMode(GL_RENDER)
|
1312
|
-
assert_equal(
|
1312
|
+
assert_equal(44, count)
|
1313
1313
|
|
1314
1314
|
glDisableClientState(GL_VERTEX_ARRAY)
|
1315
1315
|
end
|
@@ -1320,22 +1320,22 @@ class TestGl10_11 < OpenGL::TestCase
|
|
1320
1320
|
ea = [0].pack("C*")
|
1321
1321
|
ca = [1, 0, 1, 0].pack("f*")
|
1322
1322
|
|
1323
|
-
glNormalPointer(GL_FLOAT,
|
1323
|
+
glNormalPointer(GL_FLOAT, 12, na)
|
1324
1324
|
assert_equal(GL_FLOAT, glGetIntegerv(GL_NORMAL_ARRAY_TYPE))
|
1325
1325
|
assert_equal(12, glGetIntegerv(GL_NORMAL_ARRAY_STRIDE))
|
1326
1326
|
assert_equal(na, glGetPointerv(GL_NORMAL_ARRAY_POINTER))
|
1327
1327
|
|
1328
|
-
glTexCoordPointer(4, GL_FLOAT,
|
1328
|
+
glTexCoordPointer(4, GL_FLOAT, 16, ta)
|
1329
1329
|
assert_equal(4, glGetIntegerv(GL_TEXTURE_COORD_ARRAY_SIZE))
|
1330
1330
|
assert_equal(GL_FLOAT, glGetIntegerv(GL_TEXTURE_COORD_ARRAY_TYPE))
|
1331
1331
|
assert_equal(16, glGetIntegerv(GL_TEXTURE_COORD_ARRAY_STRIDE))
|
1332
1332
|
assert_equal(ta, glGetPointerv(GL_TEXTURE_COORD_ARRAY_POINTER))
|
1333
1333
|
|
1334
|
-
glEdgeFlagPointer(
|
1334
|
+
glEdgeFlagPointer(1, ea)
|
1335
1335
|
assert_equal(1, glGetIntegerv(GL_EDGE_FLAG_ARRAY_STRIDE))
|
1336
1336
|
assert_equal(ea, glGetPointerv(GL_EDGE_FLAG_ARRAY_POINTER))
|
1337
1337
|
|
1338
|
-
glColorPointer(4, GL_FLOAT,
|
1338
|
+
glColorPointer(4, GL_FLOAT, 16, ca)
|
1339
1339
|
assert_equal(4, glGetIntegerv(GL_COLOR_ARRAY_SIZE))
|
1340
1340
|
assert_equal(GL_FLOAT, glGetIntegerv(GL_COLOR_ARRAY_TYPE))
|
1341
1341
|
assert_equal(16, glGetIntegerv(GL_COLOR_ARRAY_STRIDE))
|