summaryrefslogtreecommitdiffhomepage
path: root/src/rlgl.h
diff options
context:
space:
mode:
authorvictorfisac <[email protected]>2016-11-21 20:27:43 +0100
committervictorfisac <[email protected]>2016-11-21 20:27:43 +0100
commit0716125ee93db7539a27e831eba3c856f55601ab (patch)
treeb4ee417efa904f26b6b08bd25d66538ebe267283 /src/rlgl.h
parent80f6b2f9635d8e4707b528337c39c0ba7bf9cf5f (diff)
parent918fc002d0e75f5ea15036634edf8aa3fba9bedc (diff)
downloadraylib-0716125ee93db7539a27e831eba3c856f55601ab.tar.gz
raylib-0716125ee93db7539a27e831eba3c856f55601ab.zip
Merge remote-tracking branch 'refs/remotes/raysan5/develop' into develop
Diffstat (limited to 'src/rlgl.h')
-rw-r--r--src/rlgl.h34
1 files changed, 25 insertions, 9 deletions
diff --git a/src/rlgl.h b/src/rlgl.h
index 9be73f36..7d328a52 100644
--- a/src/rlgl.h
+++ b/src/rlgl.h
@@ -2,11 +2,27 @@
*
* rlgl - raylib OpenGL abstraction layer
*
-* raylib now uses OpenGL 1.1 style functions (rlVertex) that are mapped to selected OpenGL version:
-* OpenGL 1.1 - Direct map rl* -> gl*
-* OpenGL 2.1 - Vertex data is stored in VBOs, call rlglDraw() to render
-* OpenGL 3.3 - Vertex data is stored in VAOs, call rlglDraw() to render
-* OpenGL ES 2 - Vertex data is stored in VBOs or VAOs (when available), call rlglDraw() to render
+* 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).
+*
+* 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:
+* rlglInit() - Initialize internal buffers and auxiliar resources
+* rlglDraw() - Process internal buffers and send required draw calls
+* rlglClose() - De-initialize internal buffers data and other auxiliar resources
+*
+* External libs:
+* 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)
+*
*
* Copyright (c) 2014-2016 Ramon Santamaria (@raysan5)
*
@@ -117,15 +133,14 @@ 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)
#ifndef __cplusplus
// Boolean type
typedef enum { false, true } bool;
#endif
- // byte type
- typedef unsigned char byte;
-
// Color type, RGBA (32bit)
typedef struct Color {
unsigned char r;
@@ -408,7 +423,8 @@ float *MatrixToFloat(Matrix mat);
void InitVrDevice(int vrDevice); // Init VR device
void CloseVrDevice(void); // Close VR device
-bool IsVrDeviceReady(void); // Detect if VR device (or simulator) is ready
+bool IsVrDeviceReady(void); // Detect if VR device is ready
+bool IsVrSimulator(void); // Detect if VR simulator is running
void UpdateVrTracking(Camera *camera); // Update VR tracking (position and orientation) and camera
void ToggleVrMode(void); // Enable/Disable VR experience (device or simulator)