Browse Source

Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop

pull/126/head
Joshua Reisenauer 9 years ago
parent
commit
76536fe24b
61 changed files with 1701 additions and 864 deletions
  1. +5
    -1
      .gitignore
  2. BIN
      external/glfw3/glfw3.dll
  3. BIN
      external/glfw3/lib/win32/libglfw3.a
  4. +6
    -6
      src/CMakeLists.txt
  5. +16
    -16
      src/Makefile
  6. +12
    -12
      src/android/jni/Android.mk
  7. +0
    -0
      src/android/jni/Application.mk
  8. +0
    -0
      src/android/jni/include/AL/al.h
  9. +0
    -0
      src/android/jni/include/AL/alc.h
  10. +0
    -0
      src/android/jni/include/AL/alext.h
  11. +0
    -0
      src/android/jni/include/AL/efx-creative.h
  12. +0
    -0
      src/android/jni/include/AL/efx.h
  13. +0
    -0
      src/android/jni/include/AL/oalMacOSX_OALExtensions.h
  14. +0
    -0
      src/android/jni/include/AL/oalStaticBufferExtension.h
  15. +0
    -0
      src/android/jni/include/android_native_app_glue.h
  16. +3
    -3
      src/audio.c
  17. +2
    -2
      src/core.c
  18. +0
    -0
      src/external/glad.c
  19. +0
    -0
      src/external/glad.h
  20. +3
    -2
      src/external/glfw3/COPYING.txt
  21. +1460
    -580
      src/external/glfw3/include/GLFW/glfw3.h
  22. +172
    -72
      src/external/glfw3/include/GLFW/glfw3native.h
  23. +0
    -0
      src/external/glfw3/lib/linux/libglfw3.a
  24. +0
    -0
      src/external/glfw3/lib/osx/libglfw.3.0.dylib
  25. +0
    -0
      src/external/glfw3/lib/osx/libglfw.3.dylib
  26. +0
    -0
      src/external/glfw3/lib/osx/libglfw.dylib
  27. BIN
      src/external/glfw3/lib/win32/glfw3.dll
  28. BIN
      src/external/glfw3/lib/win32/libglfw3.a
  29. BIN
      src/external/glfw3/lib/win32/libglfw3dll.a
  30. +0
    -0
      src/external/jar_mod.h
  31. +0
    -0
      src/external/jar_xm.h
  32. +0
    -0
      src/external/openal_soft/COPYING
  33. +0
    -0
      src/external/openal_soft/include/AL/al.h
  34. +0
    -0
      src/external/openal_soft/include/AL/alc.h
  35. +0
    -0
      src/external/openal_soft/include/AL/alext.h
  36. +0
    -0
      src/external/openal_soft/include/AL/efx-creative.h
  37. +0
    -0
      src/external/openal_soft/include/AL/efx-presets.h
  38. +0
    -0
      src/external/openal_soft/include/AL/efx.h
  39. +0
    -0
      src/external/openal_soft/lib/win32/OpenAL32.dll
  40. +0
    -0
      src/external/openal_soft/lib/win32/libOpenAL32.dll.a
  41. +0
    -0
      src/external/stb_image.h
  42. +0
    -0
      src/external/stb_image_resize.h
  43. +0
    -0
      src/external/stb_image_write.h
  44. +0
    -0
      src/external/stb_rect_pack.h
  45. +0
    -0
      src/external/stb_truetype.h
  46. +0
    -0
      src/external/stb_vorbis.c
  47. +0
    -0
      src/external/stb_vorbis.h
  48. +0
    -0
      src/external/tinfl.c
  49. BIN
      src/libraylib.bc
  50. +15
    -5
      src/rlgl.c
  51. +1
    -1
      src/text.c
  52. +3
    -3
      src/textures.c
  53. +3
    -2
      src/utils.c
  54. +0
    -29
      src_android/AndroidManifest.xml
  55. +0
    -92
      src_android/build.xml
  56. +0
    -20
      src_android/proguard-project.txt
  57. +0
    -14
      src_android/project.properties
  58. BIN
      src_android/res/drawable-hdpi/icon.png
  59. BIN
      src_android/res/drawable-ldpi/icon.png
  60. BIN
      src_android/res/drawable-mdpi/icon.png
  61. +0
    -4
      src_android/res/values/strings.xml

+ 5
- 1
.gitignore View File

@ -65,4 +65,8 @@ DerivedData/
src/libraylib.a src/libraylib.a
# oculus example # oculus example
!examples/oculus_glfw_sample/LibOVRRT32_1.dll
!examples/oculus_glfw_sample/LibOVRRT32_1.dll
# external libraries DLLs
!src/external/glfw3/lib/win32/glfw3.dll
!src/external/openal_soft/lib/win32/OpenAL32.dll

