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
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 329665f46d7e55e5354ff1b075b10c8292f302ec
|
4
|
+
data.tar.gz: eeb1fe5682a756b522ca487bae7941cd6d2acc52
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 0238a43799ca1143991351cb82574bc6c6ff07082f62e7ee9b858c31990dddfb02e3e400e72977cae0ff5d59157f82d5a6a7eb78ac692c33b1ebd0129af1b542
|
7
|
+
data.tar.gz: 81626e5bb01a7771b7282a63298767e6f9e3b2e084db6fecb38d93f4e8b5f352ee4fa1c53552b59bbe643e4d255afb7b411eea2726999bc76c4eecd0e153fc69
|
checksums.yaml.gz.sig
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
�(��a���B�A/���.~����Z�����9��Tqv(|l�/HY�O�4Ҧ��Ax�:XԄ���DK)��hJ��eA�| �)u�k�z���)�Y16���4p��� 14�|��C� GMq���-kyn����iYz{XbF�?���I�Ա$J�)uK�~�2����m�j�7�<�n(�V����rp��WM��*}V�P�UMVIn��`j놬����fa��Q(��tq��L��R��
|
data.tar.gz.sig
ADDED
Binary file
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
language: ruby
|
2
|
+
rvm:
|
3
|
+
# - "1.9.3"
|
4
|
+
- "2.1"
|
5
|
+
- "rbx"
|
6
|
+
# - jruby-19mode # JRuby in 1.9 mode
|
7
|
+
# - rbx-19mode
|
8
|
+
matrix:
|
9
|
+
allow_failures:
|
10
|
+
- rvm: rbx
|
11
|
+
before_install:
|
12
|
+
- sudo apt-get install xpra xserver-xorg-video-dummy freeglut3-dev;
|
13
|
+
- gem install hoe rake-compiler glut glu;
|
14
|
+
before_script:
|
15
|
+
- "xpra --xvfb=\"Xorg +extension GLX -config `pwd`/test/dummy.xorg.conf -logfile ${HOME}/.xpra/xorg.log\" start :9"
|
16
|
+
script: "env DISPLAY=:9 rake test"
|
17
|
+
after_script:
|
18
|
+
- "xpra stop :9"
|
19
|
+
- "cat ~/.xpra/*"
|
data/History.rdoc
CHANGED
@@ -1,3 +1,29 @@
|
|
1
|
+
=== 0.9.0 / 2014-03-14
|
2
|
+
|
3
|
+
* Split glu and glut into seperate gems.
|
4
|
+
* Add OpenGL 3.0 support.
|
5
|
+
* Add x64-mingw platform for cross build and add ruby-2.0.0 to binary gems.
|
6
|
+
* Don't pollute the global namespace. Use GL namespace.
|
7
|
+
|
8
|
+
* Replace UINT2FIX with UINT2NUM since UINT2FIX is not defined in MRI ruby.
|
9
|
+
* Don't return the terminating null from C in GetProgramInfoLog.
|
10
|
+
* Remove the outdated website, use gh-pages now.
|
11
|
+
* Fixes in tests, resolved some upstream mesa bugs.
|
12
|
+
* glMaterial: Before converting using to_a, check if conversion is possible.
|
13
|
+
* Fix incorrect conversion of bool arguments to functions, they were getting
|
14
|
+
converted from C instead of to C (`GL_TRUE/true` got converted to `41`).
|
15
|
+
* Fix: some parts of GL_EXT_gpu_shader4 were checking for GL_ARB_vertex_shader
|
16
|
+
support instead of GL_EXT_gpu_shader4.
|
17
|
+
* Fix ProgramVertexLimitNV checked for GL_NV_gpu_program4 support instead of
|
18
|
+
GL_EXT_geometry_shader4.
|
19
|
+
* Fix build with Ruby-2.0 on OS X Mavericks.
|
20
|
+
|
21
|
+
* Dropped support for 1.2 optional ARB_imaging subset. It is deprecated and
|
22
|
+
support for it was dropped from all major drivers. Continuing support for it
|
23
|
+
would lead to developers using deprecated coding practices.
|
24
|
+
|
25
|
+
* Fix several test cases.
|
26
|
+
|
1
27
|
=== 0.8.0 / 2013-02-03
|
2
28
|
|
3
29
|
* Drop support for Ruby 1.8.
|
data/Manifest.txt
CHANGED
@@ -1,21 +1,12 @@
|
|
1
1
|
.autotest
|
2
2
|
.gemtest
|
3
3
|
.gitignore
|
4
|
+
.travis.yml
|
4
5
|
History.rdoc
|
5
6
|
MIT-LICENSE
|
6
7
|
Manifest.txt
|
7
8
|
README.rdoc
|
8
9
|
Rakefile
|
9
|
-
Rakefile.cross
|
10
|
-
docs/build_install.txt
|
11
|
-
docs/extensions.txt.in
|
12
|
-
docs/history.txt
|
13
|
-
docs/requirements_and_design.txt
|
14
|
-
docs/roadmap.txt
|
15
|
-
docs/scientific_use.txt
|
16
|
-
docs/supplies/page_template.html
|
17
|
-
docs/thanks.txt
|
18
|
-
docs/tutorial.txt
|
19
10
|
examples/NeHe/NeHe.png
|
20
11
|
examples/NeHe/crate.png
|
21
12
|
examples/NeHe/glass.png
|
@@ -109,6 +100,7 @@ ext/opengl/gl-1.4.c
|
|
109
100
|
ext/opengl/gl-1.5.c
|
110
101
|
ext/opengl/gl-2.0.c
|
111
102
|
ext/opengl/gl-2.1.c
|
103
|
+
ext/opengl/gl-3.0.c
|
112
104
|
ext/opengl/gl-enums.c
|
113
105
|
ext/opengl/gl-enums.h
|
114
106
|
ext/opengl/gl-error.c
|
@@ -122,17 +114,11 @@ ext/opengl/gl-ext-nv.c
|
|
122
114
|
ext/opengl/gl-types.h
|
123
115
|
ext/opengl/gl.c
|
124
116
|
ext/opengl/gl_buffer.c
|
125
|
-
ext/opengl/glu-enums.c
|
126
|
-
ext/opengl/glu-enums.h
|
127
|
-
ext/opengl/glu.c
|
128
|
-
ext/opengl/glut.c
|
129
|
-
ext/opengl/glut_callbacks.c
|
130
117
|
ext/opengl/opengl.c
|
131
118
|
lib/gl.rb
|
132
|
-
lib/glu.rb
|
133
|
-
lib/glut.rb
|
134
119
|
lib/opengl.rb
|
135
120
|
lib/opengl/test_case.rb
|
121
|
+
test/dummy.xorg.conf
|
136
122
|
test/test_gl.rb
|
137
123
|
test/test_gl_10_11.rb
|
138
124
|
test/test_gl_12.rb
|
@@ -146,13 +132,7 @@ test/test_gl_ext_ati.rb
|
|
146
132
|
test/test_gl_ext_ext.rb
|
147
133
|
test/test_gl_ext_gremedy.rb
|
148
134
|
test/test_gl_ext_nv.rb
|
149
|
-
test/test_glu.rb
|
150
135
|
test/test_opengl_buffer.rb
|
151
136
|
utils/README
|
152
137
|
utils/enumgen.rb
|
153
138
|
utils/extlistgen.rb
|
154
|
-
utils/mkdn2html.rb
|
155
|
-
utils/post-mkdn2html.rb
|
156
|
-
website/images/ogl.jpg
|
157
|
-
website/images/tab_bottom.gif
|
158
|
-
website/style.css
|
data/README.rdoc
CHANGED
@@ -1,18 +1,24 @@
|
|
1
1
|
= opengl
|
2
2
|
|
3
|
-
source :: https://github.com/
|
4
|
-
docs :: http://
|
5
|
-
bugs :: https://github.com/
|
3
|
+
source :: https://github.com/larskanis/opengl
|
4
|
+
docs :: http://larskanis.github.com/opengl
|
5
|
+
bugs :: https://github.com/larskanis/opengl/issues
|
6
6
|
email :: mailto:ruby-opengl-devel@rubyforge.org
|
7
7
|
|
8
|
+
{<img src="https://travis-ci.org/larskanis/opengl.png?branch=master" alt="Build Status" />}[https://travis-ci.org/larskanis/opengl]
|
9
|
+
|
8
10
|
== Description
|
9
11
|
|
10
|
-
An OpenGL wrapper for Ruby.
|
11
|
-
|
12
|
+
An OpenGL wrapper for Ruby. opengl contains bindings for OpenGL.
|
13
|
+
|
14
|
+
Be sure to check out
|
15
|
+
{GLU}[https://github.com/larskanis/glu] and
|
16
|
+
{GLUT}[https://github.com/larskanis/glut]
|
17
|
+
gems.
|
12
18
|
|
13
19
|
== Features and Problems
|
14
20
|
|
15
|
-
* available for Windows, Linux
|
21
|
+
* available for Windows, Linux and OS X
|
16
22
|
|
17
23
|
== Synopsis
|
18
24
|
|
@@ -22,8 +28,26 @@ GLU and GLUT libraries.
|
|
22
28
|
== Requirements
|
23
29
|
|
24
30
|
* Ruby 1.9.2+
|
25
|
-
* see https://github.com/larskanis/opengl/tree/0.7 for Ruby 1.8.x compatible branch
|
26
|
-
*
|
31
|
+
* see {0.7}[https://github.com/larskanis/opengl/tree/0.7] for Ruby 1.8.x compatible branch
|
32
|
+
* OpenGL development files installed
|
33
|
+
|
34
|
+
== Tests
|
35
|
+
|
36
|
+
Note that the tests have the adverse effect of testing the underlying OpenGL
|
37
|
+
implementation, so depending on your GL provider, drivers or OS, the tests may
|
38
|
+
fail, crash, or not run at all, without affecting your ability to use the bindings.
|
39
|
+
|
40
|
+
Tests require both glut and glu gem.
|
41
|
+
|
42
|
+
With our test suite, we were able to uncover and help fix upstream mesa bugs:
|
43
|
+
|
44
|
+
* {#61026}[https://bugs.freedesktop.org/show_bug.cgi?id=61026] glBitmap segfault
|
45
|
+
* {#61003}[https://bugs.freedesktop.org/show_bug.cgi?id=61003] gluSurface with Nurbs spits out debug code
|
46
|
+
* {#61395}[https://bugs.freedesktop.org/show_bug.cgi?id=61395] glEdgeFlag can't be set to false
|
47
|
+
|
48
|
+
Whenever a test or example fails, it should be quickly ported into a simple C
|
49
|
+
test program, so we can determine whether it's a bug in the bindings or the
|
50
|
+
OpenGL implementation.
|
27
51
|
|
28
52
|
== Install
|
29
53
|
|
@@ -40,40 +64,22 @@ and generate the RDoc.
|
|
40
64
|
|
41
65
|
== Cross compiling for Windows
|
42
66
|
|
43
|
-
Using rake-compiler a cross compiled opengl gem can be build
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
Install mingw32 or w64 using the instructions in rake-compiler's README.
|
50
|
-
For Debian/Ubuntu it is <tt>apt-get install gcc-mingw-w64</tt> .
|
51
|
-
|
52
|
-
Download and cross compile ruby 1.9 for win32 with:
|
53
|
-
|
54
|
-
rake-compiler cross-ruby VERSION=1.9.3-p0
|
55
|
-
|
56
|
-
Download and cross compile opengl for win32:
|
57
|
-
|
58
|
-
rake cross native gem
|
59
|
-
|
60
|
-
or with custom versions:
|
61
|
-
|
62
|
-
rake cross native gem RUBY_CC_VERSION=1.9.3 LIBFREEGLUT_VERSION=2.8.0
|
63
|
-
|
64
|
-
If everything works, there should be ruby-opengl-VERSION-x86-mingw32.gem in the pkg
|
65
|
-
directory.
|
66
|
-
|
67
|
+
Using rake-compiler a cross compiled opengl gem can be build in a
|
68
|
+
{rake-compiler-dev-box}[https://github.com/tjschuck/rake-compiler-dev-box]
|
69
|
+
the win32 platform. There are no runtime dependencies to any but the
|
70
|
+
standard Windows DLLs. Use the standard package_win32_fat_binary
|
71
|
+
script.
|
67
72
|
|
68
73
|
== License
|
69
74
|
|
70
75
|
(The MIT License)
|
71
76
|
|
72
|
-
Copyright (c)
|
73
|
-
Copyright (c)
|
74
|
-
Copyright (c)
|
75
|
-
Copyright (c)
|
76
|
-
Copyright (c)
|
77
|
+
Copyright (c) Blaž Hrastnik (current maintainer)
|
78
|
+
Copyright (c) Eric Hodel (current maintainer)
|
79
|
+
Copyright (c) Alain Hoang (previous maintainer)
|
80
|
+
Copyright (c) Jan Dvorak (contributor)
|
81
|
+
Copyright (c) Minh Thu Vo (contributor)
|
82
|
+
Copyright (c) James Adam (contributor)
|
77
83
|
|
78
84
|
Permission is hereby granted, free of charge, to any person obtaining
|
79
85
|
a copy of this software and associated documentation files (the
|
data/Rakefile
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# -*- coding: UTF-8 -*-
|
1
2
|
#-*-ruby-*-
|
2
3
|
#
|
3
4
|
# Copyright (C) 2006 John M. Gabriele <jmg3000@gmail.com>
|
@@ -14,14 +15,13 @@
|
|
14
15
|
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
15
16
|
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
16
17
|
|
17
|
-
require 'rubygems'
|
18
|
-
|
19
18
|
require 'hoe'
|
20
19
|
require 'rake/extensiontask'
|
21
|
-
load 'Rakefile.cross'
|
22
20
|
|
23
21
|
hoe = Hoe.spec 'opengl' do
|
24
22
|
developer 'Eric Hodel', 'drbrain@segment7.net'
|
23
|
+
developer 'Lars Kanis', 'lars@greiz-reinsdorf.de'
|
24
|
+
developer 'Blaž Hrastnik', 'speed.the.bboy@gmail.com'
|
25
25
|
developer 'Alain Hoang', ''
|
26
26
|
developer 'Jan Dvorak', ''
|
27
27
|
developer 'Minh Thu Vo', ''
|
@@ -32,6 +32,8 @@ hoe = Hoe.spec 'opengl' do
|
|
32
32
|
self.extra_rdoc_files = FileList['*.rdoc']
|
33
33
|
|
34
34
|
extra_dev_deps << ['rake-compiler', '~> 0.7', '>= 0.7.9']
|
35
|
+
extra_dev_deps << ['glu', '~> 8.1']
|
36
|
+
extra_dev_deps << ['glut', '~> 8.1']
|
35
37
|
|
36
38
|
self.spec_extras = {
|
37
39
|
:extensions => %w[ext/opengl/extconf.rb],
|
@@ -43,74 +45,16 @@ Rake::ExtensionTask.new 'opengl', hoe.spec do |ext|
|
|
43
45
|
ext.lib_dir = 'lib/opengl'
|
44
46
|
|
45
47
|
ext.cross_compile = true
|
46
|
-
ext.cross_platform = ['i386-mingw32']
|
47
|
-
ext.cross_config_options += [
|
48
|
-
"--with-installed-dir=#{STATIC_INSTALLDIR}",
|
49
|
-
]
|
48
|
+
ext.cross_platform = ['i386-mingw32', 'x64-mingw32']
|
50
49
|
end
|
51
50
|
|
52
51
|
task :test => :compile
|
53
52
|
|
54
|
-
# Generate html docs from the markdown source and upload to the site.
|
55
|
-
# All doc files that are destined for the website have filenames that
|
56
|
-
# end in .txt.
|
57
|
-
|
58
|
-
WEBSITE_MKDN = FileList['./docs/*.txt'] << 'README.txt'
|
59
|
-
NICE_HTML_DOCS = WEBSITE_MKDN.ext('html')
|
60
|
-
|
61
53
|
# defines columns in the HTML extension list
|
62
54
|
GLEXT_VERSIONS = %w[svn 0.60 0.50]
|
63
55
|
|
64
|
-
desc 'Show contents of some variables related to website doc generation.'
|
65
|
-
task :explain_website do
|
66
|
-
puts "WEBSITE_MKDN:"
|
67
|
-
WEBSITE_MKDN.each do |doc|
|
68
|
-
puts "\t#{doc}"
|
69
|
-
end
|
70
|
-
|
71
|
-
puts "NICE_HTML_DOCS:"
|
72
|
-
NICE_HTML_DOCS.each do |doc|
|
73
|
-
puts "\t#{doc}"
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
56
|
desc 'Generate supported extension list.'
|
78
57
|
task :gen_glext_list do
|
79
58
|
sh "./utils/extlistgen.rb", "doc/extensions.txt.in", "doc/extensions.txt", *GLEXT_VERSIONS
|
80
59
|
end
|
81
60
|
|
82
|
-
desc 'Generate website html.'
|
83
|
-
task :gen_website => [:gen_glext_list] + NICE_HTML_DOCS do
|
84
|
-
# Now that the website docs have been generated, copy them to ./website.
|
85
|
-
cp "README.html", "website/index.html"
|
86
|
-
cp "doc/*.html", "ebsite"
|
87
|
-
end
|
88
|
-
|
89
|
-
# You'll see some intermediate .plain files get generated. These are html,
|
90
|
-
# but don't yet have their code snippets syntax highlighted.
|
91
|
-
rule '.html' => '.plain' do |t|
|
92
|
-
puts "Turning #{t.source} into #{t.name} ..."
|
93
|
-
sh "./utils/post-mkdn2html.rb", t.source, t.name
|
94
|
-
end
|
95
|
-
|
96
|
-
# Process the markdown docs into plain html.
|
97
|
-
rule '.plain' => '.txt' do |t|
|
98
|
-
puts "Turning #{t.source} into #{t.name} ..."
|
99
|
-
sh "./utils/mkdn2html.rb", t.source, t.name
|
100
|
-
end
|
101
|
-
|
102
|
-
RUBYFORGE = "rubyforge.org:/var/www/gforge-projects/ruby-opengl"
|
103
|
-
|
104
|
-
desc 'Upload the newly-built site to RubyForge.'
|
105
|
-
task :upload_website => [:gen_website] do
|
106
|
-
sh "scp", "website/*.html", RUBYFORGE
|
107
|
-
sh "scp", "website/images/*", "#{RUBYFORGE}/images/"
|
108
|
-
end
|
109
|
-
|
110
|
-
desc 'Upload entire site, including stylesheet and the images directory.'
|
111
|
-
task :upload_entire_website => [:gen_website] do
|
112
|
-
sh "scp", "website/*.html", RUBYFORGE
|
113
|
-
sh "scp", "website/*.css", RUBYFORGE
|
114
|
-
sh "scp", "-r", "website", "images", RUBYFORGE
|
115
|
-
end
|
116
|
-
|
@@ -1,10 +1,12 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
# Name: nehe_lesson02.rb
|
3
3
|
# Purpose: An implementation of NeHe's OpenGL Lesson #02
|
4
4
|
# using ruby-opengl (http://nehe.gamedev.net/)
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'opengl'
|
8
|
+
require 'glu'
|
9
|
+
require 'glut'
|
8
10
|
require 'mathn'
|
9
11
|
|
10
12
|
# Add GL and GLUT namespaces in to make porting easier
|
@@ -113,4 +115,3 @@ glutReshapeFunc :reshape
|
|
113
115
|
glutKeyboardFunc keyboard
|
114
116
|
init_gl_window 640, 480
|
115
117
|
glutMainLoop
|
116
|
-
|
@@ -1,10 +1,12 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
# Name: nehe_lesson03.rb
|
3
3
|
# Purpose: An implementation of NeHe's OpenGL Lesson #03
|
4
4
|
# using ruby-opengl (http://nehe.gamedev.net/)
|
5
5
|
#
|
6
6
|
|
7
7
|
require 'opengl'
|
8
|
+
require 'glu'
|
9
|
+
require 'glut'
|
8
10
|
require 'mathn'
|
9
11
|
|
10
12
|
# Add GL and GLUT namespaces in to make porting easier
|
@@ -119,4 +121,3 @@ glutReshapeFunc :reshape
|
|
119
121
|
glutKeyboardFunc keyboard
|
120
122
|
init_gl_window 640, 480
|
121
123
|
glutMainLoop
|
122
|
-
|
@@ -1,9 +1,11 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
1
|
+
#!/usr/bin/env ruby
|
2
2
|
# Name: nehe_lesson04.rb
|
3
3
|
# Purpose: An implementation of NeHe's OpenGL Lesson #04
|
4
4
|
# using ruby-opengl http://nehe.gamedev.net/
|
5
5
|
|
6
6
|
require 'opengl'
|
7
|
+
require 'glu'
|
8
|
+
require 'glut'
|
7
9
|
|
8
10
|
# Add GL and GLUT namespaces in to make porting easier
|
9
11
|
include Gl
|
@@ -1,6 +1,9 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
1
3
|
require 'opengl'
|
2
|
-
require '
|
3
|
-
require '
|
4
|
+
require 'glu'
|
5
|
+
require 'glut'
|
6
|
+
require 'chunky_png'
|
4
7
|
|
5
8
|
class Lesson06
|
6
9
|
include Gl
|
@@ -150,7 +153,7 @@ class Lesson06
|
|
150
153
|
when ?\e
|
151
154
|
glutDestroyWindow @window
|
152
155
|
exit 0
|
153
|
-
when 'F' then
|
156
|
+
when 'F' then
|
154
157
|
@fullscreen = !@fullscreen
|
155
158
|
|
156
159
|
if @fullscreen then
|
@@ -164,11 +167,12 @@ class Lesson06
|
|
164
167
|
end
|
165
168
|
|
166
169
|
def load_texture
|
167
|
-
png =
|
170
|
+
png = ChunkyPNG::Image.from_file(File.expand_path('../NeHe.png', __FILE__))
|
171
|
+
|
168
172
|
height = png.height
|
169
173
|
width = png.width
|
170
174
|
|
171
|
-
image = png.
|
175
|
+
image = png.to_rgba_stream.each_byte.to_a
|
172
176
|
|
173
177
|
@textures = glGenTextures 1
|
174
178
|
glBindTexture GL_TEXTURE_2D, @textures[0]
|
@@ -180,4 +184,3 @@ class Lesson06
|
|
180
184
|
end
|
181
185
|
|
182
186
|
Lesson06.new
|
183
|
-
|