ruby-opengl 0.33.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/ext/gl/gl.c ADDED
@@ -0,0 +1,31 @@
1
+ /*
2
+ * Copyright (C) 1999 - 2005 Yoshi <yoshi@giganet.net>
3
+ * Copyright (C) 2006 John M. Gabriele <jmg3000@gmail.com>
4
+ *
5
+ * This program is distributed under the terms of the MIT license.
6
+ * See the included MIT-LICENSE file for the terms of this license.
7
+ *
8
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11
+ * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
12
+ * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
13
+ * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14
+ * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+ */
16
+
17
+ #include <ruby.h>
18
+
19
+ static VALUE module;
20
+
21
+ void gl_init_enums(VALUE);
22
+ void gl_init_functions_1_0__1_1(VALUE);
23
+ void gl_init_functions_1_2(VALUE);
24
+
25
+ void Init_gl()
26
+ {
27
+ module = rb_define_module("Gl");
28
+ gl_init_enums(module);
29
+ gl_init_functions_1_0__1_1(module);
30
+ gl_init_functions_1_2(module);
31
+ }
@@ -0,0 +1,27 @@
1
+ # extconf.rb for ruby-opengl's gl extension module.
2
+ #
3
+ # Copyright (C) 2006 John M. Gabriele <jmg3000@gmail.com>
4
+ #
5
+ # This program is distributed under the terms of the MIT license.
6
+ # See the included COPYRIGHT file for the terms of this license.
7
+ #
8
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
9
+ # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
10
+ # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
11
+ # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
12
+ # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
13
+ # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
14
+ # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+
16
+ require 'rubygems'
17
+ require 'mkrf'
18
+
19
+ Mkrf::Generator.new( 'gl' ) do |g|
20
+ g.objects << '../common/rbogl.o'
21
+ case RUBY_PLATFORM
22
+ when /darwin/
23
+ g.ldshared << ' -framework OpenGL'
24
+ else
25
+ g.include_library( 'GL', 'glVertex3d')
26
+ end
27
+ end