BIN
external/glfw3/glfw3.dll View File


BIN
external/glfw3/lib/win32/libglfw3.a View File


CMakeLists.txt → src/CMakeLists.txt View File

@ -3,30 +3,30 @@ project (raylib)
SET(PLATFORM_TO_USE "PLATFORM_DESKTOP" CACHE STRING "Platform to compile for") SET(PLATFORM_TO_USE "PLATFORM_DESKTOP" CACHE STRING "Platform to compile for")
SET_PROPERTY(CACHE PLATFORM_TO_USE PROPERTY STRINGS PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB) SET_PROPERTY(CACHE PLATFORM_TO_USE PROPERTY STRINGS PLATFORM_DESKTOP PLATFORM_RPI PLATFORM_WEB)
set(CMAKE_C_FLAGS "-O1 -Wall -std=gnu99 -fgnu89-inline")
set(CMAKE_C_FLAGS "-O1 -Wall -std=gnu99 -fgnu89-inline -Wno-missing-braces")
IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_DESKTOP") IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_DESKTOP")
add_definitions(-DPLATFORM_DESKTOP, -DGRAPHICS_API_OPENGL_33) add_definitions(-DPLATFORM_DESKTOP, -DGRAPHICS_API_OPENGL_33)
include_directories("." "src/" "external/openal_soft/include" "external/glfw3/include")
include_directories("." "external/" "external/openal_soft/include" "external/glfw3/include")
ENDIF() ENDIF()
IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_RPI") IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_RPI")
add_definitions(-DPLATFORM_RPI, -GRAPHICS_API_OPENGL_ES2) add_definitions(-DPLATFORM_RPI, -GRAPHICS_API_OPENGL_ES2)
include_directories("." "/opt/vc/include" "/opt/vc/include/interface/vmcs_host/linux" "/opt/vc/include/interface/vcos/pthreads")
include_directories("." "external/" "/opt/vc/include" "/opt/vc/include/interface/vmcs_host/linux" "/opt/vc/include/interface/vcos/pthreads")
ENDIF() ENDIF()
IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_WEB") IF(${PLATFORM_TO_USE} MATCHES "PLATFORM_WEB")
add_definitions(-DPLATFORM_WEB, -GRAPHICS_API_OPENGL_ES2) add_definitions(-DPLATFORM_WEB, -GRAPHICS_API_OPENGL_ES2)
include_directories("." "src/" "external/openal_soft/include" "external/glfw3/include")
include_directories("." "external/" "external/openal_soft/include" "external/glfw3/include")
ENDIF() ENDIF()
file(GLOB SOURCES "src/*.c")
file(GLOB SOURCES "*.c" "external/*.c")
add_library(raylib STATIC ${SOURCES}) add_library(raylib STATIC ${SOURCES})
install(TARGETS raylib DESTINATION lib/)
install(TARGETS raylib DESTINATION ../lib/)

+ 16
- 16
src/Makefile View File

@ -81,14 +81,14 @@ CFLAGS = -O1 -Wall -std=gnu99 -fgnu89-inline -Wno-missing-braces
# define any directories containing required header files # define any directories containing required header files
ifeq ($(PLATFORM),PLATFORM_RPI) ifeq ($(PLATFORM),PLATFORM_RPI)
INCLUDES = -I. -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
INCLUDES = -I. -Iexternal -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads
else else
INCLUDES = -I. -I../src
# external libraries headers
# GLFW3
INCLUDES += -I../external/glfw3/include
# OpenAL Soft
INCLUDES += -I../external/openal_soft/include
# STB libraries and others
INCLUDES = -I. -Iexternal
# GLFW3 library
INCLUDES += -Iexternal/glfw3/include
# OpenAL Soft library
INCLUDES += -Iexternal/openal_soft/include
endif endif
# define all object files required # define all object files required
@ -101,7 +101,7 @@ endif
# typing 'make' will invoke the default target entry called 'all', # typing 'make' will invoke the default target entry called 'all',
# in this case, the 'default' target entry is basic_game
# in this case, the 'default' target entry is raylib
all: raylib all: raylib
# compile raylib library # compile raylib library
@ -121,10 +121,6 @@ core.o: core.c
rlgl.o: rlgl.c rlgl.o: rlgl.c
$(CC) -c rlgl.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) $(CC) -c rlgl.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
# compile glad module
glad.o: glad.c
$(CC) -c glad.c $(CFLAGS) $(INCLUDES)
# compile shapes module # compile shapes module
shapes.o: shapes.c shapes.o: shapes.c
$(CC) -c shapes.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS) $(CC) -c shapes.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) -D$(GRAPHICS)
@ -145,10 +141,6 @@ models.o: models.c
audio.o: audio.c audio.o: audio.c
$(CC) -c audio.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) $(CC) -c audio.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
# compile stb_vorbis library
stb_vorbis.o: stb_vorbis.c
$(CC) -c stb_vorbis.c -O1 $(INCLUDES) -D$(PLATFORM)
# compile utils module # compile utils module
utils.o: utils.c utils.o: utils.c
$(CC) -c utils.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) $(CC) -c utils.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
@ -161,6 +153,14 @@ camera.o: camera.c
gestures.o: gestures.c gestures.o: gestures.c
$(CC) -c gestures.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM) $(CC) -c gestures.c $(CFLAGS) $(INCLUDES) -D$(PLATFORM)
# compile glad module
glad.o: external/glad.c
$(CC) -c external/glad.c $(CFLAGS) $(INCLUDES)
# compile stb_vorbis library
stb_vorbis.o: external/stb_vorbis.c
$(CC) -c external/stb_vorbis.c -O1 $(INCLUDES) -D$(PLATFORM)
# clean everything # clean everything
clean: clean:
ifeq ($(PLATFORM),PLATFORM_DESKTOP) ifeq ($(PLATFORM),PLATFORM_DESKTOP)

