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.
Just for some background, here on Debian Etch I can apt-get install
libopengl-ruby (the package which supplies ruby-opengl: http://www2.giganet.net/~yoshi/ ). 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.seul.org/ ) 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:
Would someone mind posting a translation of the README.EUC here?
Thanks,
---John
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.
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.
It's out of date, but here goes, with the help of wwwjdic:
opengl extension module
This module is for using OpenGL+glut from ruby.
Due to the implementation still being incomplete,
use it with the awareness that there is a great
number of bugs and functions that can't be used.
This module has been tested with ruby-1.4.3 on
irix6.5+glut3.7.
External dependencies: OpenGL(Mesa)+glut.
Installing
copy opengl.0.3.tgz into ruby's directory and
execute the following commands:
gzip -dc opengl.0.3.tgz | tar xvf -
cd ruby-gl
ruby extconf.rb
make
Usage
For using GL, GLU:
require "opengl"
For using GLUT:
require "glut"
For more details, consult the source files
in 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 (???)
···
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: dfltweb1.onamae.com – このドメインはお名前.comで取得されています。 ). 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,
---John
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.
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
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.
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.
here's the rendering loop for a scene with a
perspective projection camera and double buffering:
include GL
loop do
MatrixMode(PROJECTION)
LoadIdentity()
Perspective(
camera.fov,
viewport.width.to_f / viewport.height,
camera.near_clip,
camera.far_clip)
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
HTH,
Ilmari
···
On 4/2/06, Bas wilbers <baswilbers@gmail.com> wrote:
that's what I mean these are C# code and not ruby, I think there are not
much ruby opengl examples. but there are a lot for C so I think I'm just
gonna learn C.
I believed you can also write libraries/plugins for ruby in C so C will
be cool to improve ruby.
looks like camera is a structure you will have to define/initialize.
yes but how?
Thank you all for your examples and links. although these are C sites
they are very usefull cause I'm gonna learn C.