Ruby‎ > ‎

ruby-opengl for VC++2010

[English | Japanese]
A modified version of 'ruby-opengl-0.60.1.gem'.
Last Modified : Jun 13, 2010
Since : Dec 23, 2009

Download

ruby-opengl-0.60.1_ForVC++2010-20100613.7z

Points

Original file is available as '[FILENAME].orig'.
  • modified for use with Ruby 1.9.2-preview3 / Visual C++ 2010.
    • The 'typedef's in ./ext/common/gl-types.h:
      • 'int64_t' and
      • 'uint64_t'
        are also defined at include/ruby-1.9.1/i386-mswin32_100/ruby/config.h.
        So these two are commented out.
  • deprecated macros are replaced with new APIs:
    • STR2CSTR → StringValueCStr
  • All 'mkrf_conf.rb' are removed.
    • mkrf (http://rubyforge.org/projects/mkrf/) seems not maintained.
    • All 'Rakefile's are also removed from this archive.
    • These are replaced with extconf.rb and build.{bat|sh}.

Configurations

  • OS : Windows Vista SP2
  • Visual C++ 2010 Express Edition
    • Shell : Visual Studio 2010 Command Prompt
    • OpenGL-related headers and libraries:
      • c:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\gl\{GL|GLU|glut}.h
      • c:\Program Files\Microsoft SDKs\Windows\v6.0A\Lib\{OpenGL32|GlU32|glut32}.lib
      • These headers/libraries are from freeglut-2.6.0 : http://freeglut.sourceforge.net/
  • Ruby
    > ruby -v
    ruby 1.9.2dev (2010-05-31 revision 28117) [i386-mswin32_100]


Build and Installation

Visual C++ 2010 Express Edition
  • Select "Visual C++ 10.0 Express > Visual Studio Command Prompt (2010)" from Start menu.
  • run 'build.bat'.
  • glut32.dll must be placed at the same place where ruby.exe is installed, or somewhere in the execution path.
Cygwin gcc

  • $ ./build.sh
Other OS (Linux, OSX)

It might be possible to build libraries by fixing compiler options written in :
  • ./ext/gl/extconf.rb
  • ./ext/glu/extconf.rb
  • ./ext/glut/extconf.rb
  • ./extconf.rb

Reference

The ruby-opengl project

Other Information

GL Excess / Ruby may be useful to check your installation.
Comments