aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2015-09-01 23:15:26 +0200
committerraysan5 <raysan5@gmail.com>2015-09-01 23:15:26 +0200
commit94a1fdc2ae47c29661d9de92a5828b2f0c68d2b7 (patch)
tree04f5da7ebd1216d90ab0c15088867ea33e4a8ec0
parentacc322b3e13e528580fa10a57c3a36c3fd67b9ee (diff)
downloadraylib-94a1fdc2ae47c29661d9de92a5828b2f0c68d2b7.tar.gz
raylib-94a1fdc2ae47c29661d9de92a5828b2f0c68d2b7.zip
Updated some comments
-rw-r--r--src/makefile2
-rw-r--r--src/raymath.c2
-rw-r--r--src/raymath.h2
-rw-r--r--src/rlgl.c14
-rw-r--r--src/utils.h2
5 files changed, 14 insertions, 8 deletions
diff --git a/src/makefile b/src/makefile
index 67123a9a..fea965ee 100644
--- a/src/makefile
+++ b/src/makefile
@@ -2,7 +2,7 @@
#
# raylib makefile for desktop platforms, Raspberry Pi and HTML5 (emscripten)
#
-# Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
+# Copyright (c) 2014 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.c b/src/raymath.c
index f5e30833..b1f90bb8 100644
--- a/src/raymath.c
+++ b/src/raymath.c
@@ -4,7 +4,7 @@
*
* Some useful functions to work with Vector3, Matrix and Quaternions
*
-* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
+* Copyright (c) 2015 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 d93c324c..e140b74c 100644
--- a/src/raymath.h
+++ b/src/raymath.h
@@ -4,7 +4,7 @@
*
* Some useful functions to work with Vector3, Matrix and Quaternions
*
-* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
+* Copyright (c) 2015 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/rlgl.c b/src/rlgl.c
index 8806b429..d9d28ea1 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -2019,6 +2019,8 @@ void *rlglReadTexturePixels(unsigned int textureId, unsigned int format)
Shader LoadShader(char *vsFileName, char *fsFileName)
{
Shader shader;
+
+ shader.id = 0; // Default value in case of loading failure
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
// Shaders loading from external text file
@@ -2180,9 +2182,11 @@ unsigned int LoadShaderProgram(char *vShaderStr, char *fShaderStr)
// Unload a custom shader from memory
void UnloadShader(Shader shader)
{
- rlDeleteShader(shader.id);
-
- TraceLog(INFO, "[SHDR ID %i] Unloaded shader program data", shader.id);
+ if (shader.id != 0)
+ {
+ rlDeleteShader(shader.id);
+ TraceLog(INFO, "[SHDR ID %i] Unloaded shader program data", shader.id);
+ }
}
// Set custom shader to be used on batch draw
@@ -2242,7 +2246,7 @@ void SetPostproShader(Shader shader)
//TraceLog(DEBUG, "Postproquad shader diffuse map id: %i", postproQuad.shader.texDiffuseId);
//TraceLog(DEBUG, "Shader diffuse map id: %i", shader.texDiffuseId);
#elif defined(GRAPHICS_API_OPENGL_11)
- TraceLog(WARNING, "Postprocessing shaders not supported on OpenGL 1.1");
+ TraceLog(WARNING, "Shaders not supported on OpenGL 1.1");
#endif
}
@@ -2287,6 +2291,8 @@ void SetModelShader(Model *model, Shader shader)
// NOTE: If SetModelTexture() is called previously, texture is not assigned to new shader
if (model->texture.id > 0) model->shader.texDiffuseId = model->texture.id;
+#elif (GRAPHICS_API_OPENGL_11)
+ TraceLog(WARNING, "Shaders not supported on OpenGL 1.1");
#endif
}
diff --git a/src/utils.h b/src/utils.h
index 882aebf6..6ef8c933 100644
--- a/src/utils.h
+++ b/src/utils.h
@@ -4,7 +4,7 @@
*
* Some utility functions: rRES files data decompression
*
-* Copyright (c) 2014 Ramon Santamaria (Ray San - raysan@raysanweb.com)
+* Copyright (c) 2014 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.