diff options
| author | Random <[email protected]> | 2020-05-16 04:39:38 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-16 13:39:38 +0200 |
| commit | d9a96c4ca0481d9607276c77bc7c799edcbb74d5 (patch) | |
| tree | df80207855f21fe5fdc2579d04ec64e789686719 /src/rlgl.h | |
| parent | abb94bd2fff7f7722f7f0bee492337dd8bd95b35 (diff) | |
| download | raylib-d9a96c4ca0481d9607276c77bc7c799edcbb74d5.tar.gz raylib-d9a96c4ca0481d9607276c77bc7c799edcbb74d5.zip | |
added BLEND_SET (#1251)
* added BLEND_SET
* renamed BLEND_SET to BLEND_ADD_COLORS
Diffstat (limited to 'src/rlgl.h')
| -rw-r--r-- | src/rlgl.h | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -382,7 +382,8 @@ typedef unsigned char byte; typedef enum { BLEND_ALPHA = 0, BLEND_ADDITIVE, - BLEND_MULTIPLIED + BLEND_MULTIPLIED, + BLEND_ADD_COLORS } BlendMode; // Shader location point type @@ -3558,15 +3559,16 @@ void BeginBlendMode(int mode) { static int blendMode = 0; // Track current blending mode - if ((blendMode != mode) && (mode < 3)) + if ((blendMode != mode) && (mode < 4)) { rlglDraw(); switch (mode) { case BLEND_ALPHA: glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); break; - case BLEND_ADDITIVE: glBlendFunc(GL_SRC_ALPHA, GL_ONE); break; // Alternative: glBlendFunc(GL_ONE, GL_ONE); + case BLEND_ADDITIVE: glBlendFunc(GL_SRC_ALPHA, GL_ONE); break; case BLEND_MULTIPLIED: glBlendFunc(GL_DST_COLOR, GL_ONE_MINUS_SRC_ALPHA); break; + case BLEND_ADD_COLORS: glBlendFunc(GL_ONE, GL_ONE); break; default: break; } |
