0.01
No commit activity in last 3 years
No release in over 3 years
ruby-opengl wrapper for writing quick applets
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 0.60.0
 Project Readme

GLApp – A tiny wrapper for ruby-opengl

It’s simple:

  1. require “glapp”
  2. Include GLApp
  3. Override as many of the callbacks as you need:
  • setup
  • update(seconds)
  • draw
  • keyboard_down(key, modifiers)
  • keyboard_up(key, modifiers)
  • special_keyboard_down(key, modifiers)
  • special_keyboard_up(key, modifiers)
  • mouse_click(button, state, x, y)
  • mouse_dragging_motion(x, y)
  • mouse_passive_motion(x, y)
  • If you need more control, override the default behavior of these:
  • setup_context
  • pre_draw
  • post_draw
  • resize
  • Call show with width, height, title, and whether to be full-screen

Look at the scripts in the examples/ directory.
In fact, here’s one:

require ‘glapp’ class MyGame include GLApp def draw glTranslate(0, 0, -5) glutSolidCube(2) end end MyGame.new.show 800, 600, “My Game”