A Ruby interface to the Raspberry Pi OpenGL libraries
Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
examples
lib
README.md

README.md

raspi-opengl

An interface to the Raspberry Pi OpenGL libraries for Ruby using FFI.

Status

Initial Ruby FFI implementations of bcm_host.h, EGL/egl.h, and GLES/gl.h are done, and a utility class RaspiGL has been implemented. In the examples directory you can find hello_triangle_original.rb, which is a straight port of the C hello_triangle example, and hello_triangle_rubified.rb, which is written to use the RaspiGL utility class.

Usage

Something like this:

require 'raspigl'   # Will need load path mod until the Gem is done

class MyProject < RaspiGL
  def setup
    # Insert code to setup your models, load textures, etc
  end

  def tick
    # Called by the program loop - insert code to redraw your scene here
  end
end

my_project= Myproject.new
my_project.start

See examples/hello_triangle_rubified.rb to see this in action.

Todo

  • Gemspec
  • GLES2
  • More examples

-- Phil Stewart June 2012