From f8d065eeb68befc7d579fbc3d57f9ea66c0bdd58 Mon Sep 17 00:00:00 2001 From: Themaister Date: Thu, 17 Apr 2014 15:32:36 +0200 Subject: [PATCH] [HW render] set known blending equation. --- gfx/gl.c | 2 ++ ps3/gcmgl/src/rgl_ps3.cpp | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/gfx/gl.c b/gfx/gl.c index 0848e2ad89..910ef7a01d 100644 --- a/gfx/gl.c +++ b/gfx/gl.c @@ -1458,6 +1458,7 @@ static bool gl_frame(void *data, const void *frame, unsigned width, unsigned hei glDisable(GL_DITHER); glDisable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendEquation(GL_FUNC_ADD); glClearColor(0.0f, 0.0f, 0.0f, 1.0f); } #endif @@ -2070,6 +2071,7 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo #endif glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + glBlendEquation(GL_FUNC_ADD); if (!resolve_extensions(gl)) { diff --git a/ps3/gcmgl/src/rgl_ps3.cpp b/ps3/gcmgl/src/rgl_ps3.cpp index 62e3785884..df3ba34bb7 100644 --- a/ps3/gcmgl/src/rgl_ps3.cpp +++ b/ps3/gcmgl/src/rgl_ps3.cpp @@ -3096,6 +3096,15 @@ GLAPI void APIENTRY glBlendFunc( GLenum sfactor, GLenum dfactor ) LContext->needValidate |= RGL_VALIDATE_BLENDING; } +GLAPI void APIENTRY glBlendEquation( GLenum func ) +{ + RGLcontext* LContext = (RGLcontext*)_CurrentContext; + + LContext->BlendEquationRGB = func; + LContext->BlendEquationAlpha = func; + LContext->needValidate |= RGL_VALIDATE_BLENDING; +} + /*============================================================ FRAMEBUFFER OBJECTS ============================================================ */