aboutsummaryrefslogtreecommitdiff
path: root/src/rlgl.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2016-05-31 17:11:02 +0200
committerraysan5 <raysan5@gmail.com>2016-05-31 17:11:02 +0200
commitcac2a66debd0f2d3ef8195940f8e2744d539d19a (patch)
tree423a8c52e5eda51008580f9c919a78034766204c /src/rlgl.c
parentcaa7bc366b949310fbb9c7eafbb9fa7050e1514a (diff)
downloadraylib-cac2a66debd0f2d3ef8195940f8e2744d539d19a.tar.gz
raylib-cac2a66debd0f2d3ef8195940f8e2744d539d19a.zip
Improved library consistency
Functions renamed to improve library consistency
Diffstat (limited to 'src/rlgl.c')
-rw-r--r--src/rlgl.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/rlgl.c b/src/rlgl.c
index 97a92a4d..5c4c9c01 100644
--- a/src/rlgl.c
+++ b/src/rlgl.c
@@ -2157,7 +2157,7 @@ void UnloadShader(Shader shader)
}
// Set custom shader to be used on batch draw
-void SetCustomShader(Shader shader)
+void BeginShaderMode(Shader shader)
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
if (currentShader.id != shader.id)
@@ -2169,10 +2169,10 @@ void SetCustomShader(Shader shader)
}
// Set default shader to be used in batch draw
-void SetDefaultShader(void)
+void EndShaderMode(void)
{
#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2)
- SetCustomShader(defaultShader);
+ BeginShaderMode(defaultShader);
#endif
}
@@ -2254,9 +2254,9 @@ void SetShaderValueMatrix(Shader shader, int uniformLoc, Matrix mat)
#endif
}
-// Set blending mode (alpha, additive, multiplied)
-// NOTE: Only 3 blending modes predefined
-void SetBlendMode(int mode)
+// Begin blending mode (alpha, additive, multiplied)
+// NOTE: Only 3 blending modes supported, default blend mode is alpha
+void BeginBlendMode(int mode)
{
if ((blendMode != mode) && (mode < 3))
{
@@ -2274,6 +2274,12 @@ void SetBlendMode(int mode)
}
}
+// End blending mode (reset to default: alpha blending)
+void EndBlendMode(void)
+{
+ BeginBlendMode(BLEND_ALPHA);
+}
+
// Create a new light, initialize it and add to pool
Light CreateLight(int type, Vector3 position, Color diffuse)
{