From 0d7b3fd069d790fb61e4120ff536e3653de0f600 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 18 Nov 2021 11:17:54 -0800 Subject: [PATCH] add rlSetBlendConstant --- src/rlgl.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/rlgl.h b/src/rlgl.h index 43576f07d..408d2736b 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -618,6 +618,7 @@ RLAPI void rlSetBlendMode(int mode); // Set blending mode RLAPI void rlSetBlendFactors(int glSrcFactor, int glDstFactor, int glEquation); // Set blending mode factor and equation (using OpenGL factors) RLAPI void rlSetBlendColorFactors(int glSrcFactor, int glDstFactor, int glEquation); // Set blending mode factor and equation for colors RLAPI void rlSetBlendAlphaFactors(int glSrcFactor, int glDstFactor, int glEquation); // Set blending mode factor and equation for alpha +RLAPI void rlSetBlendConstant(float r, float g, float b, float a); // Set the color used for constant factors //------------------------------------------------------------------------------------ // Functions Declaration - rlgl functionality @@ -1863,6 +1864,14 @@ void rlSetBlendAlphaFactors(int glSrcFactor, int glDstFactor, int glEquation) #endif } +// Set the color used for constant factors +void rlSetBlendConstant(float r, float g, float b, float a) +{ +#if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) + glBlendColor(r, g, b, a); +#endif +} + //---------------------------------------------------------------------------------- // Module Functions Definition - OpenGL Debug //----------------------------------------------------------------------------------