Ruby/GLEW just went through its first public release, yay!

Ruby/GLEW provides bindings for the OpenGL Extension Wrangler Library (
http://glew.sf.net ), making it possible to use OpenGL extensions like
shaders and rectangular textures from Ruby.

Included in this version are OpenGL extension constants for the GL
module, shader support, and untested support for the framebuffer object
extension (untested because my vidcard drivers don't support it.)

Only tested on Linux.


Project page:
http://rubyforge.org/projects/rubyglew/

Downloads:
http://rubyforge.org/frs/?group_id=715


README
---
Ruby/GLEW 
---------
2005-05-30
0.0.1

Ruby bindings for the GL Extensions Wrangler library.
You need GLEW installed to build this extension.

http://glew.sourceforge.net

You also need Ruby OpenGL bindings to use the extensions.

http://www2.giganet.net/~yoshi/ (included in the win32 installer afaik)


See INSTALL for installation instructions.

Notes:
Only tested on Linux (debian unstable.) OS X support coming soon, win32 when
someone provides binaries.


Supported extensions: 
---
ARB_shader_objects
EXT_framebuffer_object (note: No arg error checking yet, so crash-happy. 
                              Not to mention that there aren't (m)any 
                              drivers with support for this. Which is
                              also why I couldn't test if it works right
                              or not.)
Any extensions that don't introduce new procedures (e.g. TEXTURE_RECTANGLE_ARB)


Usage:
---
require 'opengl'
require 'glut'
require 'glew'

# You need to initialize GL before GLEW
GLUT.Init
GLUT.InitDisplayMode(GLUT::DEPTH | GLUT::DOUBLE | GLUT::RGBA)
GLUT.CreateWindow

GLEW.Init
GLEW.IsSupported("GL_ARB_texture_rectangle") 
#=> true (depends on whether your driver supports it or not..)

GL::TEXTURE_RECTANGLE_ARB
#=> 34037

# let's set up a shader
vs = GL.CreateShaderObjectARB(GL::VERTEX_SHADER_ARB)
fs = GL.CreateShaderObjectARB(GL::FRAGMENT_SHADER_ARB)
pr = GL.CreateProgramObjectARB

GL.ShaderSourceARB(vs, [ File.read("shader.vert") ])
GL.ShaderSourceARB(fs, [ File.read("shader.frag") ])

[vs, fs].each{|sh|
  GL.CompileShaderARB(sh)
  GL.AttachObjectARB(pr, sh)
}

GL.LinkProgramARB(pr)
GL.UseProgramObjectARB(pr)


Version 0.0.1
---
Initial release.
Support for shaders (tested) and framebuffer objects (untested.)
Added extension constants to GL module.
Query supported extensions via GLEW.IsSupported(extname).


License: Licensed under the same terms as Ruby.

Author: Ilmari Heikkinen
        kig at misfiring net