opengl 0.8.0-x86-mingw32 → 0.9.0-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +1 -0
  3. data.tar.gz.sig +2 -0
  4. data/.gitignore +2 -1
  5. data/.travis.yml +19 -0
  6. data/History.rdoc +26 -0
  7. data/Manifest.txt +3 -23
  8. data/README.rdoc +43 -37
  9. data/Rakefile +6 -62
  10. data/examples/NeHe/nehe_lesson02.rb +3 -2
  11. data/examples/NeHe/nehe_lesson03.rb +3 -2
  12. data/examples/NeHe/nehe_lesson04.rb +3 -1
  13. data/examples/NeHe/nehe_lesson05.rb +4 -1
  14. data/examples/NeHe/nehe_lesson06.rb +9 -6
  15. data/examples/NeHe/nehe_lesson07.rb +9 -6
  16. data/examples/NeHe/nehe_lesson08.rb +9 -6
  17. data/examples/NeHe/nehe_lesson09.rb +10 -6
  18. data/examples/NeHe/nehe_lesson11.rb +9 -6
  19. data/examples/NeHe/nehe_lesson12.rb +9 -6
  20. data/examples/NeHe/nehe_lesson16.rb +50 -47
  21. data/examples/NeHe/nehe_lesson19.rb +10 -7
  22. data/examples/NeHe/nehe_lesson36.rb +234 -229
  23. data/examples/OrangeBook/brick.rb +227 -225
  24. data/examples/OrangeBook/particle.rb +233 -231
  25. data/examples/RedBook/aapoly.rb +71 -70
  26. data/examples/RedBook/aargb.rb +54 -52
  27. data/examples/RedBook/accanti.rb +96 -94
  28. data/examples/RedBook/accpersp.rb +106 -104
  29. data/examples/RedBook/alpha.rb +54 -52
  30. data/examples/RedBook/alpha3D.rb +90 -88
  31. data/examples/RedBook/bezcurve.rb +48 -46
  32. data/examples/RedBook/bezmesh.rb +71 -69
  33. data/examples/RedBook/checker.rb +57 -55
  34. data/examples/RedBook/clip.rb +41 -39
  35. data/examples/RedBook/colormat.rb +72 -70
  36. data/examples/RedBook/cube.rb +39 -37
  37. data/examples/RedBook/depthcue.rb +37 -35
  38. data/examples/RedBook/dof.rb +110 -109
  39. data/examples/RedBook/double.rb +40 -38
  40. data/examples/RedBook/drawf.rb +30 -28
  41. data/examples/RedBook/feedback.rb +79 -77
  42. data/examples/RedBook/fog.rb +90 -89
  43. data/examples/RedBook/font.rb +78 -76
  44. data/examples/RedBook/hello.rb +29 -27
  45. data/examples/RedBook/image.rb +57 -55
  46. data/examples/RedBook/jitter.rb +131 -131
  47. data/examples/RedBook/light.rb +2 -1
  48. data/examples/RedBook/lines.rb +70 -68
  49. data/examples/RedBook/list.rb +48 -46
  50. data/examples/RedBook/material.rb +200 -199
  51. data/examples/RedBook/mipmap.rb +84 -82
  52. data/examples/RedBook/model.rb +55 -53
  53. data/examples/RedBook/movelight.rb +52 -50
  54. data/examples/RedBook/pickdepth.rb +103 -101
  55. data/examples/RedBook/planet.rb +46 -44
  56. data/examples/RedBook/quadric.rb +97 -95
  57. data/examples/RedBook/robot.rb +55 -53
  58. data/examples/RedBook/select.rb +118 -116
  59. data/examples/RedBook/smooth.rb +35 -33
  60. data/examples/RedBook/stencil.rb +96 -94
  61. data/examples/RedBook/stroke.rb +75 -73
  62. data/examples/RedBook/surface.rb +93 -91
  63. data/examples/RedBook/teaambient.rb +71 -69
  64. data/examples/RedBook/teapots.rb +105 -103
  65. data/examples/RedBook/tess.rb +96 -94
  66. data/examples/RedBook/texbind.rb +79 -77
  67. data/examples/RedBook/texgen.rb +88 -86
  68. data/examples/RedBook/texturesurf.rb +57 -55
  69. data/examples/RedBook/varray.rb +85 -83
  70. data/examples/RedBook/wrap.rb +76 -74
  71. data/examples/misc/OGLBench.rb +114 -113
  72. data/examples/misc/anisotropic.rb +154 -152
  73. data/examples/misc/fbo_test.rb +37 -36
  74. data/examples/misc/font-glut.rb +47 -46
  75. data/examples/misc/glfwtest.rb +16 -16
  76. data/examples/misc/plane.rb +13 -13
  77. data/examples/misc/readpixel.rb +66 -65
  78. data/examples/misc/sdltest.rb +21 -19
  79. data/examples/misc/trislam.rb +548 -547
  80. data/ext/opengl/common.h +16 -38
  81. data/ext/opengl/conv.h +39 -41
  82. data/ext/opengl/extconf.rb +4 -31
  83. data/ext/opengl/funcdef.h +126 -124
  84. data/ext/opengl/gl-1.0-1.1.c +1917 -1917
  85. data/ext/opengl/gl-1.2.c +4 -667
  86. data/ext/opengl/gl-1.3.c +9 -9
  87. data/ext/opengl/gl-1.4.c +8 -8
  88. data/ext/opengl/gl-1.5.c +1 -1
  89. data/ext/opengl/gl-2.0.c +392 -388
  90. data/ext/opengl/gl-3.0.c +493 -0
  91. data/ext/opengl/gl-enums.c +1523 -5
  92. data/ext/opengl/gl-enums.h +4679 -122
  93. data/ext/opengl/gl-error.c +7 -7
  94. data/ext/opengl/gl-error.h +4 -4
  95. data/ext/opengl/gl-ext-arb.c +468 -464
  96. data/ext/opengl/gl-ext-ext.c +18 -18
  97. data/ext/opengl/gl-ext-nv.c +15 -15
  98. data/ext/opengl/gl.c +2 -0
  99. data/ext/opengl/gl_buffer.c +92 -92
  100. data/ext/opengl/opengl.c +1 -7
  101. data/lib/opengl.rb +23 -59
  102. data/lib/opengl/1.9/opengl.so +0 -0
  103. data/lib/opengl/2.0/opengl.so +0 -0
  104. data/lib/opengl/2.1/opengl.so +0 -0
  105. data/lib/opengl/test_case.rb +1 -2
  106. data/test/dummy.xorg.conf +140 -0
  107. data/test/test_gl.rb +18 -22
  108. data/test/test_gl_10_11.rb +220 -220
  109. data/test/test_gl_12.rb +11 -122
  110. data/test/test_gl_13.rb +202 -210
  111. data/test/test_gl_14.rb +16 -19
  112. data/test/test_gl_15.rb +2 -4
  113. data/test/test_gl_20.rb +45 -58
  114. data/test/test_gl_21.rb +46 -163
  115. data/test/test_gl_ext_arb.rb +54 -72
  116. data/test/test_gl_ext_ati.rb +0 -2
  117. data/test/test_gl_ext_ext.rb +66 -66
  118. data/test/test_gl_ext_gremedy.rb +8 -15
  119. data/test/test_gl_ext_nv.rb +109 -112
  120. data/test/test_opengl_buffer.rb +8 -25
  121. data/utils/README +0 -5
  122. data/utils/enumgen.rb +72 -76
  123. data/utils/extlistgen.rb +55 -55
  124. metadata +90 -67
  125. metadata.gz.sig +0 -0
  126. data/Rakefile.cross +0 -107
  127. data/docs/build_install.txt +0 -119
  128. data/docs/extensions.txt.in +0 -348
  129. data/docs/history.txt +0 -66
  130. data/docs/requirements_and_design.txt +0 -117
  131. data/docs/roadmap.txt +0 -28
  132. data/docs/scientific_use.txt +0 -35
  133. data/docs/supplies/page_template.html +0 -71
  134. data/docs/thanks.txt +0 -29
  135. data/docs/tutorial.txt +0 -469
  136. data/ext/opengl/glu-enums.c +0 -164
  137. data/ext/opengl/glu-enums.h +0 -463
  138. data/ext/opengl/glu.c +0 -1534
  139. data/ext/opengl/glut.c +0 -1145
  140. data/ext/opengl/glut_callbacks.c +0 -845
  141. data/lib/glu.rb +0 -1
  142. data/lib/glut.rb +0 -1
  143. data/lib/opengl/opengl.so +0 -0
  144. data/test/test_glu.rb +0 -309
  145. data/utils/mkdn2html.rb +0 -59
  146. data/utils/post-mkdn2html.rb +0 -91
  147. data/website/images/ogl.jpg +0 -0
  148. data/website/images/tab_bottom.gif +0 -0
  149. data/website/style.css +0 -198
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a79c59b4c459330ac73e9117da0f5b7804d97e4c
4
+ data.tar.gz: b64259e8b64d668dcff32ab335168ee3ad00f0c2
5
+ SHA512:
6
+ metadata.gz: 2b4abaeda0ba02ecb45a882a0a4102083449823a2a8452a0978944039be1759788217a7c684dded7ca1eb9d4da0838d7988283245a18ceff4ab7b38fe58b7693
7
+ data.tar.gz: 3f9d52d057644306efea5cecff5e32fd2c83f9fa938dd2a10b89d1553d7b275ccc4b9e6d316259327728f5647cd80b746da54b546a546d72886114bfdfbac01d
@@ -0,0 +1 @@
1
+ #9���K���dI��%E�oy�jN,�= ��DY��U�����ظQ��\��c��_���K�
@@ -0,0 +1,2 @@
1
+ "�R(�"�2�og���}�� H���c�*鴺n�CEc�l�-?+r"*o��� ��- ]v��s�WDV;dP�c���Gl� �w�^���kOȑ$A�s�\\��1`��0���t��,;f��^��M���>d[�r��9T��
2
+ x�W��Fg,ֹ�k� )#a�Y�h2ܨs���͐AF�UFclbkn���5�o>���d:ӔBn�Q��׾�>�p�i=�`S�y����j���ZƐ�����J 3�2�%�`
data/.gitignore CHANGED
@@ -1,5 +1,6 @@
1
1
  *.swp
