[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Re: Embedded Ruby and OpenGL

Frank Davis

7/26/2006 10:25:00 PM

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

-----Original Message-----
From: list-bounce@example.com [mailto:list-bounce@example.com] On Behalf
Of Matthew Carlin
Sent: Wednesday, July 26, 2006 2:28 PM
To: ruby-talk ML
Subject: Embedded Ruby and OpenGL


Hi all,

This is my first post on the Ruby forum/mailing list, so I apologize if
I'm doing anything out of turn.

I've been playing with Yoshi's OpenGL, and I'm wondering, is there any
way to make it work with Embedded Ruby in a browser? If not, are we
talking "someone could write a Firefox extension" or are we talking
"this is just fundamentally impossible"? (I don't really know anything
about how Firefox renders things or how browser extensions are written)

Thanks much,
Matthew Carlin

--
Posted via http://www.ruby-....


2 Answers

Matthew Carlin

7/26/2006 10:41:00 PM

0

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 :-)

Thanks much,
Matthew Carlin

--
Posted via http://www.ruby-....

Suraj Kurapati

7/27/2006 1:12:00 AM

0

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

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