diff options
| author | Ray San <[email protected]> | 2017-11-13 12:09:41 +0100 |
|---|---|---|
| committer | Ray San <[email protected]> | 2017-11-13 12:09:41 +0100 |
| commit | 9c65caea8cef4d334ef71fc18e1ea4d77fd59187 (patch) | |
| tree | 99243a50c2840bcd77fe10c06eef8955d352884e /src/rglfw.c | |
| parent | 24b12e5e2380584b1668e864f2af5bed0db38487 (diff) | |
| download | raylib-9c65caea8cef4d334ef71fc18e1ea4d77fd59187.tar.gz raylib-9c65caea8cef4d334ef71fc18e1ea4d77fd59187.zip | |
Added GLFW sources to raylib
Compiling GLFW library with raylib avoids external dependencies, this
way we solve version problems in some platforms
Diffstat (limited to 'src/rglfw.c')
| -rw-r--r-- | src/rglfw.c | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/src/rglfw.c b/src/rglfw.c new file mode 100644 index 00000000..81949a3d --- /dev/null +++ b/src/rglfw.c @@ -0,0 +1,74 @@ +/********************************************************************************************** +* +* raylib GLFW single file compilation +* +* This file includes GLFW sources to be compiled together with raylib for all supported +* platforms, this way, no external dependencies are required. +* +* LICENSE: zlib/libpng +* +* Copyright (c) 2017 Ramon Santamaria (@raysan5) +* +* This software is provided "as-is", without any express or implied warranty. In no event +* will the authors be held liable for any damages arising from the use of this software. +* +* Permission is granted to anyone to use this software for any purpose, including commercial +* applications, and to alter it and redistribute it freely, subject to the following restrictions: +* +* 1. The origin of this software must not be misrepresented; you must not claim that you +* wrote the original software. If you use this software in a product, an acknowledgment +* in the product documentation would be appreciated but is not required. +* +* 2. Altered source versions must be plainly marked as such, and must not be misrepresented +* as being the original software. +* +* 3. This notice may not be removed or altered from any source distribution. +* +**********************************************************************************************/ + +#include "external/glfw/src/context.c" +#include "external/glfw/src/init.c" +#include "external/glfw/src/input.c" +#include "external/glfw/src/monitor.c" +#include "external/glfw/src/vulkan.c" +#include "external/glfw/src/window.c" + +// Required compilation defines: -D_GLFW_WIN32 +#ifdef _WIN32 +#include "external/glfw/src/win32_init.c" +#include "external/glfw/src/win32_joystick.c" +#include "external/glfw/src/win32_monitor.c" +#include "external/glfw/src/win32_time.c" +#include "external/glfw/src/win32_thread.c" +#include "external/glfw/src/win32_window.c" +#include "external/glfw/src/wgl_context.c" +#include "external/glfw/src/egl_context.c" +#include "external/glfw/src/osmesa_context.c" +#endif + +// Required compilation defines: -D_GLFW_X11 +#ifdef __linux__ +#include "external/glfw/src/x11_init.c" +#include "external/glfw/src/x11_monitor.c" +#include "external/glfw/src/x11_window.c" +#include "external/glfw/src/xkb_unicode.c" +#include "external/glfw/src/linux_joystick.c" +#include "external/glfw/src/posix_time.c" +#include "external/glfw/src/posix_thread.c" +#include "external/glfw/src/glx_context.c" +#include "external/glfw/src/egl_context.c" +#include "external/glfw/src/osmesa_context.c" +#endif + +// Required compilation defines: -D_GLFW_COCOA -D_GLFW_USE_CHDIR -D_GLFW_USE_MENUBAR -D_GLFW_USE_RETINA +#ifdef __APPLE__ +#include "external/glfw/src/cocoa_init.m" +#include "external/glfw/src/cocoa_joystick.m" +#include "external/glfw/src/cocoa_monitor.m" +#include "external/glfw/src/cocoa_window.m" +#include "external/glfw/src/cocoa_time.c" +#include "external/glfw/src/posix_thread.c" +#include "external/glfw/src/nsgl_context.m" +#include "external/glfw/src/egl_context.c" +#include "external/glfw/src/osmesa_context.c.m" +#endif |
