From 9bc10fef7a71730572ca36088e940d4d2d9f303d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Higor=20Eur=C3=ADpedes?= Date: Fri, 27 Nov 2015 21:51:51 -0300 Subject: [PATCH] (gl) Fix invalid enum error --- gfx/drivers/gl.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gfx/drivers/gl.c b/gfx/drivers/gl.c index 741e0eb771..d52e15b7f8 100644 --- a/gfx/drivers/gl.c +++ b/gfx/drivers/gl.c @@ -2065,8 +2065,11 @@ static bool resolve_extensions(gl_t *gl, const char *context_ident) glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size); - if (arb_frag_program) - glGetIntegerv(GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, &max_native_instr); +#ifdef GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB + if (arb_frag_program && glGetProgramivARB) + glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, + GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB, &max_native_instr); +#endif gl->have_full_npot_support = arb_npot && arb_frag_program && (max_texture_size >= 8192) && (max_native_instr >= 4096);