From 8eab7e6631148667e7bae4f5668b2930ba042120 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 30 Mar 2015 02:53:11 +0200 Subject: [PATCH] Demacroize context_bind_hw_render --- gfx/gl_common.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gfx/gl_common.h b/gfx/gl_common.h index 54cf86ec28..a5b9f5ecca 100644 --- a/gfx/gl_common.h +++ b/gfx/gl_common.h @@ -38,7 +38,6 @@ #include -#define context_bind_hw_render(gl, enable) if (gl->shared_context_use && gl->ctx_driver->bind_hw_render) gl->ctx_driver->bind_hw_render(gl, enable) #if (!defined(HAVE_OPENGLES) || defined(HAVE_OPENGLES3)) #define HAVE_GL_ASYNC_READBACK @@ -384,6 +383,15 @@ typedef struct gl GLuint vao; } gl_t; +static INLINE void context_bind_hw_render(gl_t *gl, bool enable) +{ + if (!gl) + return; + + if (gl->shared_context_use && gl->ctx_driver->bind_hw_render) + gl->ctx_driver->bind_hw_render(gl, enable); +} + static INLINE bool gl_check_error(void) { int error = glGetError();