aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRDR8 <rdr8@protonmail.com>2017-03-20 22:48:43 -0500
committerRDR8 <rdr8@protonmail.com>2017-03-20 22:48:43 -0500
commitae0b776eaf8452fc5c579d5c8be1997fdc38741a (patch)
tree0ad74b0a7d8ab9ba4db59f47e834703a5d2c2084
parent7b424929413c9099e0614f875c287e3f206f1b7e (diff)
parent59652c75b43d0437217c0000b03428545905801e (diff)
downloadraylib-ae0b776eaf8452fc5c579d5c8be1997fdc38741a.tar.gz
raylib-ae0b776eaf8452fc5c579d5c8be1997fdc38741a.zip
Merge remote-tracking branch 'upstream/develop' into staging-linux-gitignore
-rw-r--r--src/audio.c18
-rw-r--r--src/audio.h2
-rw-r--r--src/camera.h4
-rw-r--r--src/core.c18
-rw-r--r--src/gestures.h4
-rw-r--r--src/models.c2
-rw-r--r--src/raylib.h2
-rw-r--r--src/raymath.h2
-rw-r--r--src/rlgl.c47
-rw-r--r--src/rlgl.h45
-rw-r--r--src/rres.h4
-rw-r--r--src/shapes.c2
-rw-r--r--src/text.c2
-rw-r--r--src/textures.c2
-rw-r--r--src/utils.c2
-rw-r--r--src/utils.h7
16 files changed, 83 insertions, 80 deletions
diff --git a/src/audio.c b/src/audio.c
index e0964e02..68bd88e9 100644
--- a/src/audio.c
+++ b/src/audio.c
@@ -2,15 +2,13 @@
*
* raylib.audio - Basic funtionality to work with audio
*
-* DESCRIPTION:
-*
-* This module provides basic functionality to:
-* - Manage audio device (init/close)
-* - Load and unload audio files
-* - Format wave data (sample rate, size, channels)
-* - Play/Stop/Pause/Resume loaded audio
-* - Manage mixing channels
-* - Manage raw audio context
+* FEATURES:
+* - Manage audio device (init/close)
+* - Load and unload audio files
+* - Format wave data (sample rate, size, channels)
+* - Play/Stop/Pause/Resume loaded audio
+* - Manage mixing channels
+* - Manage raw audio context
*
* CONFIGURATION:
*
@@ -51,7 +49,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/audio.h b/src/audio.h
index a0279e3a..8047d9bb 100644
--- a/src/audio.h
+++ b/src/audio.h
@@ -29,7 +29,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/camera.h b/src/camera.h
index 87ba1942..e1b00ac2 100644
--- a/src/camera.h
+++ b/src/camera.h
@@ -1,6 +1,6 @@
/*******************************************************************************************
*
-* raylib Camera System - Camera Modes Setup and Control Functions
+* raylib.camera - Camera system with multiple modes support
*
* NOTE: Memory footprint of this library is aproximately 52 bytes (global variables)
*
@@ -22,7 +22,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2015-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2015-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.
diff --git a/src/core.c b/src/core.c
index f55a70db..5b892cdf 100644
--- a/src/core.c
+++ b/src/core.c
@@ -2,14 +2,14 @@
*
* raylib.core - Basic functions to manage windows, OpenGL context and input on multiple platforms
*
-* The following platforms are supported:
-* Windows (win32/Win64)
-* Linux (tested on Ubuntu)
-* Mac (OSX)
-* Android (API Level 9 or greater)
-* Raspberry Pi (Raspbian)
-* HTML5 (Chrome, Firefox)
-* Oculus Rift CV1
+* PLATFORMS SUPPORTED:
+* - Windows (win32/Win64)
+* - Linux (tested on Ubuntu)
+* - Mac (OSX)
+* - Android (API Level 9 or greater)
+* - Raspberry Pi (Raspbian)
+* - HTML5 (Chrome, Firefox)
+* - Oculus Rift CV1
*
* CONFIGURATION:
*
@@ -49,7 +49,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/gestures.h b/src/gestures.h
index 99f49d2a..42ced889 100644
--- a/src/gestures.h
+++ b/src/gestures.h
@@ -1,6 +1,6 @@
/**********************************************************************************************
*
-* raylib Gestures System - Gestures Processing based on input gesture events (touch/mouse)
+* raylib.gestures - Gestures system, gestures processing based on input events (touch/mouse)
*
* NOTE: Memory footprint of this library is aproximately 128 bytes (global variables)
*
@@ -24,7 +24,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/models.c b/src/models.c
index 8297358b..67e1693c 100644
--- a/src/models.c
+++ b/src/models.c
@@ -13,7 +13,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/raylib.h b/src/raylib.h
index 4fd4b5df..cdefceb2 100644
--- a/src/raylib.h
+++ b/src/raylib.h
@@ -47,7 +47,7 @@
* raylib is licensed under an unmodified zlib/libpng license, which is an OSI-certified,
* BSD-like license that allows static linking with closed source software:
*
-* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2013-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.
diff --git a/src/raymath.h b/src/raymath.h
index a2263f19..7e760957 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -1,6 +1,6 @@
/**********************************************************************************************
*
-* raymath v1.0 - Some useful functions to work with Vector3, Matrix and Quaternions
+* raymath v1.0 - Math functions to work with Vector3, Matrix and Quaternions
*
* CONFIGURATION:
*
diff --git a/src/rlgl.c b/src/rlgl.c
index 00998624..d76f90bb 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -2,10 +2,8 @@
*
* rlgl - raylib OpenGL abstraction layer
*
-* DESCRIPTION:
-*
-* rlgl allows usage of OpenGL 1.1 style functions (rlVertex) that are internally mapped to
-* selected OpenGL version (1.1, 2.1, 3.3 Core, ES 2.0).
+* rlgl is a wrapper for multiple OpenGL versions (1.1, 2.1, 3.3 Core, ES 2.0) to
+* pseudo-OpenGL 1.1 style functions (rlVertex, rlTranslate, rlRotate...).
*
* When chosing an OpenGL version greater than OpenGL 1.1, rlgl stores vertex data on internal
* VBO buffers (and VAOs if available). It requires calling 3 functions:
@@ -16,32 +14,19 @@
* CONFIGURATION:
*
* #define GRAPHICS_API_OPENGL_11
-* Use OpenGL 1.1 backend
-*
* #define GRAPHICS_API_OPENGL_21
-* Use OpenGL 2.1 backend
-*
* #define GRAPHICS_API_OPENGL_33
-* Use OpenGL 3.3 Core profile backend
-*
* #define GRAPHICS_API_OPENGL_ES2
-* Use OpenGL ES 2.0 backend
+* Use selected OpenGL backend
*
* #define RLGL_STANDALONE
* Use rlgl as standalone library (no raylib dependency)
*
-* #define RLGL_NO_DISTORTION_SHADER
-* Avoid stereo rendering distortion sahder (shader_distortion.h) inclusion
-*
-* #define SUPPORT_SHADER_DEFAULT / ENABLE_SHADER_DEFAULT
+* #define SUPPORT_VR_SIMULATION / SUPPORT_STEREO_RENDERING
+* Support VR simulation functionality (stereo rendering)
*
* #define SUPPORT_SHADER_DISTORTION
-*
-* #define SUPPORT_VR_SIMULATION
-*
-* #define SUPPORT_STEREO_RENDERING
-*
-* #define RLGL_NO_DEFAULT_SHADER
+* Include stereo rendering distortion shader (shader_distortion.h)
*
* DEPENDENCIES:
* raymath - 3D math functionality (Vector3, Matrix, Quaternion)
@@ -50,7 +35,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
@@ -295,6 +280,13 @@ static bool texCompETC1Supported = false; // ETC1 texture compression support
static bool texCompETC2Supported = false; // ETC2/EAC texture compression support
static bool texCompPVRTSupported = false; // PVR texture compression support
static bool texCompASTCSupported = false; // ASTC texture compression support
+
+// VR global variables
+static VrDeviceInfo hmd; // Current VR device info
+static VrStereoConfig vrConfig; // VR stereo configuration for simulator
+static bool vrSimulatorReady = false; // VR simulator ready flag
+static bool vrStereoRender = false; // VR stereo rendering enabled/disabled flag
+ // NOTE: This flag is useful to render data over stereo image (i.e. FPS)
#endif
// Extension supported flag: Anisotropic filtering
@@ -304,13 +296,6 @@ static float maxAnisotropicLevel = 0.0f; // Maximum anisotropy level supp
// Extension supported flag: Clamp mirror wrap mode
static bool texClampMirrorSupported = false; // Clamp mirror wrap mode supported
-// VR global variables
-static VrDeviceInfo hmd; // Current VR device info
-static VrStereoConfig vrConfig; // VR stereo configuration for simulator
-static bool vrSimulatorReady = false; // VR simulator ready flag
-static bool vrStereoRender = false; // VR stereo rendering enabled/disabled flag
- // NOTE: This flag is useful to render data over stereo image (i.e. FPS)
-
#if defined(GRAPHICS_API_OPENGL_ES2)
// NOTE: VAO functionality is exposed through extensions (OES)
static PFNGLGENVERTEXARRAYSOESPROC glGenVertexArrays;
@@ -2636,7 +2621,11 @@ void CloseVrSimulator(void)
// Detect if VR simulator is running
bool IsVrSimulatorReady(void)
{
+#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
return vrSimulatorReady;
+#else
+ return false;
+#endif
}
// Enable/Disable VR experience (device or simulator)
diff --git a/src/rlgl.h b/src/rlgl.h
index 344da987..a870a907 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -2,8 +2,8 @@
*
* rlgl - raylib OpenGL abstraction layer
*
-* rlgl allows usage of OpenGL 1.1 style functions (rlVertex) that are internally mapped to
-* selected OpenGL version (1.1, 2.1, 3.3 Core, ES 2.0).
+* rlgl is a wrapper for multiple OpenGL versions (1.1, 2.1, 3.3 Core, ES 2.0) to
+* pseudo-OpenGL 1.1 style functions (rlVertex, rlTranslate, rlRotate...).
*
* When chosing an OpenGL version greater than OpenGL 1.1, rlgl stores vertex data on internal
* VBO buffers (and VAOs if available). It requires calling 3 functions:
@@ -11,18 +11,29 @@
* rlglDraw() - Process internal buffers and send required draw calls
* rlglClose() - De-initialize internal buffers data and other auxiliar resources
*
-* External libs:
+* CONFIGURATION:
+*
+* #define GRAPHICS_API_OPENGL_11
+* #define GRAPHICS_API_OPENGL_21
+* #define GRAPHICS_API_OPENGL_33
+* #define GRAPHICS_API_OPENGL_ES2
+* Use selected OpenGL backend
+*
+* #define RLGL_STANDALONE
+* Use rlgl as standalone library (no raylib dependency)
+*
+* #define SUPPORT_VR_SIMULATION / SUPPORT_STEREO_RENDERING
+* Support VR simulation functionality (stereo rendering)
+*
+* #define SUPPORT_SHADER_DISTORTION
+* Include stereo rendering distortion shader (shader_distortion.h)
+*
+* DEPENDENCIES:
* raymath - 3D math functionality (Vector3, Matrix, Quaternion)
* GLAD - OpenGL extensions loading (OpenGL 3.3 Core only)
*
-* Module Configuration Flags:
-* GRAPHICS_API_OPENGL_11 - Use OpenGL 1.1 backend
-* GRAPHICS_API_OPENGL_21 - Use OpenGL 2.1 backend
-* GRAPHICS_API_OPENGL_33 - Use OpenGL 3.3 Core profile backend
-* GRAPHICS_API_OPENGL_ES2 - Use OpenGL ES 2.0 backend
-*
-* RLGL_STANDALONE - Use rlgl as standalone library (no raylib dependency)
*
+* LICENSE: zlib/libpng
*
* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
*
@@ -124,15 +135,21 @@
#define RL_WRAP_CLAMP 0x812F // GL_CLAMP_TO_EDGE
#define RL_WRAP_CLAMP_MIRROR 0x8742 // GL_MIRROR_CLAMP_EXT
+// Matrix modes (equivalent to OpenGL)
+#define RL_MODELVIEW 0x1700 // GL_MODELVIEW
+#define RL_PROJECTION 0x1701 // GL_PROJECTION
+#define RL_TEXTURE 0x1702 // GL_TEXTURE
+
+// Primitive assembly draw modes
+#define RL_LINES 0x0001 // GL_LINES
+#define RL_TRIANGLES 0x0004 // GL_TRIANGLES
+#define RL_QUADS 0x0007 // GL_QUADS
+
//----------------------------------------------------------------------------------
// Types and Structures Definition
//----------------------------------------------------------------------------------
typedef enum { OPENGL_11 = 1, OPENGL_21, OPENGL_33, OPENGL_ES_20 } GlVersion;
-typedef enum { RL_PROJECTION, RL_MODELVIEW, RL_TEXTURE } MatrixMode;
-
-typedef enum { RL_LINES, RL_TRIANGLES, RL_QUADS } DrawMode;
-
typedef unsigned char byte;
#if defined(RLGL_STANDALONE)
diff --git a/src/rres.h b/src/rres.h
index 362da10d..65ebdbba 100644
--- a/src/rres.h
+++ b/src/rres.h
@@ -1,8 +1,6 @@
/**********************************************************************************************
*
-* rres - raylib Resource custom format management functions
-*
-* Basic functions to load/save rRES resource files
+* rres v1.0 - raylib resource (rRES) custom fileformat management functions
*
* CONFIGURATION:
*
diff --git a/src/shapes.c b/src/shapes.c
index 5ed633f6..2a924476 100644
--- a/src/shapes.c
+++ b/src/shapes.c
@@ -13,7 +13,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/text.c b/src/text.c
index 18ebf482..2d249b6d 100644
--- a/src/text.c
+++ b/src/text.c
@@ -18,7 +18,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/textures.c b/src/textures.c
index 7db3bf56..f323f352 100644
--- a/src/textures.c
+++ b/src/textures.c
@@ -31,7 +31,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/utils.c b/src/utils.c
index 54923e34..4d30cbc7 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -25,7 +25,7 @@
*
* LICENSE: zlib/libpng
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* Copyright (c) 2014-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.
diff --git a/src/utils.h b/src/utils.h
index 037d7e94..45ffcf81 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -1,10 +1,11 @@
/**********************************************************************************************
*
-* raylib.utils
+* raylib.utils - Some common utility functions
*
-* Some utility functions
*
-* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
+* LICENSE: zlib/libpng
+*
+* Copyright (c) 2014-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.