Go through gfx_ctx_bind_hw_render

This commit is contained in:
twinaphex 2015-04-10 09:07:53 +02:00
parent 0ef148f460
commit 234baf09bd
3 changed files with 12 additions and 3 deletions

View File

@ -366,12 +366,11 @@ typedef struct gl
static INLINE void context_bind_hw_render(gl_t *gl, bool enable) static INLINE void context_bind_hw_render(gl_t *gl, bool enable)
{ {
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (!gl) if (!gl)
return; return;
if (gl->shared_context_use && ctx->bind_hw_render) if (gl->shared_context_use)
ctx->bind_hw_render(gl, enable); gfx_ctx_bind_hw_render(gl, enable);
} }
static INLINE bool gl_check_error(void) static INLINE bool gl_check_error(void)

View File

@ -107,6 +107,14 @@ void gfx_ctx_swap_buffers(void *data)
ctx->swap_buffers(data); ctx->swap_buffers(data);
} }
void gfx_ctx_bind_hw_render(void *data, bool enable)
{
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();
if (ctx && ctx->bind_hw_render)
ctx->bind_hw_render(data, enable);
}
bool gfx_ctx_focus(void *data) bool gfx_ctx_focus(void *data)
{ {
const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr(); const gfx_ctx_driver_t *ctx = gfx_ctx_get_ptr();

View File

@ -236,6 +236,8 @@ void gfx_ctx_set_resize(void *data, unsigned width, unsigned height);
void gfx_ctx_swap_interval(void *data, unsigned interval); void gfx_ctx_swap_interval(void *data, unsigned interval);
void gfx_ctx_bind_hw_render(void *data, bool enable);
void gfx_ctx_free(void *data); void gfx_ctx_free(void *data);
void gfx_ctx_input_driver(void *data, void gfx_ctx_input_driver(void *data,