src_android/jni/Android.mk → src/android/jni/Android.mk View File

@ -37,22 +37,22 @@ LOCAL_MODULE := raylib
# Module source files # Module source files
LOCAL_SRC_FILES :=\ LOCAL_SRC_FILES :=\
../../src/core.c \
../../src/rlgl.c \
../../src/textures.c \
../../src/text.c \
../../src/shapes.c \
../../src/gestures.c \
../../src/models.c \
../../src/utils.c \
../../src/audio.c \
../../src/stb_vorbis.c \
../../core.c \
../../rlgl.c \
../../textures.c \
../../text.c \
../../shapes.c \
../../gestures.c \
../../models.c \
../../utils.c \
../../audio.c \
../../stb_vorbis.c \
# Required includes paths (.h) # Required includes paths (.h)
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../../src
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/include $(LOCAL_PATH)/../..
# Required flags for compilation: defines PLATFORM_ANDROID and GRAPHICS_API_OPENGL_ES2 # Required flags for compilation: defines PLATFORM_ANDROID and GRAPHICS_API_OPENGL_ES2
LOCAL_CFLAGS := -Wall -std=c99 -g -DPLATFORM_ANDROID -DGRAPHICS_API_OPENGL_ES2
LOCAL_CFLAGS := -Wall -std=c99 -Wno-missing-braces -g -DPLATFORM_ANDROID -DGRAPHICS_API_OPENGL_ES2
# Build the static library libraylib.a # Build the static library libraylib.a
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

src_android/jni/Application.mk → src/android/jni/Application.mk View File


src_android/jni/include/AL/al.h → src/android/jni/include/AL/al.h View File


src_android/jni/include/AL/alc.h → src/android/jni/include/AL/alc.h View File


src_android/jni/include/AL/alext.h → src/android/jni/include/AL/alext.h View File


external/openal_soft/include/AL/efx-creative.h → src/android/jni/include/AL/efx-creative.h View File


src_android/jni/include/AL/efx.h → src/android/jni/include/AL/efx.h View File


src_android/jni/include/AL/oalMacOSX_OALExtensions.h → src/android/jni/include/AL/oalMacOSX_OALExtensions.h View File


src_android/jni/include/AL/oalStaticBufferExtension.h → src/android/jni/include/AL/oalStaticBufferExtension.h View File


src_android/jni/include/android_native_app_glue.h → src/android/jni/include/android_native_app_glue.h View File


+ 3
- 3
src/audio.c View File

@ -51,13 +51,13 @@
#endif #endif
//#define STB_VORBIS_HEADER_ONLY //#define STB_VORBIS_HEADER_ONLY
#include "stb_vorbis.h" // OGG loading functions
#include "external/stb_vorbis.h" // OGG loading functions
#define JAR_XM_IMPLEMENTATION #define JAR_XM_IMPLEMENTATION
#include "jar_xm.h" // XM loading functions
#include "external/jar_xm.h" // XM loading functions
#define JAR_MOD_IMPLEMENTATION #define JAR_MOD_IMPLEMENTATION
#include "jar_mod.h" // MOD loading functions
#include "external/jar_mod.h" // MOD loading functions
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Defines and Macros // Defines and Macros

+ 2
- 2
src/core.c View File

