[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

[ANN] Ruby/GLEW 0.0.1

Ilmari Heikkinen

5/30/2005 3:10:00 PM

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

Ruby/GLEW provides bindings for the OpenGL Extension Wrangler Library (
http://g... ), 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...

Downloads:
http://rubyforge.org/frs/?gr...


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.sourc...

You also need Ruby OpenGL bindings to use the extensions.

http://www2.giganet.n... (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



1 Answer

onlyme

6/20/2009 6:13:00 PM

0


"Delta" <none@invalid.com> wrote in message
news:pan.2009.06.20.17.52.36@invalid.com...
> On Sat, 20 Jun 2009 18:35:16 +0100, gaz wrote:
>
> > Delta wrote:
> >> On Sat, 20 Jun 2009 18:20:48 +0100, Chris X wrote:
> >>
> >>
> >> I sense you have some beef with BNP leadership... ? explain?
> >
> > It's a character flaw of most left wing organisations, a 'peoples front
> > of judae' thing...
> >
> > Gaz
>
> splitters...
>
> eh... what was that...
>
> peoples front of judea... splitters...
>
> no... we're the peoples front of judea...
>
> :)
>
> 'king awesome... :)



No no no...We're the peoples front of Judea....you're the Judean peoples
front!
Are we all clear now?

(here's your anthem)

Judean People's Front Song:-

There's a man we call our Leader.
He's fine and strong and brave,
And we'll follow him unquestioning
Towards an early grave.
He gives us hope of sacrifice
And a chance to die in vain,
And if we're one of the lucky ones,
We'll live to die again.