rubygl 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/lib/rubygl.rb ADDED
@@ -0,0 +1,48 @@
1
+ require 'ffi'
2
+ require 'rbconfig'
3
+
4
+ # OS Detection
5
+ def os
6
+ @os ||= (
7
+ host_os = RbConfig::CONFIG['host_os']
8
+
9
+ case host_os
10
+ when /mswin|msys|mingw|cygwin|bccwin|wince|emc/
11
+ :windows
12
+ when /darwin|mac os/
13
+ :macosx
14
+ when /linux/
15
+ :linux
16
+ when /solaris|bsd/
17
+ :unix
18
+ else
19
+ raise Error::WebDriverError, "unknown os: #{host_os.inspect}"
20
+ end
21
+ )
22
+ end
23
+
24
+ def relative_path(resource_path)
25
+ File.join(File.dirname(File.expand_path(__FILE__)), resource_path)
26
+ end
27
+
28
+ # Initialize All Modules
29
+ module RubyGL
30
+ module Native
31
+ extend FFI::Library
32
+ ffi_lib relative_path("../ext/#{os.to_s}/SDL2.dll")
33
+ ffi_lib relative_path("../ext/#{os.to_s}/RubyGL.so")
34
+ end
35
+ end
36
+
37
+ # Load Module Code
38
+ require_relative './rubygl/geometry'
39
+ require_relative './rubygl/math'
40
+ require_relative './rubygl/memory'
41
+ require_relative './rubygl/setup'
42
+ require_relative './rubygl/shader'
43
+ require_relative './rubygl/util'
44
+
45
+ require_relative './rubygl/native/window'
46
+ require_relative './rubygl/native/glcontext'
47
+ require_relative './rubygl/native/input'
48
+ require_relative './rubygl/native/opengl'
metadata ADDED
@@ -0,0 +1,92 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: rubygl
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Andrew Miller
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-11-22 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: ffi
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: "This library provides you with all of the essentials for \n doing graphics
28
+ programming in Ruby including windowing, context management, \n 1:1 mapping of
29
+ OpenGL calls, and input handling. The backend of this library \n consists of FFI
30
+ functions with 1:1 mapping to the C code that makes all of this \n possible. The
31
+ frontend of this library provides abstractions for interacting with\n the backend
32
+ functionality so that you do not have to deal with the manual memory\n management
33
+ from within Ruby that the backend requires."
34
+ email:
35
+ - millera9@seattleu.edu
36
+ executables: []
37
+ extensions: []
38
+ extra_rdoc_files: []
39
+ files:
40
+ - LICENSE
41
+ - Rakefile
42
+ - RubyGL.gemspec
43
+ - bin/ffi_code_gen.rb
44
+ - bin/gl_code_gen.rb
45
+ - examples/faceted_example.rb
46
+ - examples/instanced_example.rb
47
+ - examples/phong_example.rb
48
+ - ext/windows/RubyGL.so
49
+ - ext/windows/SDL2.dll
50
+ - lib/RubyGL/Native/glcontext.rb
51
+ - lib/RubyGL/Native/include/GLContext.h
52
+ - lib/RubyGL/Native/include/Input.h
53
+ - lib/RubyGL/Native/include/Window.h
54
+ - lib/RubyGL/Native/input.rb
55
+ - lib/RubyGL/Native/opengl.rb
56
+ - lib/RubyGL/Native/src/GLContext.c
57
+ - lib/RubyGL/Native/src/Input.c
58
+ - lib/RubyGL/Native/src/Window.c
59
+ - lib/RubyGL/Native/window.rb
60
+ - lib/RubyGL/callback.rb
61
+ - lib/RubyGL/geometry.rb
62
+ - lib/RubyGL/math.rb
63
+ - lib/RubyGL/memory.rb
64
+ - lib/RubyGL/setup.rb
65
+ - lib/RubyGL/shader.rb
66
+ - lib/RubyGL/util.rb
67
+ - lib/rubygl.rb
68
+ homepage: https://github.com/GGist/RubyGL
69
+ licenses:
70
+ - MIT
71
+ metadata: {}
72
+ post_install_message:
73
+ rdoc_options: []
74
+ require_paths:
75
+ - lib
76
+ required_ruby_version: !ruby/object:Gem::Requirement
77
+ requirements:
78
+ - - '>='
79
+ - !ruby/object:Gem::Version
80
+ version: '0'
81
+ required_rubygems_version: !ruby/object:Gem::Requirement
82
+ requirements:
83
+ - - '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ requirements: []
87
+ rubyforge_project:
88
+ rubygems_version: 2.0.14
89
+ signing_key:
90
+ specification_version: 4
91
+ summary: A Complete Solution For Graphics Programming In Ruby
92
+ test_files: []