@ -55,11 +55,11 @@
#include <errno.h> // Macros for reporting and retrieving error conditions through error codes #include <errno.h> // Macros for reporting and retrieving error conditions through error codes
#if defined(PLATFORM_OCULUS) #if defined(PLATFORM_OCULUS)
#define PLATFORM_DESKTOP // Enable PLATFORM_DESKTOP code-base
#define PLATFORM_DESKTOP // Enable PLATFORM_DESKTOP code-base
#endif #endif
#if defined(PLATFORM_DESKTOP) #if defined(PLATFORM_DESKTOP)
#include "glad.h" // GLAD library: Manage OpenGL headers and extensions
#include "external/glad.h" // GLAD library: Manage OpenGL headers and extensions
#endif #endif
#if defined(PLATFORM_OCULUS) #if defined(PLATFORM_OCULUS)

src/glad.c → src/external/glad.c View File


src/glad.h → src/external/glad.h View File


external/glfw3/COPYING.txt → src/external/glfw3/COPYING.txt View File

@ -1,5 +1,5 @@
Copyright (c) 2002-2006 Marcus Geelnard Copyright (c) 2002-2006 Marcus Geelnard
Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
This software is provided 'as-is', without any express or implied This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages warranty. In no event will the authors be held liable for any damages
@ -18,4 +18,5 @@ freely, subject to the following restrictions:
be misrepresented as being the original software. be misrepresented as being the original software.
3. This notice may not be removed or altered from any source 3. This notice may not be removed or altered from any source
distribution.
distribution.

src/external/glfw3/include/GLFW/glfw3.h
File diff suppressed because it is too large
View File


external/glfw3/include/GLFW/glfw3native.h → src/external/glfw3/include/GLFW/glfw3native.h View File

