opengl-core 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/ext/opengl-core/extconf.rb +3 -0
- data/ext/opengl-core/opengl_stub.c +51 -0
- data/lib/opengl-core/gl_commands.rb +6085 -0
- data/lib/opengl-core/gl_enums.rb +1284 -0
- data/lib/opengl-core/gl_sym.rb +26 -0
- data/lib/opengl-core.rb +7 -0
- metadata +65 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 44e9ae0b9f4bed98e111a6269b4103e3d005ca12
|
4
|
+
data.tar.gz: cbd5ca2b3d798587ca1d9521dfff8395a44a6033
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 02c89106276e703f377b218f60150056b39f73a268ebc825a2a47dfabca9b7309354ba05a8db1a4f063792ad3932a5050874442208ec4fd46dd6ae36cd0a85b2
|
7
|
+
data.tar.gz: 0717bb4a70bf64a1d883d8b9a4f518b241f3d0f66c46a2e1c15aea8bbdb1131dee056bf383121184f9f5b2fdf989e70131ecfbf50c61b7df54493c723501c6a4
|
@@ -0,0 +1,51 @@
|
|
1
|
+
#include "ruby.h"
|
2
|
+
|
3
|
+
|
4
|
+
static VALUE plat_is_apple(VALUE self)
|
5
|
+
{
|
6
|
+
#if defined(__APPLE__)
|
7
|
+
return Qtrue;
|
8
|
+
#else
|
9
|
+
return Qfalse;
|
10
|
+
#endif
|
11
|
+
}
|
12
|
+
|
13
|
+
|
14
|
+
static VALUE plat_is_windows(VALUE self)
|
15
|
+
{
|
16
|
+
#if defined(_WIN32) || defined(__MINGW32__) || defined(__CYGWIN__)
|
17
|
+
return Qtrue;
|
18
|
+
#else
|
19
|
+
return Qfalse;
|
20
|
+
#endif
|
21
|
+
}
|
22
|
+
|
23
|
+
|
24
|
+
static VALUE plat_is_unix(VALUE self)
|
25
|
+
{
|
26
|
+
#if defined(__unix) || defined(__unix__) || defined(unix) || defined(__APPLE__)
|
27
|
+
return Qtrue;
|
28
|
+
#else
|
29
|
+
return Qfalse;
|
30
|
+
#endif
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
static VALUE plat_is_linux(VALUE self)
|
35
|
+
{
|
36
|
+
#if defined(__linux__) || defined(linux) || defined(__linux)
|
37
|
+
return Qtrue;
|
38
|
+
#else
|
39
|
+
return Qfalse;
|
40
|
+
#endif
|
41
|
+
}
|
42
|
+
|
43
|
+
|
44
|
+
void Init_opengl_stub(void)
|
45
|
+
{
|
46
|
+
VALUE module = rb_define_module("GlSym");
|
47
|
+
rb_define_singleton_method(module, "apple?", plat_is_apple, 0);
|
48
|
+
rb_define_singleton_method(module, "windows?", plat_is_windows, 0);
|
49
|
+
rb_define_singleton_method(module, "unix?", plat_is_unix, 0);
|
50
|
+
rb_define_singleton_method(module, "linux?", plat_is_linux, 0);
|
51
|
+
}
|