module RbSDL2::Video

Public Class Methods

current() click to toggle source
# File lib/rb_sdl2/video.rb, line 8
def current
  ptr = ::SDL2.SDL_GetCurrentVideoDriver
  raise RbSDL2Error if ptr.null?
  ptr.read_string
end
drivers() click to toggle source
# File lib/rb_sdl2/video.rb, line 14
def drivers
  ::SDL2.SDL_GetNumVideoDrivers.times.map do |num|
    ptr = ::SDL2.SDL_GetVideoDriver(num)
    raise RbSDL2Error if ptr.null?
    ptr.read_string
  end
end
init(driver = nil) click to toggle source
# File lib/rb_sdl2/video.rb, line 4
def init(driver = nil)
  raise RbSDL2Error if ::SDL2.SDL_VideoInit(driver) < 0
end
quit(= ::SDL2.SDL_VideoQuit) click to toggle source
# File lib/rb_sdl2/video.rb, line 22
  def quit = ::SDL2.SDL_VideoQuit
end