@ -1,9 +1,9 @@
/************************************************************************* /*************************************************************************
* GLFW 3.1 - www.glfw.org
* GLFW 3.2 - www.glfw.org
* A library for OpenGL, window and input * A library for OpenGL, window and input
*------------------------------------------------------------------------ *------------------------------------------------------------------------
* Copyright (c) 2002-2006 Marcus Geelnard * Copyright (c) 2002-2006 Marcus Geelnard
* Copyright (c) 2006-2010 Camilla Berglund <elmindreda@elmindreda.org>
* Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
* *
* This software is provided 'as-is', without any express or implied * This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be held liable for any damages * warranty. In no event will the authors be held liable for any damages
@ -38,20 +38,30 @@ extern "C" {
* Doxygen documentation * Doxygen documentation
*************************************************************************/ *************************************************************************/
/*! @file glfw3native.h
* @brief The header of the native access functions.
*
* This is the header file of the native access functions. See @ref native for
* more information.
*/
/*! @defgroup native Native access /*! @defgroup native Native access
* *
* **By using the native access functions you assert that you know what you're * **By using the native access functions you assert that you know what you're
* doing and how to fix problems caused by using them. If you don't, you * doing and how to fix problems caused by using them. If you don't, you
* shouldn't be using them.** * shouldn't be using them.**
* *
* Before the inclusion of @ref glfw3native.h, you must define exactly one
* window system API macro and exactly one context creation API macro. Failure
* to do this will cause a compile-time error.
* Before the inclusion of @ref glfw3native.h, you may define exactly one
* window system API macro and zero or more context creation API macros.
*
* The chosen backends must match those the library was compiled for. Failure
* to do this will cause a link-time error.
* *
* The available window API macros are: * The available window API macros are:
* * `GLFW_EXPOSE_NATIVE_WIN32` * * `GLFW_EXPOSE_NATIVE_WIN32`
* * `GLFW_EXPOSE_NATIVE_COCOA` * * `GLFW_EXPOSE_NATIVE_COCOA`
* * `GLFW_EXPOSE_NATIVE_X11` * * `GLFW_EXPOSE_NATIVE_X11`
* * `GLFW_EXPOSE_NATIVE_WAYLAND`
* * `GLFW_EXPOSE_NATIVE_MIR`
* *
* The available context API macros are: * The available context API macros are:
* * `GLFW_EXPOSE_NATIVE_WGL` * * `GLFW_EXPOSE_NATIVE_WGL`
@ -86,20 +96,23 @@ extern "C" {
#elif defined(GLFW_EXPOSE_NATIVE_X11) #elif defined(GLFW_EXPOSE_NATIVE_X11)
#include <X11/Xlib.h> #include <X11/Xlib.h>
#include <X11/extensions/Xrandr.h> #include <X11/extensions/Xrandr.h>
#else
#error "No window API selected"
#elif defined(GLFW_EXPOSE_NATIVE_WAYLAND)
#include <wayland-client.h>
#elif defined(GLFW_EXPOSE_NATIVE_MIR)
#include <mir_toolkit/mir_client_library.h>
#endif #endif
#if defined(GLFW_EXPOSE_NATIVE_WGL) #if defined(GLFW_EXPOSE_NATIVE_WGL)
/* WGL is declared by windows.h */ /* WGL is declared by windows.h */
#elif defined(GLFW_EXPOSE_NATIVE_NSGL)
#endif
#if defined(GLFW_EXPOSE_NATIVE_NSGL)
/* NSGL is declared by Cocoa.h */ /* NSGL is declared by Cocoa.h */
#elif defined(GLFW_EXPOSE_NATIVE_GLX)
#endif
#if defined(GLFW_EXPOSE_NATIVE_GLX)
#include <GL/glx.h> #include <GL/glx.h>
#elif defined(GLFW_EXPOSE_NATIVE_EGL)
#endif
#if defined(GLFW_EXPOSE_NATIVE_EGL)
#include <EGL/egl.h> #include <EGL/egl.h>
#else
#error "No context API selected"
#endif #endif
@ -114,11 +127,10 @@ extern "C" {
* of the specified monitor, or `NULL` if an [error](@ref error_handling) * of the specified monitor, or `NULL` if an [error](@ref error_handling)
* occurred. * occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.1.
* @since Added in version 3.1.
* *
* @ingroup native * @ingroup native
*/ */
@ -130,11 +142,10 @@ GLFWAPI const char* glfwGetWin32Adapter(GLFWmonitor* monitor);
* `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an * `\\.\DISPLAY1\Monitor0`) of the specified monitor, or `NULL` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.1.
* @since Added in version 3.1.
* *
* @ingroup native * @ingroup native
*/ */
@ -145,11 +156,10 @@ GLFWAPI const char* glfwGetWin32Monitor(GLFWmonitor* monitor);
* @return The `HWND` of the specified window, or `NULL` if an * @return The `HWND` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -162,11 +172,10 @@ GLFWAPI HWND glfwGetWin32Window(GLFWwindow* window);
* @return The `HGLRC` of the specified window, or `NULL` if an * @return The `HGLRC` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -179,11 +188,10 @@ GLFWAPI HGLRC glfwGetWGLContext(GLFWwindow* window);
* @return The `CGDirectDisplayID` of the specified monitor, or * @return The `CGDirectDisplayID` of the specified monitor, or
* `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred. * `kCGNullDirectDisplay` if an [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.1.
* @since Added in version 3.1.
* *
* @ingroup native * @ingroup native
*/ */
@ -194,11 +202,10 @@ GLFWAPI CGDirectDisplayID glfwGetCocoaMonitor(GLFWmonitor* monitor);
* @return The `NSWindow` of the specified window, or `nil` if an * @return The `NSWindow` of the specified window, or `nil` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -211,11 +218,10 @@ GLFWAPI id glfwGetCocoaWindow(GLFWwindow* window);
* @return The `NSOpenGLContext` of the specified window, or `nil` if an * @return The `NSOpenGLContext` of the specified window, or `nil` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -228,11 +234,10 @@ GLFWAPI id glfwGetNSGLContext(GLFWwindow* window);
* @return The `Display` used by GLFW, or `NULL` if an * @return The `Display` used by GLFW, or `NULL` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -243,11 +248,10 @@ GLFWAPI Display* glfwGetX11Display(void);
* @return The `RRCrtc` of the specified monitor, or `None` if an * @return The `RRCrtc` of the specified monitor, or `None` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.1.
* @since Added in version 3.1.
* *
* @ingroup native * @ingroup native
*/ */
@ -258,11 +262,10 @@ GLFWAPI RRCrtc glfwGetX11Adapter(GLFWmonitor* monitor);
* @return The `RROutput` of the specified monitor, or `None` if an * @return The `RROutput` of the specified monitor, or `None` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.1.
* @since Added in version 3.1.
* *
* @ingroup native * @ingroup native
*/ */
@ -273,11 +276,10 @@ GLFWAPI RROutput glfwGetX11Monitor(GLFWmonitor* monitor);
* @return The `Window` of the specified window, or `None` if an * @return The `Window` of the specified window, or `None` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -290,15 +292,116 @@ GLFWAPI Window glfwGetX11Window(GLFWwindow* window);
* @return The `GLXContext` of the specified window, or `NULL` if an * @return The `GLXContext` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window); GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
/*! @brief Returns the `GLXWindow` of the specified window.
*
* @return The `GLXWindow` of the specified window, or `None` if an
* [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI GLXWindow glfwGetGLXWindow(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_WAYLAND)
/*! @brief Returns the `struct wl_display*` used by GLFW.
*
* @return The `struct wl_display*` used by GLFW, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI struct wl_display* glfwGetWaylandDisplay(void);
/*! @brief Returns the `struct wl_output*` of the specified monitor.
*
* @return The `struct wl_output*` of the specified monitor, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI struct wl_output* glfwGetWaylandMonitor(GLFWmonitor* monitor);
/*! @brief Returns the main `struct wl_surface*` of the specified window.
*
* @return The main `struct wl_surface*` of the specified window, or `NULL` if
* an [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI struct wl_surface* glfwGetWaylandWindow(GLFWwindow* window);
#endif
#if defined(GLFW_EXPOSE_NATIVE_MIR)
/*! @brief Returns the `MirConnection*` used by GLFW.
*
* @return The `MirConnection*` used by GLFW, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI MirConnection* glfwGetMirDisplay(void);
/*! @brief Returns the Mir output ID of the specified monitor.
*
* @return The Mir output ID of the specified monitor, or zero if an
* [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI int glfwGetMirMonitor(GLFWmonitor* monitor);
/*! @brief Returns the `MirSurface*` of the specified window.
*
* @return The `MirSurface*` of the specified window, or `NULL` if an
* [error](@ref error_handling) occurred.
*
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
*
* @since Added in version 3.2.
*
* @ingroup native
*/
GLFWAPI MirSurface* glfwGetMirWindow(GLFWwindow* window);
#endif #endif
#if defined(GLFW_EXPOSE_NATIVE_EGL) #if defined(GLFW_EXPOSE_NATIVE_EGL)
@ -307,11 +410,10 @@ GLFWAPI GLXContext glfwGetGLXContext(GLFWwindow* window);
* @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an * @return The `EGLDisplay` used by GLFW, or `EGL_NO_DISPLAY` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -322,11 +424,10 @@ GLFWAPI EGLDisplay glfwGetEGLDisplay(void);
* @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an * @return The `EGLContext` of the specified window, or `EGL_NO_CONTEXT` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */
@ -337,11 +438,10 @@ GLFWAPI EGLContext glfwGetEGLContext(GLFWwindow* window);
* @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an * @return The `EGLSurface` of the specified window, or `EGL_NO_SURFACE` if an
* [error](@ref error_handling) occurred. * [error](@ref error_handling) occurred.
* *
* @par Thread Safety
* This function may be called from any thread. Access is not synchronized.
* @thread_safety This function may be called from any thread. Access is not
* synchronized.
* *
* @par History
* Added in GLFW 3.0.
* @since Added in version 3.0.
* *
* @ingroup native * @ingroup native
*/ */

external/glfw3/lib/linux/libglfw3.a → src/external/glfw3/lib/linux/libglfw3.a View File


external/glfw3/lib/osx/libglfw.3.0.dylib → src/external/glfw3/lib/osx/libglfw.3.0.dylib View File


external/glfw3/lib/osx/libglfw.3.dylib → src/external/glfw3/lib/osx/libglfw.3.dylib View File


external/glfw3/lib/osx/libglfw.dylib → src/external/glfw3/lib/osx/libglfw.dylib View File


BIN
src/external/glfw3/lib/win32/glfw3.dll View File


BIN
src/external/glfw3/lib/win32/libglfw3.a View File


BIN
external/glfw3/lib/win32/libglfw3dll.a → src/external/glfw3/lib/win32/libglfw3dll.a View File


src/jar_mod.h → src/external/jar_mod.h View File


src/jar_xm.h → src/external/jar_xm.h View File


external/openal_soft/COPYING → src/external/openal_soft/COPYING View File


external/openal_soft/include/AL/al.h → src/external/openal_soft/include/AL/al.h View File


external/openal_soft/include/AL/alc.h → src/external/openal_soft/include/AL/alc.h View File


external/openal_soft/include/AL/alext.h → src/external/openal_soft/include/AL/alext.h View File


src_android/jni/include/AL/efx-creative.h → src/external/openal_soft/include/AL/efx-creative.h View File


external/openal_soft/include/AL/efx-presets.h → src/external/openal_soft/include/AL/efx-presets.h View File


external/openal_soft/include/AL/efx.h → src/external/openal_soft/include/AL/efx.h View File


external/openal_soft/openal32.dll → src/external/openal_soft/lib/win32/OpenAL32.dll View File


external/openal_soft/lib/win32/libOpenAL32.dll.a → src/external/openal_soft/lib/win32/libOpenAL32.dll.a View File


src/stb_image.h → src/external/stb_image.h View File


src/stb_image_resize.h → src/external/stb_image_resize.h View File


src/stb_image_write.h → src/external/stb_image_write.h View File


src/stb_rect_pack.h → src/external/stb_rect_pack.h View File


src/stb_truetype.h → src/external/stb_truetype.h View File


src/stb_vorbis.c → src/external/stb_vorbis.c View File


src/stb_vorbis.h → src/external/stb_vorbis.h View File


src/tinfl.c → src/external/tinfl.c View File


BIN
src/libraylib.bc View File


+ 15
- 5
src/rlgl.c View File

@ -48,7 +48,7 @@
#ifdef __APPLE__ #ifdef __APPLE__
#include <OpenGL/gl3.h> // OpenGL 3 library for OSX #include <OpenGL/gl3.h> // OpenGL 3 library for OSX
#else #else
#include "glad.h" // GLAD library, includes OpenGL headers
#include "external/glad.h" // GLAD library, includes OpenGL headers
#endif #endif
#endif #endif
@ -2253,13 +2253,17 @@ void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
// Set a custom projection matrix (replaces internal projection matrix) // Set a custom projection matrix (replaces internal projection matrix)
void SetMatrixProjection(Matrix proj) void SetMatrixProjection(Matrix proj)
{ {
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
projection = proj; projection = proj;
#endif
} }
// Set a custom modelview matrix (replaces internal modelview matrix) // Set a custom modelview matrix (replaces internal modelview matrix)
void SetMatrixModelview(Matrix view) void SetMatrixModelview(Matrix view)
{ {
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
modelview = view; modelview = view;
#endif
} }
// Begin blending mode (alpha, additive, multiplied) // Begin blending mode (alpha, additive, multiplied)
@ -2571,10 +2575,16 @@ static Shader LoadStandardShader(void)
// Load standard shader (TODO: rewrite as char pointers) // Load standard shader (TODO: rewrite as char pointers)
Shader shader = LoadShader("resources/shaders/standard.vs", "resources/shaders/standard.fs"); Shader shader = LoadShader("resources/shaders/standard.vs", "resources/shaders/standard.fs");
if (shader.id != 0) TraceLog(INFO, "[SHDR ID %i] Standard shader loaded successfully", shader.id);
else TraceLog(WARNING, "[SHDR ID %i] Standard shader could not be loaded", shader.id);
if (shader.id != 0) LoadDefaultShaderLocations(&shader);
if (shader.id != 0)
{
LoadDefaultShaderLocations(&shader);
TraceLog(INFO, "[SHDR ID %i] Standard shader loaded successfully", shader.id);
}
else
{
TraceLog(WARNING, "[SHDR ID %i] Standard shader could not be loaded, using default shader", shader.id);
shader = GetDefaultShader();
}
return shader; return shader;
} }

