From 4228fbb0d44ef0f802c4f5d04beb574998d7eef9 Mon Sep 17 00:00:00 2001 From: hiker Date: Wed, 20 Aug 2014 21:24:20 +1000 Subject: [PATCH] Temporary fixed windows compilation (glGetStringi not known). Needs a proper fix!! --- src/graphics/glwrap.cpp | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/graphics/glwrap.cpp b/src/graphics/glwrap.cpp index 13da4236b..fbb64e077 100644 --- a/src/graphics/glwrap.cpp +++ b/src/graphics/glwrap.cpp @@ -1214,18 +1214,25 @@ void GL32_draw2DRectangle(video::SColor color, const core::rect& position, glGetError(); } -bool hasGLExtension(const char* extension) { +bool hasGLExtension(const char* extension) +{ +#ifdef WIN32 + return false; +#else GLint numExtensions = 0; glGetIntegerv(GL_NUM_EXTENSIONS, &numExtensions); Log::debug("GLWrap", "Found %d OpenGL Extensions", numExtensions); - for (GLint i = 0; i < numExtensions; i++) { + for (GLint i = 0; i < numExtensions; i++) + { const char* foundExtension = (const char*) glGetStringi(GL_EXTENSIONS, i); - if (foundExtension && strcmp(foundExtension, extension) == 0) { + if (foundExtension && strcmp(foundExtension, extension) == 0) + { Log::debug("GLWrap", "Extension %s found", extension); return true; } } Log::debug("GLWrap", "Extension %s not found", extension); return false; +#endif }