summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 939a343)
raw | patch | inline | side by side (parent: 939a343)
author | fgsfds <pvt.fgsfds@gmail.com> | |
Wed, 19 Feb 2020 00:34:10 +0000 (03:34 +0300) | ||
committer | fgsfds <pvt.fgsfds@gmail.com> | |
Wed, 19 Feb 2020 00:34:10 +0000 (03:34 +0300) |
src/engine/e_graphics.pas | patch | blob | history |
index 4612a400e8a0055bfe3d7bf85e45e907a2bd942e..de31fa50ea46797507f03521c0fe58429658926a 100644 (file)
else
glDisable(GL_BLEND);
- if Blending = TBlending.Blend then
- glBlendFunc(GL_SRC_ALPHA, GL_ONE)
- else
- if Blending = TBlending.Filter then
- glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR)
- else
- if Blending = TBlending.Invert then
- glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO)
- else
- if Alpha > 0 then
- glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ case Blending of
+ TBlending.None: if Alpha > 0 then glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ TBlending.Blend: glBlendFunc(GL_SRC_ALPHA, GL_ONE);
+ TBlending.Invert: glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_ZERO);
+ TBlending.Filter: glBlendFunc(GL_ZERO, GL_SRC_COLOR);
+ end;
glDisable(GL_TEXTURE_2D);
glColor4ub(Red, Green, Blue, 255-Alpha);
glEnd();
glColor4ub(e_Colors.R, e_Colors.G, e_Colors.B, 255);
-
glDisable(GL_BLEND);
end;