rubygl 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/Gemfile.lock +2 -0
- data/README.md +1 -1
- data/Rakefile +17 -9
- data/bin/ffi_code_gen.rb +11 -3
- data/ext/macosx/RubyGL.so +0 -0
- data/ext/macosx/SDL2.framework/Headers/SDL.h +163 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_assert.h +284 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_atomic.h +260 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_audio.h +506 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_bits.h +97 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_blendmode.h +63 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_clipboard.h +71 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_config.h +55 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_config_macosx.h +184 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_copying.h +20 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_cpuinfo.h +156 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_endian.h +239 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_error.h +76 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_events.h +723 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_filesystem.h +136 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_gamecontroller.h +316 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_gesture.h +87 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_haptic.h +1225 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_hints.h +517 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_joystick.h +253 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_keyboard.h +217 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_keycode.h +341 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_loadso.h +81 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_log.h +211 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_main.h +155 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_messagebox.h +144 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_mouse.h +224 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_mutex.h +251 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_name.h +33 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_opengl.h +11126 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_opengles.h +38 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_opengles2.h +2790 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_pixels.h +429 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_platform.h +164 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_power.h +75 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_quit.h +58 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_rect.h +138 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_render.h +870 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_revision.h +2 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_rwops.h +232 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_scancode.h +401 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_shape.h +143 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_stdinc.h +405 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_surface.h +503 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_system.h +191 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_syswm.h +272 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_thread.h +287 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_timer.h +115 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_touch.h +86 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_types.h +29 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_version.h +162 -0
- data/ext/macosx/SDL2.framework/Headers/SDL_video.h +979 -0
- data/ext/macosx/SDL2.framework/Headers/begin_code.h +140 -0
- data/ext/macosx/SDL2.framework/Headers/close_code.h +37 -0
- data/ext/macosx/SDL2.framework/Resources/Info.plist +42 -0
- data/ext/macosx/SDL2.framework/SDL2 +0 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL.h +163 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_assert.h +284 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_atomic.h +260 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_audio.h +506 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_bits.h +97 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_blendmode.h +63 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_clipboard.h +71 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_config.h +55 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_config_macosx.h +184 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_copying.h +20 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_cpuinfo.h +156 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_endian.h +239 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_error.h +76 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_events.h +723 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_filesystem.h +136 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_gamecontroller.h +316 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_gesture.h +87 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_haptic.h +1225 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_hints.h +517 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_joystick.h +253 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_keyboard.h +217 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_keycode.h +341 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_loadso.h +81 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_log.h +211 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_main.h +155 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_messagebox.h +144 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_mouse.h +224 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_mutex.h +251 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_name.h +33 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_opengl.h +11126 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_opengles.h +38 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_opengles2.h +2790 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_pixels.h +429 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_platform.h +164 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_power.h +75 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_quit.h +58 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_rect.h +138 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_render.h +870 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_revision.h +2 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_rwops.h +232 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_scancode.h +401 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_shape.h +143 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_stdinc.h +405 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_surface.h +503 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_system.h +191 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_syswm.h +272 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_thread.h +287 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_timer.h +115 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_touch.h +86 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_types.h +29 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_version.h +162 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/SDL_video.h +979 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/begin_code.h +140 -0
- data/ext/macosx/SDL2.framework/Versions/A/Headers/close_code.h +37 -0
- data/ext/macosx/SDL2.framework/Versions/A/Resources/Info.plist +42 -0
- data/ext/macosx/SDL2.framework/Versions/A/SDL2 +0 -0
- data/ext/macosx/SDL2.framework/Versions/A/_CodeSignature/CodeResources +331 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL.h +163 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_assert.h +284 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_atomic.h +260 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_audio.h +506 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_bits.h +97 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_blendmode.h +63 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_clipboard.h +71 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_config.h +55 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_config_macosx.h +184 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_copying.h +20 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_cpuinfo.h +156 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_endian.h +239 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_error.h +76 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_events.h +723 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_filesystem.h +136 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_gamecontroller.h +316 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_gesture.h +87 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_haptic.h +1225 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_hints.h +517 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_joystick.h +253 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_keyboard.h +217 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_keycode.h +341 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_loadso.h +81 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_log.h +211 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_main.h +155 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_messagebox.h +144 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_mouse.h +224 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_mutex.h +251 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_name.h +33 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_opengl.h +11126 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_opengles.h +38 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_opengles2.h +2790 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_pixels.h +429 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_platform.h +164 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_power.h +75 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_quit.h +58 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_rect.h +138 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_render.h +870 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_revision.h +2 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_rwops.h +232 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_scancode.h +401 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_shape.h +143 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_stdinc.h +405 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_surface.h +503 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_system.h +191 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_syswm.h +272 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_thread.h +287 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_timer.h +115 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_touch.h +86 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_types.h +29 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_version.h +162 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/SDL_video.h +979 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/begin_code.h +140 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Headers/close_code.h +37 -0
- data/ext/macosx/SDL2.framework/Versions/Current/Resources/Info.plist +42 -0
- data/ext/macosx/SDL2.framework/Versions/Current/SDL2 +0 -0
- data/ext/macosx/SDL2.framework/Versions/Current/_CodeSignature/CodeResources +331 -0
- data/ext/windows/RubyGL.so +0 -0
- data/lib/rubygl/native/opengl.rb +1052 -1044
- data/lib/rubygl/setup.rb +7 -4
- data/lib/rubygl.rb +12 -4
- data/rubygl.gemspec +3 -2
- metadata +174 -3
@@ -0,0 +1,71 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
21
|
+
|
22
|
+
/**
|
23
|
+
* \file SDL_clipboard.h
|
24
|
+
*
|
25
|
+
* Include file for SDL clipboard handling
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef _SDL_clipboard_h
|
29
|
+
#define _SDL_clipboard_h
|
30
|
+
|
31
|
+
#include "SDL_stdinc.h"
|
32
|
+
|
33
|
+
#include "begin_code.h"
|
34
|
+
/* Set up for C function definitions, even when using C++ */
|
35
|
+
#ifdef __cplusplus
|
36
|
+
extern "C" {
|
37
|
+
#endif
|
38
|
+
|
39
|
+
/* Function prototypes */
|
40
|
+
|
41
|
+
/**
|
42
|
+
* \brief Put UTF-8 text into the clipboard
|
43
|
+
*
|
44
|
+
* \sa SDL_GetClipboardText()
|
45
|
+
*/
|
46
|
+
extern DECLSPEC int SDLCALL SDL_SetClipboardText(const char *text);
|
47
|
+
|
48
|
+
/**
|
49
|
+
* \brief Get UTF-8 text from the clipboard, which must be freed with SDL_free()
|
50
|
+
*
|
51
|
+
* \sa SDL_SetClipboardText()
|
52
|
+
*/
|
53
|
+
extern DECLSPEC char * SDLCALL SDL_GetClipboardText(void);
|
54
|
+
|
55
|
+
/**
|
56
|
+
* \brief Returns a flag indicating whether the clipboard exists and contains a text string that is non-empty
|
57
|
+
*
|
58
|
+
* \sa SDL_GetClipboardText()
|
59
|
+
*/
|
60
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasClipboardText(void);
|
61
|
+
|
62
|
+
|
63
|
+
/* Ends C function definitions when using C++ */
|
64
|
+
#ifdef __cplusplus
|
65
|
+
}
|
66
|
+
#endif
|
67
|
+
#include "close_code.h"
|
68
|
+
|
69
|
+
#endif /* _SDL_clipboard_h */
|
70
|
+
|
71
|
+
/* vi: set ts=4 sw=4 expandtab: */
|
@@ -0,0 +1,55 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef _SDL_config_h
|
23
|
+
#define _SDL_config_h
|
24
|
+
|
25
|
+
#include "SDL_platform.h"
|
26
|
+
|
27
|
+
/**
|
28
|
+
* \file SDL_config.h
|
29
|
+
*/
|
30
|
+
|
31
|
+
/* Add any platform that doesn't build using the configure system. */
|
32
|
+
#ifdef USING_PREMAKE_CONFIG_H
|
33
|
+
#include "SDL_config_premake.h"
|
34
|
+
#elif defined(__WIN32__)
|
35
|
+
#include "SDL_config_windows.h"
|
36
|
+
#elif defined(__WINRT__)
|
37
|
+
#include "SDL_config_winrt.h"
|
38
|
+
#elif defined(__MACOSX__)
|
39
|
+
#include "SDL_config_macosx.h"
|
40
|
+
#elif defined(__IPHONEOS__)
|
41
|
+
#include "SDL_config_iphoneos.h"
|
42
|
+
#elif defined(__ANDROID__)
|
43
|
+
#include "SDL_config_android.h"
|
44
|
+
#elif defined(__PSP__)
|
45
|
+
#include "SDL_config_psp.h"
|
46
|
+
#else
|
47
|
+
/* This is a minimal configuration just to get SDL running on new platforms */
|
48
|
+
#include "SDL_config_minimal.h"
|
49
|
+
#endif /* platform config */
|
50
|
+
|
51
|
+
#ifdef USING_GENERATED_CONFIG_H
|
52
|
+
#error Wrong SDL_config.h, check your include path?
|
53
|
+
#endif
|
54
|
+
|
55
|
+
#endif /* _SDL_config_h */
|
@@ -0,0 +1,184 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
21
|
+
|
22
|
+
#ifndef _SDL_config_macosx_h
|
23
|
+
#define _SDL_config_macosx_h
|
24
|
+
|
25
|
+
#include "SDL_platform.h"
|
26
|
+
|
27
|
+
/* This gets us MAC_OS_X_VERSION_MIN_REQUIRED... */
|
28
|
+
#include <AvailabilityMacros.h>
|
29
|
+
|
30
|
+
/* This is a set of defines to configure the SDL features */
|
31
|
+
|
32
|
+
#ifdef __LP64__
|
33
|
+
#define SIZEOF_VOIDP 8
|
34
|
+
#else
|
35
|
+
#define SIZEOF_VOIDP 4
|
36
|
+
#endif
|
37
|
+
|
38
|
+
/* Useful headers */
|
39
|
+
#define HAVE_ALLOCA_H 1
|
40
|
+
#define HAVE_SYS_TYPES_H 1
|
41
|
+
#define HAVE_STDIO_H 1
|
42
|
+
#define STDC_HEADERS 1
|
43
|
+
#define HAVE_STRING_H 1
|
44
|
+
#define HAVE_INTTYPES_H 1
|
45
|
+
#define HAVE_STDINT_H 1
|
46
|
+
#define HAVE_CTYPE_H 1
|
47
|
+
#define HAVE_MATH_H 1
|
48
|
+
#define HAVE_SIGNAL_H 1
|
49
|
+
|
50
|
+
/* C library functions */
|
51
|
+
#define HAVE_MALLOC 1
|
52
|
+
#define HAVE_CALLOC 1
|
53
|
+
#define HAVE_REALLOC 1
|
54
|
+
#define HAVE_FREE 1
|
55
|
+
#define HAVE_ALLOCA 1
|
56
|
+
#define HAVE_GETENV 1
|
57
|
+
#define HAVE_SETENV 1
|
58
|
+
#define HAVE_PUTENV 1
|
59
|
+
#define HAVE_UNSETENV 1
|
60
|
+
#define HAVE_QSORT 1
|
61
|
+
#define HAVE_ABS 1
|
62
|
+
#define HAVE_BCOPY 1
|
63
|
+
#define HAVE_MEMSET 1
|
64
|
+
#define HAVE_MEMCPY 1
|
65
|
+
#define HAVE_MEMMOVE 1
|
66
|
+
#define HAVE_MEMCMP 1
|
67
|
+
#define HAVE_STRLEN 1
|
68
|
+
#define HAVE_STRLCPY 1
|
69
|
+
#define HAVE_STRLCAT 1
|
70
|
+
#define HAVE_STRDUP 1
|
71
|
+
#define HAVE_STRCHR 1
|
72
|
+
#define HAVE_STRRCHR 1
|
73
|
+
#define HAVE_STRSTR 1
|
74
|
+
#define HAVE_STRTOL 1
|
75
|
+
#define HAVE_STRTOUL 1
|
76
|
+
#define HAVE_STRTOLL 1
|
77
|
+
#define HAVE_STRTOULL 1
|
78
|
+
#define HAVE_STRTOD 1
|
79
|
+
#define HAVE_ATOI 1
|
80
|
+
#define HAVE_ATOF 1
|
81
|
+
#define HAVE_STRCMP 1
|
82
|
+
#define HAVE_STRNCMP 1
|
83
|
+
#define HAVE_STRCASECMP 1
|
84
|
+
#define HAVE_STRNCASECMP 1
|
85
|
+
#define HAVE_VSSCANF 1
|
86
|
+
#define HAVE_VSNPRINTF 1
|
87
|
+
#define HAVE_CEIL 1
|
88
|
+
#define HAVE_COPYSIGN 1
|
89
|
+
#define HAVE_COS 1
|
90
|
+
#define HAVE_COSF 1
|
91
|
+
#define HAVE_FABS 1
|
92
|
+
#define HAVE_FLOOR 1
|
93
|
+
#define HAVE_LOG 1
|
94
|
+
#define HAVE_POW 1
|
95
|
+
#define HAVE_SCALBN 1
|
96
|
+
#define HAVE_SIN 1
|
97
|
+
#define HAVE_SINF 1
|
98
|
+
#define HAVE_SQRT 1
|
99
|
+
#define HAVE_SIGACTION 1
|
100
|
+
#define HAVE_SETJMP 1
|
101
|
+
#define HAVE_NANOSLEEP 1
|
102
|
+
#define HAVE_SYSCONF 1
|
103
|
+
#define HAVE_SYSCTLBYNAME 1
|
104
|
+
#define HAVE_ATAN 1
|
105
|
+
#define HAVE_ATAN2 1
|
106
|
+
#define HAVE_ACOS 1
|
107
|
+
#define HAVE_ASIN 1
|
108
|
+
|
109
|
+
/* Enable various audio drivers */
|
110
|
+
#define SDL_AUDIO_DRIVER_COREAUDIO 1
|
111
|
+
#define SDL_AUDIO_DRIVER_DISK 1
|
112
|
+
#define SDL_AUDIO_DRIVER_DUMMY 1
|
113
|
+
|
114
|
+
/* Enable various input drivers */
|
115
|
+
#define SDL_JOYSTICK_IOKIT 1
|
116
|
+
#define SDL_HAPTIC_IOKIT 1
|
117
|
+
|
118
|
+
/* Enable various shared object loading systems */
|
119
|
+
#define SDL_LOADSO_DLOPEN 1
|
120
|
+
|
121
|
+
/* Enable various threading systems */
|
122
|
+
#define SDL_THREAD_PTHREAD 1
|
123
|
+
#define SDL_THREAD_PTHREAD_RECURSIVE_MUTEX 1
|
124
|
+
|
125
|
+
/* Enable various timer systems */
|
126
|
+
#define SDL_TIMER_UNIX 1
|
127
|
+
|
128
|
+
/* Enable various video drivers */
|
129
|
+
#define SDL_VIDEO_DRIVER_COCOA 1
|
130
|
+
#define SDL_VIDEO_DRIVER_DUMMY 1
|
131
|
+
#undef SDL_VIDEO_DRIVER_X11
|
132
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC "/usr/X11R6/lib/libX11.6.dylib"
|
133
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT "/usr/X11R6/lib/libXext.6.dylib"
|
134
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINERAMA "/usr/X11R6/lib/libXinerama.1.dylib"
|
135
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT2 "/usr/X11R6/lib/libXi.6.dylib"
|
136
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR "/usr/X11R6/lib/libXrandr.2.dylib"
|
137
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XSS "/usr/X11R6/lib/libXss.1.dylib"
|
138
|
+
#define SDL_VIDEO_DRIVER_X11_DYNAMIC_XVIDMODE "/usr/X11R6/lib/libXxf86vm.1.dylib"
|
139
|
+
#define SDL_VIDEO_DRIVER_X11_XINERAMA 1
|
140
|
+
#define SDL_VIDEO_DRIVER_X11_XRANDR 1
|
141
|
+
#define SDL_VIDEO_DRIVER_X11_XSCRNSAVER 1
|
142
|
+
#define SDL_VIDEO_DRIVER_X11_XSHAPE 1
|
143
|
+
#define SDL_VIDEO_DRIVER_X11_XVIDMODE 1
|
144
|
+
#define SDL_VIDEO_DRIVER_X11_HAS_XKBKEYCODETOKEYSYM 1
|
145
|
+
|
146
|
+
#ifdef MAC_OS_X_VERSION_10_8
|
147
|
+
/*
|
148
|
+
* No matter the versions targeted, this is the 10.8 or later SDK, so you have
|
149
|
+
* to use the external Xquartz, which is a more modern Xlib. Previous SDKs
|
150
|
+
* used an older Xlib.
|
151
|
+
*/
|
152
|
+
#define SDL_VIDEO_DRIVER_X11_XINPUT2 1
|
153
|
+
#define SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS 1
|
154
|
+
#define SDL_VIDEO_DRIVER_X11_CONST_PARAM_XEXTADDDISPLAY 1
|
155
|
+
#endif
|
156
|
+
|
157
|
+
#ifndef SDL_VIDEO_RENDER_OGL
|
158
|
+
#define SDL_VIDEO_RENDER_OGL 1
|
159
|
+
#endif
|
160
|
+
|
161
|
+
/* Enable OpenGL support */
|
162
|
+
#ifndef SDL_VIDEO_OPENGL
|
163
|
+
#define SDL_VIDEO_OPENGL 1
|
164
|
+
#endif
|
165
|
+
#ifndef SDL_VIDEO_OPENGL_CGL
|
166
|
+
#define SDL_VIDEO_OPENGL_CGL 1
|
167
|
+
#endif
|
168
|
+
#ifndef SDL_VIDEO_OPENGL_GLX
|
169
|
+
#define SDL_VIDEO_OPENGL_GLX 1
|
170
|
+
#endif
|
171
|
+
|
172
|
+
/* Enable system power support */
|
173
|
+
#define SDL_POWER_MACOSX 1
|
174
|
+
|
175
|
+
/* enable filesystem support */
|
176
|
+
#define SDL_FILESYSTEM_COCOA 1
|
177
|
+
|
178
|
+
/* Enable assembly routines */
|
179
|
+
#define SDL_ASSEMBLY_ROUTINES 1
|
180
|
+
#ifdef __ppc__
|
181
|
+
#define SDL_ALTIVEC_BLITTERS 1
|
182
|
+
#endif
|
183
|
+
|
184
|
+
#endif /* _SDL_config_macosx_h */
|
@@ -0,0 +1,20 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
@@ -0,0 +1,156 @@
|
|
1
|
+
/*
|
2
|
+
Simple DirectMedia Layer
|
3
|
+
Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
|
4
|
+
|
5
|
+
This software is provided 'as-is', without any express or implied
|
6
|
+
warranty. In no event will the authors be held liable for any damages
|
7
|
+
arising from the use of this software.
|
8
|
+
|
9
|
+
Permission is granted to anyone to use this software for any purpose,
|
10
|
+
including commercial applications, and to alter it and redistribute it
|
11
|
+
freely, subject to the following restrictions:
|
12
|
+
|
13
|
+
1. The origin of this software must not be misrepresented; you must not
|
14
|
+
claim that you wrote the original software. If you use this software
|
15
|
+
in a product, an acknowledgment in the product documentation would be
|
16
|
+
appreciated but is not required.
|
17
|
+
2. Altered source versions must be plainly marked as such, and must not be
|
18
|
+
misrepresented as being the original software.
|
19
|
+
3. This notice may not be removed or altered from any source distribution.
|
20
|
+
*/
|
21
|
+
|
22
|
+
/**
|
23
|
+
* \file SDL_cpuinfo.h
|
24
|
+
*
|
25
|
+
* CPU feature detection for SDL.
|
26
|
+
*/
|
27
|
+
|
28
|
+
#ifndef _SDL_cpuinfo_h
|
29
|
+
#define _SDL_cpuinfo_h
|
30
|
+
|
31
|
+
#include "SDL_stdinc.h"
|
32
|
+
|
33
|
+
/* Need to do this here because intrin.h has C++ code in it */
|
34
|
+
/* Visual Studio 2005 has a bug where intrin.h conflicts with winnt.h */
|
35
|
+
#if defined(_MSC_VER) && (_MSC_VER >= 1500) && (defined(_M_IX86) || defined(_M_X64))
|
36
|
+
#include <intrin.h>
|
37
|
+
#ifndef _WIN64
|
38
|
+
#define __MMX__
|
39
|
+
#define __3dNOW__
|
40
|
+
#endif
|
41
|
+
#define __SSE__
|
42
|
+
#define __SSE2__
|
43
|
+
#elif defined(__MINGW64_VERSION_MAJOR)
|
44
|
+
#include <intrin.h>
|
45
|
+
#else
|
46
|
+
#ifdef __ALTIVEC__
|
47
|
+
#if HAVE_ALTIVEC_H && !defined(__APPLE_ALTIVEC__)
|
48
|
+
#include <altivec.h>
|
49
|
+
#undef pixel
|
50
|
+
#endif
|
51
|
+
#endif
|
52
|
+
#ifdef __MMX__
|
53
|
+
#include <mmintrin.h>
|
54
|
+
#endif
|
55
|
+
#ifdef __3dNOW__
|
56
|
+
#include <mm3dnow.h>
|
57
|
+
#endif
|
58
|
+
#ifdef __SSE__
|
59
|
+
#include <xmmintrin.h>
|
60
|
+
#endif
|
61
|
+
#ifdef __SSE2__
|
62
|
+
#include <emmintrin.h>
|
63
|
+
#endif
|
64
|
+
#endif
|
65
|
+
|
66
|
+
#include "begin_code.h"
|
67
|
+
/* Set up for C function definitions, even when using C++ */
|
68
|
+
#ifdef __cplusplus
|
69
|
+
extern "C" {
|
70
|
+
#endif
|
71
|
+
|
72
|
+
/* This is a guess for the cacheline size used for padding.
|
73
|
+
* Most x86 processors have a 64 byte cache line.
|
74
|
+
* The 64-bit PowerPC processors have a 128 byte cache line.
|
75
|
+
* We'll use the larger value to be generally safe.
|
76
|
+
*/
|
77
|
+
#define SDL_CACHELINE_SIZE 128
|
78
|
+
|
79
|
+
/**
|
80
|
+
* This function returns the number of CPU cores available.
|
81
|
+
*/
|
82
|
+
extern DECLSPEC int SDLCALL SDL_GetCPUCount(void);
|
83
|
+
|
84
|
+
/**
|
85
|
+
* This function returns the L1 cache line size of the CPU
|
86
|
+
*
|
87
|
+
* This is useful for determining multi-threaded structure padding
|
88
|
+
* or SIMD prefetch sizes.
|
89
|
+
*/
|
90
|
+
extern DECLSPEC int SDLCALL SDL_GetCPUCacheLineSize(void);
|
91
|
+
|
92
|
+
/**
|
93
|
+
* This function returns true if the CPU has the RDTSC instruction.
|
94
|
+
*/
|
95
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasRDTSC(void);
|
96
|
+
|
97
|
+
/**
|
98
|
+
* This function returns true if the CPU has AltiVec features.
|
99
|
+
*/
|
100
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasAltiVec(void);
|
101
|
+
|
102
|
+
/**
|
103
|
+
* This function returns true if the CPU has MMX features.
|
104
|
+
*/
|
105
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasMMX(void);
|
106
|
+
|
107
|
+
/**
|
108
|
+
* This function returns true if the CPU has 3DNow! features.
|
109
|
+
*/
|
110
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_Has3DNow(void);
|
111
|
+
|
112
|
+
/**
|
113
|
+
* This function returns true if the CPU has SSE features.
|
114
|
+
*/
|
115
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE(void);
|
116
|
+
|
117
|
+
/**
|
118
|
+
* This function returns true if the CPU has SSE2 features.
|
119
|
+
*/
|
120
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE2(void);
|
121
|
+
|
122
|
+
/**
|
123
|
+
* This function returns true if the CPU has SSE3 features.
|
124
|
+
*/
|
125
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE3(void);
|
126
|
+
|
127
|
+
/**
|
128
|
+
* This function returns true if the CPU has SSE4.1 features.
|
129
|
+
*/
|
130
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE41(void);
|
131
|
+
|
132
|
+
/**
|
133
|
+
* This function returns true if the CPU has SSE4.2 features.
|
134
|
+
*/
|
135
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasSSE42(void);
|
136
|
+
|
137
|
+
/**
|
138
|
+
* This function returns true if the CPU has AVX features.
|
139
|
+
*/
|
140
|
+
extern DECLSPEC SDL_bool SDLCALL SDL_HasAVX(void);
|
141
|
+
|
142
|
+
/**
|
143
|
+
* This function returns the amount of RAM configured in the system, in MB.
|
144
|
+
*/
|
145
|
+
extern DECLSPEC int SDLCALL SDL_GetSystemRAM(void);
|
146
|
+
|
147
|
+
|
148
|
+
/* Ends C function definitions when using C++ */
|
149
|
+
#ifdef __cplusplus
|
150
|
+
}
|
151
|
+
#endif
|
152
|
+
#include "close_code.h"
|
153
|
+
|
154
|
+
#endif /* _SDL_cpuinfo_h */
|
155
|
+
|
156
|
+
/* vi: set ts=4 sw=4 expandtab: */
|