[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

openGL documention?

bas wilbers

3/31/2006 12:44:00 PM

hello,
lately is was experimenting a bit with ruby-opengl,
It works a little bit and I found a few things already,
but It would go much faster with documentation the examples only is not
enough plus not evrything is there problably.
I did found a very good guide on GLprogramming.com but it was for normal
opengl not the ruby one, most of the things said there are usefull, but
there are also a lot of things I cannot get to work as they say it
should with ruby-opengl.
does somebody now if there is anything like documentation of rubyopengl
or a reference or something or better #commented examples.

thanks in advance
bas wilbers


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


14 Answers

anne001

3/31/2006 8:58:00 PM

0

In my experience the ruby openGl have been just like their "normal"
counterpart.
what did you have trouble with?

john_sips_tea

3/31/2006 9:16:00 PM

0

Just for some background, here on Debian Etch I can apt-get install
libopengl-ruby (the package which supplies ruby-opengl:
http://www2.giganet.n... ). To install it, it pulls in freeglut3
also. It gives you opengl.so and glut.so. The readme does not seem to
be available in english.

I notice that, for writing games with Ruby, RubyGame (
http://rubygame... ) makes use of ruby-opengl as well. It's docs
have this to say:

| Please note that Rubygame itself does not provide an interface
| to OpenGL functions - only functions which allow Rubygame to
| work together with OpenGL. You will need to use another library,
| for example ruby-opengl, to actually create graphics with OpenGL.

There's a bit more to say on Ruby + OpenGL at the wiki:
http://www.rubygarden.org/r...

Would someone mind posting a translation of the README.EUC here?
Thanks,
---John

Gary Watson

4/1/2006 4:18:00 AM

0

bas wilbers wrote:
> hello,
> lately is was experimenting a bit with ruby-opengl,
> It works a little bit and I found a few things already,
> but It would go much faster with documentation the examples only is not
> enough plus not evrything is there problably.
> I did found a very good guide on GLprogramming.com but it was for normal
> opengl not the ruby one, most of the things said there are usefull, but
> there are also a lot of things I cannot get to work as they say it
> should with ruby-opengl.
> does somebody now if there is anything like documentation of rubyopengl
> or a reference or something or better #commented examples.
>
> thanks in advance
> bas wilbers


checkout this site http://nehe.ga...

it has tutorials for opengl, the neat thing is that the tutorials are
duplicated for almost every language imaginable. There are ruby
examples on that web site.

Hope this helps
Gary

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


Ilmari Heikkinen

4/1/2006 4:28:00 AM

0

On 4/1/06, john_sips_tea@yahoo.com <john_sips_tea@yahoo.com> wrote:> Just for some background, here on Debian Etch I can apt-get install> libopengl-ruby (the package which supplies ruby-opengl:> http://www2.giganet.n... ). To install it, it pulls in freeglut3> also. It gives you opengl.so and glut.so. The readme does not seem to> be available in english.> Would someone mind posting a translation of the README.EUC here?> Thanks,> ---JohnIt's out of date, but here goes, with the help of wwwjdic:opengl extension moduleThis module is for using OpenGL+glut from ruby.Due to the implementation still being incomplete,use it with the awareness that there is a greatnumber of bugs and functions that can't be used.This module has been tested with ruby-1.4.3 onirix6.5+glut3.7.External dependencies: OpenGL(Mesa)+glut.Installingcopy opengl.0.3.tgz into ruby's directory andexecute the following commands: gzip -dc opengl.0.3.tgz | tar xvf - cd ruby-gl ruby extconf.rb makeUsageFor using GL, GLU: require "opengl"For using GLUT: require "glut"For more details, consult the source filesin the sample directory.Note: if a sample app crashes with an X error,comment out the line with have_library("pthread","pthread_create")in extconf.rb, recompile the module, and try again.Send bug reports, opinions about the module, etc.to one of the following, please: [contact infos]Most of the work was done by yashi. Muchos gracias (???)

john_sips_tea

4/1/2006 5:57:00 AM

0


Ilmari Heikkinen wrote:
> On 4/1/06, john_sips_tea@yahoo.com <john_sips_tea@yahoo.com> wrote:
> [snip]
>
> > Would someone mind posting a translation of the README.EUC here?
> > Thanks,
> > ---John
>
> It's out of date, but here goes, with the help of wwwjdic:
>
>
> [snip]
>
> Most of the work was done by yashi. Muchos gracias (???)

Thanks!

bas wilbers

4/1/2006 9:34:00 AM

0

Gary Watson wrote:
> bas wilbers wrote:
>> hello,
>> lately is was experimenting a bit with ruby-opengl,
>> It works a little bit and I found a few things already,
>> but It would go much faster with documentation the examples only is not
>> enough plus not evrything is there problably.
>> I did found a very good guide on GLprogramming.com but it was for normal
>> opengl not the ruby one, most of the things said there are usefull, but
>> there are also a lot of things I cannot get to work as they say it
>> should with ruby-opengl.
>> does somebody now if there is anything like documentation of rubyopengl
>> or a reference or something or better #commented examples.
>>
>> thanks in advance
>> bas wilbers
>
>
> checkout this site http://nehe.ga...
>
> it has tutorials for opengl, the neat thing is that the tutorials are
> duplicated for almost every language imaginable. There are ruby
> examples on that web site.
thank you for this site it looks good, but there are no ruby examples
there, only on one tutorial and that link is broken, I googled the site
for ruby and again only that broken link was found.
>
> Hope this helps
but they do help cuase there is a lot of information on the site but
still not really what I was looking for.
thanks for your post

> Gary


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


anne001

4/1/2006 10:19:00 AM

0

what are you looking for. Can you give a specific example?

bas wilbers

4/2/2006 8:16:00 PM

0

anne001 wrote:
> what are you looking for. Can you give a specific example?

well the camera stuff, and how can I make that a cube gets smaller when
it's further away. also the texture part is weird I know how it works
but when I rotate the object it does weird stuff.

mostly the camera part is what I was looking for.

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


anne001

4/2/2006 9:09:00 PM

0

bas wilbers

4/4/2006 3:39:00 PM

0

> include GL
thank you for your example
> loop do
> MatrixMode(PROJECTION)
> LoadIdentity()
> Perspective(
> camera.fov,
> viewport.width.to_f / viewport.height,
> camera.near_clip,
> camera.far_clip)
error = undefined local variable or
method `camera' for main:Object (NameError)

do I have to make the camera or something, I'm sorry but I want to get
it working. but it wont
> MatrixMode(MODELVIEW)
> LoadIdentity()
> LookAt(
> camera.position,
> camera.looking_at,
> camera.up_vector)
>
> call_frame_handlers_to_update_scene_and_camera
>
> draw scene
>
> swap_buffers
> end
>


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