+ 1
- 1
src/text.c View File

@ -34,7 +34,7 @@
// Following libs are used on LoadTTF() // Following libs are used on LoadTTF()
#define STB_TRUETYPE_IMPLEMENTATION #define STB_TRUETYPE_IMPLEMENTATION
#include "stb_truetype.h" // Required for: stbtt_BakeFontBitmap()
#include "external/stb_truetype.h" // Required for: stbtt_BakeFontBitmap()
// Rectangle packing functions (not used at the moment) // Rectangle packing functions (not used at the moment)
//#define STB_RECT_PACK_IMPLEMENTATION //#define STB_RECT_PACK_IMPLEMENTATION

+ 3
- 3
src/textures.c View File

@ -40,12 +40,12 @@
// NOTE: Includes Android fopen function map // NOTE: Includes Android fopen function map
#define STB_IMAGE_IMPLEMENTATION #define STB_IMAGE_IMPLEMENTATION
#include "stb_image.h" // Required for: stbi_load()
#include "external/stb_image.h" // Required for: stbi_load()
// NOTE: Used to read image data (multiple formats support) // NOTE: Used to read image data (multiple formats support)
#define STB_IMAGE_RESIZE_IMPLEMENTATION #define STB_IMAGE_RESIZE_IMPLEMENTATION
#include "stb_image_resize.h" // Required for: stbir_resize_uint8()
// NOTE: Used for image scaling on ImageResize()
#include "external/stb_image_resize.h" // Required for: stbir_resize_uint8()
// NOTE: Used for image scaling on ImageResize()
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Defines and Macros // Defines and Macros

