module SDL2::Video::Drivers

Abstract enumeration of SDL’s VideoDrivers concept.

Public Class Methods

[](index) click to toggle source

Returns the name of the video driver

# File lib/sdl2/video.rb, line 86
def self.[](index)
  SDL2.get_video_driver(index)
end
each(&block) click to toggle source

Enumerates the drivers

# File lib/sdl2/video.rb, line 91
def self.each(&block)
  self.lazy(&block)
end
lazy(&block) click to toggle source

Constructs a ?lazy? enumerator

# File lib/sdl2/video.rb, line 96
def self.lazy(&block)
  self.num.times.lazy.map{|idx|self[idx]}.each(&block)
end
num() click to toggle source

Returns the number of video drivers available.

# File lib/sdl2/video.rb, line 81
def self.num
  SDL2.get_num_video_drivers!()
end