Module: Mittsu::GenericLib

Included in:
GLFWLib, OpenGLLib
Defined in:
lib/mittsu/renderers/generic_lib.rb

Defined Under Namespace

Classes: Base, Linux

Instance Method Summary collapse

Instance Method Details

#discoverObject



3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'lib/mittsu/renderers/generic_lib.rb', line 3

def discover
  case OpenGL.get_platform
  when :OPENGL_PLATFORM_WINDOWS
    self::Windows.new
  when :OPENGL_PLATFORM_MACOSX
    self::MacOS.new
  when :OPENGL_PLATFORM_LINUX
    self::Linux.new
  else
    warn "WARNING: Unsupported platform: #{OpenGL.get_platform}"
    Base.new
  end
end