+ 3
- 2
src/utils.c View File

@ -42,10 +42,11 @@
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI) #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_RPI)
#define STB_IMAGE_WRITE_IMPLEMENTATION #define STB_IMAGE_WRITE_IMPLEMENTATION
#include "stb_image_write.h" // Required for: stbi_write_png()
#include "external/stb_image_write.h" // Required for: stbi_write_png()
#endif #endif
#include "tinfl.c"
#include "external/tinfl.c" // Required for: tinfl_decompress_mem_to_mem()
// NOTE: Deflate algorythm data decompression
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// Global Variables Definition // Global Variables Definition

+ 0
- 29
src_android/AndroidManifest.xml View File

@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
* raylib Android
*
* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
*
* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
*
-->
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.raysan5.raylib"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="15" android:targetSdkVersion="19" />
<uses-feature android:glEsVersion="0x00020000" android:required="true" />
<application android:label="@string/app_name" android:icon="@drawable/icon" >
<activity android:name="raylib" android:label="@string/app_name">
<!--android:screenOrientation="landscape" //Set at runtime -->
<meta-data android:name="android.app.lib_name" android:value="@string/app_name" />
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
</manifest>

+ 0
- 92
src_android/build.xml View File

@ -1,92 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project name="raylib" default="help">
<!-- The local.properties file is created and updated by the 'android' tool.
It contains the path to the SDK. It should *NOT* be checked into
Version Control Systems. -->
<property file="local.properties" />
<!-- The ant.properties file can be created by you. It is only edited by the
'android' tool to add properties to it.
This is the place to change some Ant specific build properties.
Here are some properties you may want to change/update:
source.dir
The name of the source directory. Default is 'src'.
out.dir
The name of the output directory. Default is 'bin'.
For other overridable properties, look at the beginning of the rules
files in the SDK, at tools/ant/build.xml
Properties related to the SDK location or the project target should
be updated using the 'android' tool with the 'update' action.
This file is an integral part of the build system for your
application and should be checked into Version Control Systems.
-->
<property file="ant.properties" />
<!-- if sdk.dir was not set from one of the property file, then
get it from the ANDROID_HOME env var.
This must be done before we load project.properties since
the proguard config can use sdk.dir -->
<property environment="env" />
<condition property="sdk.dir" value="${env.ANDROID_HOME}">
<isset property="env.ANDROID_HOME" />
</condition>
<!-- The project.properties file is created and updated by the 'android'
tool, as well as ADT.
This contains project specific properties such as project target, and library
dependencies. Lower level build properties are stored in ant.properties
(or in .classpath for Eclipse projects).
This file is an integral part of the build system for your
application and should be checked into Version Control Systems. -->
<loadproperties srcFile="project.properties" />
<!-- quick check on sdk.dir -->
<fail
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
unless="sdk.dir"
/>
<!--
Import per project custom build rules if present at the root of the project.
This is the place to put custom intermediary targets such as:
-pre-build
-pre-compile
-post-compile (This is typically used for code obfuscation.
Compiled code location: ${out.classes.absolute.dir}
If this is not done in place, override ${out.dex.input.absolute.dir})
-post-package
-post-build
-pre-clean
-->
<import file="custom_rules.xml" optional="true" />
<!-- Import the actual build file.
To customize existing targets, there are two options:
- Customize only one target:
- copy/paste the target into this file, *before* the
<import> task.
- customize it to your needs.
- Customize the whole content of build.xml
- copy/paste the content of the rules files (minus the top node)
into this file, replacing the <import> task.
- customize to your needs.
***********************
****** IMPORTANT ******
***********************
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
in order to avoid having your file be overridden by tools such as "android update project"
-->
<!-- version-tag: 1 -->
<import file="${sdk.dir}/tools/ant/build.xml" />
</project>

+ 0
- 20
src_android/proguard-project.txt View File

@ -1,20 +0,0 @@
# To enable ProGuard in your project, edit project.properties
# to define the proguard.config property as described in that file.
#
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in ${sdk.dir}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the ProGuard
# include property in project.properties.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

+ 0
- 14
src_android/project.properties View File

@ -1,14 +0,0 @@
# This file is automatically generated by Android Tools.
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
#
# This file must be checked in Version Control Systems.
#
# To customize properties used by the Ant build system edit
# "ant.properties", and override values to adapt the script to your
# project structure.
#
# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
# Project target.
target=android-19

BIN
src_android/res/drawable-hdpi/icon.png View File

Before After
Width: 72  |  Height: 72  |  Size: 1.9 KiB

BIN
src_android/res/drawable-ldpi/icon.png View File

Before After
Width: 36  |  Height: 36  |  Size: 1.0 KiB

BIN
src_android/res/drawable-mdpi/icon.png View File

Before After
Width: 48  |  Height: 48  |  Size: 922 B

+ 0
- 4
src_android/res/values/strings.xml View File

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">raylib</string>
</resources>

Loading…
Cancel
Save