Module: Rubydraw

Defined in:
lib/rubydraw.rb,
lib/rubydraw/keys.rb,
lib/rubydraw/image.rb,
lib/rubydraw/point.rb,
lib/rubydraw/sound.rb,
lib/rubydraw/events.rb,
lib/rubydraw/window.rb,
lib/rubydraw/sdl_error.rb,
lib/rubydraw/event_queue.rb

Overview

Rubydraw is a high level game/graphics library, like Gosu or Rubygame, and is written completely in Ruby. Its only dependency is ruby-sdl-ffi, which it uses to access SDL functions.

NOTE: I can’t get ruby-sdl-ffi (the library Rubydraw uses to access SDL) to work with Ruby 1.9.2, so I don’t know if it even does. If it does work, and/or you know how to make it work, I would appreciate it if you notify me. So basically, I can’t test anything with 1.9.2. Sorry for the inconvenience!

Defined Under Namespace

Modules: Events, Keys Classes: EventQueue, Image, Point, SDLError, Sound, Window

Class Method Summary collapse

Class Method Details

.initialize_sdlObject

Initialize SDL.



25
26
27
28
29
# File 'lib/rubydraw.rb', line 25

def self.initialize_sdl
  if SDL::Init(SDL::INIT_EVERYTHING) != 0
    raise DrawError "Could not initialize SDL"
  end
end