aboutsummaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorRay <raysan5@gmail.com>2016-06-17 00:29:46 +0200
committerRay <raysan5@gmail.com>2016-06-17 00:29:46 +0200
commit9fdf4420d5354c32394246703015a686df8135ce (patch)
treec792e5c7dd8889b77eb6a87ac4b6b4a85fcd59a5 /src/rlgl.c
parent4df7a0f2f8cf5c4dde236bd99d05d83c7b472db5 (diff)
downloadraylib-9fdf4420d5354c32394246703015a686df8135ce.tar.gz
raylib-9fdf4420d5354c32394246703015a686df8135ce.zip
Corrected bugs on OpenGL 2.1
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 99ef4a4f..6d003869 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -1214,14 +1214,17 @@ void rlglInitGraphics(int offsetX, int offsetY, int width, int height)
// NOTE: External loader function could be passed as a pointer
void rlglLoadExtensions(void *loader)
{
-#if defined(GRAPHICS_API_OPENGL_33)
- // NOTE: glad is generated and contains only required OpenGL 3.3 Core extensions
+#if defined(GRAPHICS_API_OPENGL_21) || defined(GRAPHICS_API_OPENGL_33)
+ // NOTE: glad is generated and contains only required OpenGL 3.3 Core extensions (and lower versions)
if (!gladLoadGLLoader((GLADloadproc)loader)) TraceLog(WARNING, "GLAD: Cannot load OpenGL extensions");
else TraceLog(INFO, "GLAD: OpenGL extensions loaded successfully");
-
+
+#if defined(GRAPHICS_API_OPENGL_21)
if (GLAD_GL_VERSION_2_1) TraceLog(INFO, "OpenGL 2.1 profile supported");
- else if(GLAD_GL_VERSION_3_3) TraceLog(INFO, "OpenGL 3.3 Core profile supported");
+#elif defined(GRAPHICS_API_OPENGL_33)
+ if(GLAD_GL_VERSION_3_3) TraceLog(INFO, "OpenGL 3.3 Core profile supported");
else TraceLog(ERROR, "OpenGL 3.3 Core profile not supported");
+#endif
// With GLAD, we can check if an extension is supported using the GLAD_GL_xxx booleans
//if (GLAD_GL_ARB_vertex_array_object) // Use GL_ARB_vertex_array_object
@@ -2597,6 +2600,8 @@ void EndOculusDrawing(void)
// Blit mirror texture to back buffer
BlitOculusMirror(session, mirror);
+
+ rlDisableDepthTest();
}
#endif