diff options
| author | raysan5 <[email protected]> | 2022-01-28 21:25:40 +0100 |
|---|---|---|
| committer | raysan5 <[email protected]> | 2022-01-28 21:25:40 +0100 |
| commit | 44d3cee5d1e779ba9b62394a351537c557f11276 (patch) | |
| tree | 4412f1aea45a846e8faa189681dc5218bc314f59 /src | |
| parent | d38fe92c3f50fe14f051b4822ae9d24dd59067f5 (diff) | |
| download | raylib-44d3cee5d1e779ba9b62394a351537c557f11276.tar.gz raylib-44d3cee5d1e779ba9b62394a351537c557f11276.zip | |
Minor tweak
Diffstat (limited to 'src')
| -rw-r--r-- | src/raylib.h | 2 | ||||
| -rw-r--r-- | src/rlgl.h | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/raylib.h b/src/raylib.h index 6e6e2e2a..70384e28 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -839,7 +839,7 @@ typedef enum { BLEND_MULTIPLIED, // Blend textures multiplying colors BLEND_ADD_COLORS, // Blend textures adding colors (alternative) BLEND_SUBTRACT_COLORS, // Blend textures subtracting colors (alternative) - BLEND_CUSTOM // Belnd textures using custom src/dst factors (use rlSetBlendMode()) + BLEND_CUSTOM // Blend textures using custom src/dst factors (use rlSetBlendMode()) } BlendMode; // Gesture @@ -1778,7 +1778,11 @@ void rlSetBlendMode(int mode) case RL_BLEND_MULTIPLIED: glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA); glBlendEquation(GL_FUNC_ADD); break; case RL_BLEND_ADD_COLORS: glBlendFunc(GL_ONE, GL_ONE); glBlendEquation(GL_FUNC_ADD); break; case RL_BLEND_SUBTRACT_COLORS: glBlendFunc(GL_ONE, GL_ONE); glBlendEquation(GL_FUNC_SUBTRACT); break; - case RL_BLEND_CUSTOM: glBlendFunc(RLGL.State.glBlendSrcFactor, RLGL.State.glBlendDstFactor); glBlendEquation(RLGL.State.glBlendEquation); break; + case RL_BLEND_CUSTOM: + { + // NOTE: Using GL blend src/dst factors and GL equation configured with rlSetBlendFactors() + glBlendFunc(RLGL.State.glBlendSrcFactor, RLGL.State.glBlendDstFactor); glBlendEquation(RLGL.State.glBlendEquation); + } break; default: break; } |
