diff --git a/gfx/common/gl_common.c b/gfx/common/gl_common.c index 17f3bcb715..be0d96cb4c 100644 --- a/gfx/common/gl_common.c +++ b/gfx/common/gl_common.c @@ -17,6 +17,11 @@ #include +void gl_clear(void) +{ + glClear(GL_COLOR_BUFFER_BIT); +} + void gl_disable(unsigned _cap) { GLenum cap = (GLenum)_cap; diff --git a/gfx/common/gl_common.h b/gfx/common/gl_common.h index 7cfcfb7c2c..82f61fb10a 100644 --- a/gfx/common/gl_common.h +++ b/gfx/common/gl_common.h @@ -17,6 +17,8 @@ #ifndef __GL_COMMON_H #define __GL_COMMON_H +void gl_clear(void) + void gl_enable(unsigned cap); void gl_disable(unsigned cap); diff --git a/gfx/drivers_context/drm_ctx.c b/gfx/drivers_context/drm_ctx.c index b8b04cd8ea..433bbc13c8 100644 --- a/gfx/drivers_context/drm_ctx.c +++ b/gfx/drivers_context/drm_ctx.c @@ -667,7 +667,7 @@ static bool gfx_ctx_drm_egl_set_video_mode(gfx_ctx_drm_data_t *drm) case GFX_CTX_OPENGL_API: case GFX_CTX_OPENGL_ES_API: #if defined(HAVE_OPENGL) || defined(HAVE_OPENGLES) - glClear(GL_COLOR_BUFFER_BIT); + gl_clear(); #endif break; case GFX_CTX_NONE: diff --git a/gfx/drivers_context/drm_go2_ctx.c b/gfx/drivers_context/drm_go2_ctx.c index 72ce4edfd9..9457ddb0f0 100644 --- a/gfx/drivers_context/drm_go2_ctx.c +++ b/gfx/drivers_context/drm_go2_ctx.c @@ -258,7 +258,7 @@ static bool gfx_ctx_go2_drm_set_video_mode(void *data, go2_context_make_current(drm->context); - glClear(GL_COLOR_BUFFER_BIT); + gl_clear(); return true; }