2
2
  /TAGS
3
- /lib/opengl/opengl.bundle
3
+ /lib/opengl/*.so
4
+ /lib/opengl/*.bundle
4
5
  /pkg
5
6
  /tmp
@@ -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/*"
@@ -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.
@@ -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
@@ -1,18 +1,24 @@
1
1
  = opengl
2
2
 
3
- source :: https://github.com/drbrain/opengl
4
- docs :: http://ruby-opengl.rubyforge.org
5
- bugs :: https://github.com/drbrain/opengl/issues
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. ruby-opengl contains bindings for OpenGL and the
11
- GLU and GLUT libraries.
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, OS-X
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
- * proper OpenGL, GLU and (free-)GLUT development files installed
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 on a Linux or MacOS X
44
- host for the win32 platform. The generated gem is statically linked against
45
- libfreeglut. Freeglut is downloaded and compiled from the sources.
46
- There are no runtime dependencies to any but the standard Windows
47
- DLLs.
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) Eric Hodel (current maintainer)
73
- Copyright (c) Alain Hoang (previous maintainer)
74
- Copyright (c) Jan Dvorak (contributor)
75
- Copyright (c) Minh Thu Vo (contributor)
76
- Copyright (c) James Adam (contributor)
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 -rubygems
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 -rubygems
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 -rubygems
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,4 +1,8 @@
1
+ #!/usr/bin/env ruby
2
+
1
3
  require 'opengl'
4
+ require 'glu'
5
+ require 'glut'
2
6
 
3
7
  class Lesson05
4
8
  include Gl
@@ -176,4 +180,3 @@ class Lesson05
176
180
  end
177
181
 
178
182
  Lesson05.new if $0 == __FILE__
179
-
@@ -1,6 +1,9 @@
1
+ #!/usr/bin/env ruby
2
+
1
3
  require 'opengl'
2
- require 'png'
3
- require 'png/reader'
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 = PNG.load_file File.expand_path('../NeHe.png', __FILE__)
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.data.flatten.map { |c| c.values }.join
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
-