(GL) Store major/minor version

This commit is contained in:
twinaphex 2015-12-13 14:55:19 +01:00
parent e7749c5d42
commit 6feff79547
2 changed files with 6 additions and 0 deletions

View File

@ -174,6 +174,9 @@
typedef struct gl typedef struct gl
{ {
int version_major;
int version_minor;
bool vsync; bool vsync;
GLuint texture[GFX_MAX_TEXTURES]; GLuint texture[GFX_MAX_TEXTURES];
unsigned tex_index; /* For use with PREV. */ unsigned tex_index; /* For use with PREV. */

View File

@ -2495,6 +2495,9 @@ static void *gl_init(const video_info_t *video, const input_driver_t **input, vo
RARCH_LOG("[GL]: Vendor: %s, Renderer: %s.\n", vendor, renderer); RARCH_LOG("[GL]: Vendor: %s, Renderer: %s.\n", vendor, renderer);
RARCH_LOG("[GL]: Version: %s.\n", version); RARCH_LOG("[GL]: Version: %s.\n", version);
if (version && version[0] != '\0')
sscanf(version, "%d.%d", &gl->version_major, &gl->version_minor);
#ifndef RARCH_CONSOLE #ifndef RARCH_CONSOLE
rglgen_resolve_symbols(ctx_driver->get_proc_address); rglgen_resolve_symbols(ctx_driver->get_proc_address);
#endif #endif