glut 8.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.autotest +29 -0
- data/.gemtest +0 -0
- data/.gitignore +6 -0
- data/History.rdoc +3 -0
- data/MIT-LICENSE +18 -0
- data/Manifest.txt +16 -0
- data/README.rdoc +77 -0
- data/Rakefile +52 -0
- data/Rakefile.cross +107 -0
- data/ext/glut/common.h +64 -0
- data/ext/glut/extconf.rb +43 -0
- data/ext/glut/glut.c +1150 -0
- data/ext/glut/glut_callbacks.c +845 -0
- data/ext/glut/glut_ext.c +65 -0
- data/lib/glut.rb +26 -0
- data/lib/glut/dummy.rb +2 -0
- metadata +125 -0
data/ext/glut/glut_ext.c
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright (C) 2013 Blaž Hrastnik <speed.the.bboy@gmail.com>
|
3
|
+
*
|
4
|
+
* This program is distributed under the terms of the MIT license.
|
5
|
+
* See the included COPYRIGHT file for the terms of this license.
|
6
|
+
*
|
7
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
8
|
+
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
9
|
+
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
10
|
+
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
11
|
+
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
12
|
+
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
13
|
+
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
14
|
+
*
|
15
|
+
*/
|
16
|
+
|
17
|
+
#include "common.h"
|
18
|
+
|
19
|
+
static VALUE
|
20
|
+
glut_InitContextVersion(obj,majorVersion,minorVersion)
|
21
|
+
VALUE obj,majorVersion,minorVersion;
|
22
|
+
{
|
23
|
+
glutInitContextVersion(NUM2INT(majorVersion), NUM2INT(minorVersion));
|
24
|
+
return Qnil;
|
25
|
+
}
|
26
|
+
|
27
|
+
static VALUE
|
28
|
+
glut_InitContextFlags(obj,flags)
|
29
|
+
VALUE obj,flags;
|
30
|
+
{
|
31
|
+
glutInitContextFlags(NUM2INT(flags));
|
32
|
+
return Qnil;
|
33
|
+
}
|
34
|
+
|
35
|
+
static VALUE
|
36
|
+
glut_InitContextProfile(obj,profile)
|
37
|
+
VALUE obj,profile;
|
38
|
+
{
|
39
|
+
glutInitContextProfile(NUM2INT(profile));
|
40
|
+
return Qnil;
|
41
|
+
}
|
42
|
+
|
43
|
+
void Init_glut_ext() {
|
44
|
+
VALUE mGlut = rb_path2class("Glut");
|
45
|
+
|
46
|
+
rb_define_module_function(mGlut, "glutInitContextVersion", glut_InitContextVersion, 2);
|
47
|
+
rb_define_module_function(mGlut, "glutInitContextFlags", glut_InitContextFlags, 1);
|
48
|
+
rb_define_module_function(mGlut, "glutInitContextFlags", glut_InitContextFlags, 1);
|
49
|
+
|
50
|
+
/* Context-related flags */
|
51
|
+
rb_define_const(mGlut, "GLUT_INIT_MAJOR_VERSION", INT2NUM(GLUT_INIT_MAJOR_VERSION));
|
52
|
+
rb_define_const(mGlut, "GLUT_INIT_MINOR_VERSION", INT2NUM(GLUT_INIT_MINOR_VERSION));
|
53
|
+
rb_define_const(mGlut, "GLUT_INIT_FLAGS", INT2NUM(GLUT_INIT_FLAGS));
|
54
|
+
rb_define_const(mGlut, "GLUT_INIT_PROFILE", INT2NUM(GLUT_INIT_PROFILE));
|
55
|
+
|
56
|
+
/* Flags for glutInitContextFlags */
|
57
|
+
rb_define_const(mGlut, "GLUT_FORWARD_COMPATIBLE", INT2NUM(GLUT_FORWARD_COMPATIBLE));
|
58
|
+
rb_define_const(mGlut, "GLUT_DEBUG", INT2NUM(GLUT_DEBUG));
|
59
|
+
|
60
|
+
/* Flags for glutInitContextProfile */
|
61
|
+
rb_define_const(mGlut, "GLUT_CORE_PROFILE", INT2NUM(GLUT_CORE_PROFILE));
|
62
|
+
rb_define_const(mGlut, "GLUT_COMPATIBILITY_PROFILE", INT2NUM(GLUT_COMPATIBILITY_PROFILE));
|
63
|
+
|
64
|
+
|
65
|
+
}
|
data/lib/glut.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'glut/glut'
|
2
|
+
|
3
|
+
include Glut
|
4
|
+
|
5
|
+
# (Glut.)glutInit -> GLUT.Init
|
6
|
+
# (Glut::)GLUT_RGBA -> GLUT::RGBA
|
7
|
+
module GLUT
|
8
|
+
extend self
|
9
|
+
include Glut
|
10
|
+
|
11
|
+
Glut.constants.each do |cn|
|
12
|
+
n = cn.to_s.sub(/^GLUT_/,'')
|
13
|
+
next if n =~ /^[0-9]/
|
14
|
+
const_set( n, Glut.const_get( cn ) )
|
15
|
+
end
|
16
|
+
|
17
|
+
Glut.methods( false ).each do |mn|
|
18
|
+
n = mn.to_s.sub(/^glut/,'')
|
19
|
+
alias_method( n, mn )
|
20
|
+
public( n )
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
module Glut
|
25
|
+
VERSION = "8.1.0"
|
26
|
+
end
|
data/lib/glut/dummy.rb
ADDED
metadata
ADDED
@@ -0,0 +1,125 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: glut
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 8.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Eric Hodel
|
8
|
+
- Lars Kanis
|
9
|
+
- Blaž Hrastnik
|
10
|
+
- Alain Hoang
|
11
|
+
- Jan Dvorak
|
12
|
+
- Minh Thu Vo
|
13
|
+
- James Adam
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
date: 2013-03-03 00:00:00.000000000 Z
|
18
|
+
dependencies:
|
19
|
+
- !ruby/object:Gem::Dependency
|
20
|
+
name: rdoc
|
21
|
+
requirement: !ruby/object:Gem::Requirement
|
22
|
+
requirements:
|
23
|
+
- - ~>
|
24
|
+
- !ruby/object:Gem::Version
|
25
|
+
version: '3.10'
|
26
|
+
type: :development
|
27
|
+
prerelease: false
|
28
|
+
version_requirements: !ruby/object:Gem::Requirement
|
29
|
+
requirements:
|
30
|
+
- - ~>
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '3.10'
|
33
|
+
- !ruby/object:Gem::Dependency
|
34
|
+
name: rake-compiler
|
35
|
+
requirement: !ruby/object:Gem::Requirement
|
36
|
+
requirements:
|
37
|
+
- - ~>
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0.7'
|
40
|
+
- - '>='
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: 0.7.9
|
43
|
+
type: :development
|
44
|
+
prerelease: false
|
45
|
+
version_requirements: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - ~>
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '0.7'
|
50
|
+
- - '>='
|
51
|
+
- !ruby/object:Gem::Version
|
52
|
+
version: 0.7.9
|
53
|
+
- !ruby/object:Gem::Dependency
|
54
|
+
name: hoe
|
55
|
+
requirement: !ruby/object:Gem::Requirement
|
56
|
+
requirements:
|
57
|
+
- - ~>
|
58
|
+
- !ruby/object:Gem::Version
|
59
|
+
version: '3.5'
|
60
|
+
type: :development
|
61
|
+
prerelease: false
|
62
|
+
version_requirements: !ruby/object:Gem::Requirement
|
63
|
+
requirements:
|
64
|
+
- - ~>
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: '3.5'
|
67
|
+
description: Glut bindings for OpenGL. To be used with the opengl gem.
|
68
|
+
email:
|
69
|
+
- drbrain@segment7.net
|
70
|
+
- ''
|
71
|
+
- speed.the.bboy@gmail.com
|
72
|
+
- ''
|
73
|
+
- ''
|
74
|
+
- ''
|
75
|
+
- ''
|
76
|
+
executables: []
|
77
|
+
extensions:
|
78
|
+
- ext/glut/extconf.rb
|
79
|
+
extra_rdoc_files:
|
80
|
+
- History.rdoc
|
81
|
+
- Manifest.txt
|
82
|
+
- README.rdoc
|
83
|
+
files:
|
84
|
+
- .autotest
|
85
|
+
- .gemtest
|
86
|
+
- .gitignore
|
87
|
+
- History.rdoc
|
88
|
+
- MIT-LICENSE
|
89
|
+
- Manifest.txt
|
90
|
+
- README.rdoc
|
91
|
+
- Rakefile
|
92
|
+
- Rakefile.cross
|
93
|
+
- ext/glut/common.h
|
94
|
+
- ext/glut/extconf.rb
|
95
|
+
- ext/glut/glut.c
|
96
|
+
- ext/glut/glut_callbacks.c
|
97
|
+
- ext/glut/glut_ext.c
|
98
|
+
- lib/glut.rb
|
99
|
+
- lib/glut/dummy.rb
|
100
|
+
homepage:
|
101
|
+
licenses: []
|
102
|
+
metadata: {}
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options:
|
105
|
+
- --main
|
106
|
+
- README.rdoc
|
107
|
+
require_paths:
|
108
|
+
- lib
|
109
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - '>='
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 1.9.2
|
114
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
115
|
+
requirements:
|
116
|
+
- - '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '0'
|
119
|
+
requirements: []
|
120
|
+
rubyforge_project: glut
|
121
|
+
rubygems_version: 2.0.0
|
122
|
+
signing_key:
|
123
|
+
specification_version: 4
|
124
|
+
summary: Glut bindings for OpenGL
|
125
|
+
test_files: []
|