From c55873c324445b167b6f0375d5a1801c34cf4a57 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 24 Apr 2019 03:33:32 +0200 Subject: [PATCH] (GL_CORE) More updates --- gfx/common/gl_common.h | 17 ----------------- gfx/video_driver.h | 18 ++++++++++++++++++ menu/drivers_display/menu_display_gl_core.c | 1 - 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/gfx/common/gl_common.h b/gfx/common/gl_common.h index 42cb6682e3..90b993f0fe 100644 --- a/gfx/common/gl_common.h +++ b/gfx/common/gl_common.h @@ -256,23 +256,6 @@ static INLINE void gl_bind_texture(GLuint id, GLint wrap_mode, GLint mag_filter, glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, min_filter); } -static INLINE bool gl_set_core_context(enum retro_hw_context_type ctx_type) -{ - gfx_ctx_flags_t flags; - if (ctx_type != RETRO_HW_CONTEXT_OPENGL_CORE) - return false; - - /** - * Ensure that the rest of the frontend knows we have a core context - */ - flags.flags = 0; - BIT32_SET(flags.flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT); - - video_context_driver_set_flags(&flags); - - return true; -} - bool gl_query_core_context_in_use(void); bool gl_load_luts( diff --git a/gfx/video_driver.h b/gfx/video_driver.h index a005e3dc87..16fe01f710 100644 --- a/gfx/video_driver.h +++ b/gfx/video_driver.h @@ -22,6 +22,7 @@ #include #include +#include #include #include @@ -1202,6 +1203,23 @@ void video_driver_set_gpu_api_version_string(const char *str); const char* video_driver_get_gpu_api_version_string(void); +static INLINE bool gl_set_core_context(enum retro_hw_context_type ctx_type) +{ + gfx_ctx_flags_t flags; + if (ctx_type != RETRO_HW_CONTEXT_OPENGL_CORE) + return false; + + /** + * Ensure that the rest of the frontend knows we have a core context + */ + flags.flags = 0; + BIT32_SET(flags.flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT); + + video_context_driver_set_flags(&flags); + + return true; +} + extern video_driver_t video_gl_core; extern video_driver_t video_gl2; extern video_driver_t video_gl1; diff --git a/menu/drivers_display/menu_display_gl_core.c b/menu/drivers_display/menu_display_gl_core.c index 1e3ee8bc5f..898735e9bd 100644 --- a/menu/drivers_display/menu_display_gl_core.c +++ b/menu/drivers_display/menu_display_gl_core.c @@ -157,7 +157,6 @@ static void menu_display_gl_core_draw(menu_display_ctx_draw_t *draw, const float *vertex = NULL; const float *tex_coord = NULL; const float *color = NULL; - struct gl_core_vertex *pv = NULL; GLuint texture = 0; gl_core_t *gl = (gl_core_t*)video_info->userdata; const struct gl_core_buffer_locations *loc = NULL;