Re: Embedded Ruby and OpenGL

There’s only one way I can see this working: Develop a plugin for
Firefox, using C / C++, that would operate very similar to the way the
Flash plugin works. Your plugin would have a Ruby interpreter embedded
in it, and support OpenGL rendering onto the space provided for it by
the browser. Your plugin would run a Ruby/OpenGL script the same way the
Flash plugin runs .SWF files.

While this would be a really cool plugin (and I’d definitely use it if
it already existed), I think most people decide just to use one of the
existing alternatives (Flash, Shockwave, SVG, or the nifty new Canvas)
once they see the amount of work involved. Plus, these’s the drawback of
requiring people to install your plugin before your web page will render
correctly – that’s so dot-com!

Frank Davis

Frank Davis wrote:

There’s only one way I can see this working: Develop a plugin for
Firefox, using C / C++, that would operate very similar to the way the
Flash plugin works. Your plugin would have a Ruby interpreter embedded
in it, and support OpenGL rendering onto the space provided for it by
the browser. Your plugin would run a Ruby/OpenGL script the same way the
Flash plugin runs .SWF files.

While this would be a really cool plugin (and I’d definitely use it if
it already existed), I think most people decide just to use one of the
existing alternatives (Flash, Shockwave, SVG, or the nifty new Canvas)
once they see the amount of work involved. Plus, these’s the drawback of
requiring people to install your plugin before your web page will render
correctly – that’s so dot-com!

Frank Davis

Flash is equal parts wonderful and stupid. I’ve never seen this “Canvas”
thing, and I’ll definitely check that out. It’s good to know the Erb /
OGL thing can be done in principle, though I’d say it’s just a bit out
of my league as yet.

As for installing… people do it for things much less cool than 3d
games :slight_smile:

Thanks much,
Matthew Carlin

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Frank Davis wrote:

Your plugin would have a Ruby interpreter embedded in it, and
support OpenGL rendering onto the space provided for it by the
browser.

If you want an example of embedding a Ruby interpreter within a C
program, have a look at my project:

http://ruby-vpi.rubyforge.org/

Basically you run the Ruby interpreter within its own pthread and
then have it execute some Ruby script file. But, make sure that
you never call any Ruby-C-API function from your C program! Only
the Ruby thread is allowed to call the Ruby-C-API.

Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)

iD8DBQFEyBKfmV9O7RYnKMcRAsRPAJ4zeYMmyNf1iknuKRFTbjIeoh93QwCfeOIT
C+cjODdkLTVTzNzyp9Duh0w=
=7o4x
-----END PGP SIGNATURE-----

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs