Changeset View
Standalone View
source/lib/ogl.cpp
Show All 21 Lines | |||||
/* | /* | ||||
* OpenGL helper functions. | * OpenGL helper functions. | ||||
*/ | */ | ||||
#include "precompiled.h" | #include "precompiled.h" | ||||
#include "lib/ogl.h" | #include "lib/ogl.h" | ||||
#include "lib/config2.h" | |||||
leper: I prefer full paths. | |||||
#include "lib/debug.h" | |||||
#include "lib/external_libraries/libsdl.h" | |||||
#include "lib/res/h_mgr.h" | |||||
#include "ps/CLogger.h" | |||||
#include <stdio.h> | #include <stdio.h> | ||||
#include <string.h> | #include <string.h> | ||||
#include <stdarg.h> | #include <stdarg.h> | ||||
#include "lib/external_libraries/libsdl.h" | #if !CONFIG2_GLES | ||||
#include "lib/debug.h" | # if OS_WIN | ||||
#include "lib/res/h_mgr.h" | # include <glad/wgl.h> | ||||
# elif !OS_MACOSX && !OS_MAC | |||||
# include <glad/glx.h> | |||||
# endif | |||||
#endif | |||||
#if MSC_VERSION | #if MSC_VERSION | ||||
#pragma comment(lib, "opengl32.lib") | #pragma comment(lib, "opengl32.lib") | ||||
#endif | #endif | ||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// extensions | // extensions | ||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// define extension function pointers | static const char* exts = nullptr; | ||||
extern "C" | |||||
{ | |||||
#define FUNC(ret, name, params) ret (GL_CALL_CONV *p##name) params; | |||||
#define FUNC2(ret, nameARB, nameCore, version, params) ret (GL_CALL_CONV *p##nameARB) params; | |||||
#define FUNC3(ret, nameARB, nameCore, version, params) ret (GL_CALL_CONV *p##nameCore) params; | |||||
#include "lib/external_libraries/glext_funcs.h" | |||||
#undef FUNC3 | |||||
#undef FUNC2 | |||||
#undef FUNC | |||||
} | |||||
static bool have_30 = false; | |||||
static const char* exts = NULL; | static bool have_21 = false; | ||||
static bool have_30, have_21, have_20, have_15, have_14, have_13, have_12; | static bool have_20 = false; | ||||
static bool have_15 = false; | |||||
static bool have_14 = false; | |||||
static bool have_13 = false; | |||||
static bool have_12 = false; | |||||
// return a C string of unspecified length containing a space-separated | // return a C string of unspecified length containing a space-separated | ||||
// list of all extensions the OpenGL implementation advertises. | // list of all extensions the OpenGL implementation advertises. | ||||
// (useful for crash logs). | // (useful for crash logs). | ||||
const char* ogl_ExtensionString() | const char* ogl_ExtensionString() | ||||
{ | { | ||||
ENSURE(exts && "call ogl_Init before using this function"); | ENSURE(exts && "call ogl_Init before using this function"); | ||||
return exts; | return exts; | ||||
} | } | ||||
// paranoia: newer drivers may forget to advertise an extension | // paranoia: newer drivers may forget to advertise an extension | ||||
// indicating support for something that has been folded into the core. | // indicating support for something that has been folded into the core. | ||||
// we therefore check for all extensions known to be offered by the | // we therefore check for all extensions known to be offered by the | ||||
// GL implementation present on the user's system; ogl_HaveExtension will | // GL implementation present on the user's system; ogl_HaveExtension will | ||||
// take this into account. | // take this into account. | ||||
// the app can therefore just ask for extensions and not worry about this. | // the app can therefore just ask for extensions and not worry about this. | ||||
Done Inline ActionsActually it's still needed until we have to deal with ARB shaders and very old platforms. vladislavbelov: Actually it's still needed until we have to deal with ARB shaders and very old platforms. | |||||
static bool isImplementedInCore(const char* ext) | static bool isImplementedInCore(const char* ext) | ||||
{ | { | ||||
#define MATCH(known_ext)\ | #define MATCH(known_ext)\ | ||||
if(!strcmp(ext, #known_ext))\ | if(!strcmp(ext, #known_ext))\ | ||||
return true; | return true; | ||||
if(have_30) | if(have_30) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 119 Lines • ▼ Show 20 Lines | for(;;) | ||||
// i.e. it starts and ends with ' ' | // i.e. it starts and ends with ' ' | ||||
if((p == exts || p[-1] == ' ') && // valid start AND | if((p == exts || p[-1] == ' ') && // valid start AND | ||||
(*end == ' ' || *end == '\0')) // valid end | (*end == ' ' || *end == '\0')) // valid end | ||||
return true; | return true; | ||||
p = end; | p = end; | ||||
} | } | ||||
} | } | ||||
static int GLVersion; | |||||
#ifdef OS_WIN | |||||
static int WGLVersion; | |||||
#elif !CONFIG2_GLES && !OS_MACOSX && !OS_MAC | |||||
static int GLXVersion; | |||||
#endif | |||||
// check if the OpenGL implementation is at least at <version>. | bool ogl_HaveVersion(int major, int minor) | ||||
// (format: "%d.%d" major minor) | |||||
bool ogl_HaveVersion(const char* desired_version) | |||||
{ | |||||
int desired_major, desired_minor; | |||||
if(sscanf_s(desired_version, "%d.%d", &desired_major, &desired_minor) != 2) | |||||
{ | |||||
DEBUG_WARN_ERR(ERR::LOGIC); // invalid version string | |||||
return false; | |||||
} | |||||
// guaranteed to be of the form "major.minor[.release][ vendor-specific]" | |||||
// or "OpenGL ES major.minor[.release][ vendor-specific]". | |||||
// we won't distinguish GLES 2.0 from GL 2.0, but that's okay since | |||||
// they're close enough. | |||||
const char* version = (const char*)glGetString(GL_VERSION); | |||||
int major, minor; | |||||
if(!version || | |||||
(sscanf_s(version, "%d.%d", &major, &minor) != 2 && | |||||
sscanf_s(version, "OpenGL ES %d.%d", &major, &minor) != 2)) | |||||
{ | { | ||||
DEBUG_WARN_ERR(ERR::LOGIC); // GL_VERSION invalid | return GLAD_MAKE_VERSION(major, minor) <= GLVersion; | ||||
return false; | |||||
} | |||||
// note: don't just compare characters - major and minor may be >= 10. | |||||
return (major > desired_major) || | |||||
(major == desired_major && minor >= desired_minor); | |||||
} | } | ||||
// check if all given extension strings (passed as const char* parameters, | // check if all given extension strings (passed as const char* parameters, | ||||
// terminated by a 0 pointer) are supported by the OpenGL implementation, | // terminated by a 0 pointer) are supported by the OpenGL implementation, | ||||
// as determined by ogl_HaveExtension. | // as determined by ogl_HaveExtension. | ||||
// returns 0 if all are present; otherwise, the first extension in the | // returns 0 if all are present; otherwise, the first extension in the | ||||
// list that's not supported (useful for reporting errors). | // list that's not supported (useful for reporting errors). | ||||
▲ Show 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
#if CONFIG2_GLES | #if CONFIG2_GLES | ||||
static void enableDummyFunctions() | static void enableDummyFunctions() | ||||
{ | { | ||||
} | } | ||||
#else | #else | ||||
static void GL_CALL_CONV dummy_glDrawRangeElementsEXT(GLenum mode, GLuint, GLuint, GLsizei count, GLenum type, GLvoid* indices) | static void GLAD_API_PTR dummy_glDrawRangeElementsEXT(GLenum mode, GLuint, GLuint, GLsizei count, GLenum type, GLvoid* indices) | ||||
{ | { | ||||
glDrawElements(mode, count, type, indices); | glDrawElements(mode, count, type, indices); | ||||
} | } | ||||
static void GL_CALL_CONV dummy_glActiveTextureARB(int) | static void GLAD_API_PTR dummy_glActiveTextureARB(int) | ||||
{ | { | ||||
} | } | ||||
static void GL_CALL_CONV dummy_glClientActiveTextureARB(int) | static void GLAD_API_PTR dummy_glClientActiveTextureARB(int) | ||||
{ | { | ||||
} | } | ||||
static void GL_CALL_CONV dummy_glMultiTexCoord2fARB(int, float s, float t) | static void GLAD_API_PTR dummy_glMultiTexCoord2fARB(int, float s, float t) | ||||
{ | { | ||||
glTexCoord2f(s, t); | glTexCoord2f(s, t); | ||||
} | } | ||||
static void GL_CALL_CONV dummy_glMultiTexCoord3fARB(int, float s, float t, float r) | static void GLAD_API_PTR dummy_glMultiTexCoord3fARB(int, float s, float t, float r) | ||||
Not Done Inline ActionsGL types. vladislavbelov: GL types. | |||||
{ | { | ||||
glTexCoord3f(s, t, r); | glTexCoord3f(s, t, r); | ||||
} | } | ||||
static void enableDummyFunctions() | static void enableDummyFunctions() | ||||
{ | { | ||||
// fall back to the dummy functions when extensions (or equivalent core support) are missing | // fall back to the dummy functions when extensions (or equivalent core support) are missing | ||||
if(!ogl_HaveExtension("GL_EXT_draw_range_elements")) | if(!ogl_HaveExtension("GL_EXT_draw_range_elements")) | ||||
{ | { | ||||
pglDrawRangeElementsEXT = &dummy_glDrawRangeElementsEXT; | glDrawRangeElementsEXT = reinterpret_cast<PFNGLDRAWRANGEELEMENTSEXTPROC>(&dummy_glDrawRangeElementsEXT); | ||||
} | } | ||||
if(!ogl_HaveExtension("GL_ARB_multitexture")) | if(!ogl_HaveExtension("GL_ARB_multitexture")) | ||||
{ | { | ||||
pglActiveTextureARB = &dummy_glActiveTextureARB; | glActiveTextureARB = reinterpret_cast<PFNGLACTIVETEXTUREARBPROC>(&dummy_glActiveTextureARB); | ||||
pglClientActiveTextureARB = &dummy_glClientActiveTextureARB; | glClientActiveTextureARB = reinterpret_cast<PFNGLACTIVETEXTUREARBPROC>(&dummy_glClientActiveTextureARB); | ||||
pglMultiTexCoord2fARB = &dummy_glMultiTexCoord2fARB; | glMultiTexCoord2fARB = reinterpret_cast<PFNGLMULTITEXCOORD2FARBPROC>(&dummy_glMultiTexCoord2fARB); | ||||
pglMultiTexCoord3fARB = &dummy_glMultiTexCoord3fARB; | glMultiTexCoord3fARB = reinterpret_cast<PFNGLMULTITEXCOORD3FARBPROC>(&dummy_glMultiTexCoord3fARB); | ||||
} | } | ||||
} | } | ||||
Done Inline ActionsI didn't see #ifdef _MSC_VER to use sscanf_s. It doesn't compile on linux. vladislavbelov: I didn't see `#ifdef _MSC_VER` to use `sscanf_s`. It doesn't compile on linux. | |||||
Done Inline Actions(this code already existed previously) -- refer to lib/secure_crt.h echotangoecho: (this code already existed previously) -- refer to lib/secure_crt.h | |||||
#endif // #if CONFIG2_GLES | #endif // #if CONFIG2_GLES | ||||
static void importExtensionFunctions() | static void importExtensionFunctions() | ||||
{ | { | ||||
// It should be safe to load the ARB function pointers even if the | // It should be safe to load the ARB function pointers even if the | ||||
// extension isn't advertised, since we won't actually use them without | // extension isn't advertised, since we won't actually use them without | ||||
// checking for the extension. | // checking for the extension. | ||||
// (TODO: this calls ogl_HaveVersion far more times than is necessary - | // (TODO: this calls ogl_HaveVersion far more times than is necessary - | ||||
// we should probably use the have_* variables instead) | // we should probably use the have_* variables instead) | ||||
// Note: the xorg-x11 implementation of glXGetProcAddress doesn't return NULL | // Note: the xorg-x11 implementation of glXGetProcAddress doesn't return NULL | ||||
// if the function is unsupported (i.e. the rare case of a driver not reporting | // if the function is unsupported (i.e. the rare case of a driver not reporting | ||||
// its supported version correctly, see http://trac.wildfiregames.com/ticket/171) | // its supported version correctly, see http://trac.wildfiregames.com/ticket/171) | ||||
#define FUNC(ret, name, params) p##name = (ret (GL_CALL_CONV*) params)SDL_GL_GetProcAddress(#name); | #define FUNC(ret, name, params) p##name = (ret (GL_CALL_CONV*) params)SDL_GL_GetProcAddress(#name); | ||||
#define FUNC23(pname, ret, nameARB, nameCore, version, params) \ | #define FUNC23(pname, ret, nameARB, nameCore, version, params) \ | ||||
pname = NULL; \ | pname = NULL; \ | ||||
if(ogl_HaveVersion(version)) \ | if(ogl_HaveVersion(version)) \ | ||||
pname = (ret (GL_CALL_CONV*) params)SDL_GL_GetProcAddress(#nameCore); \ | pname = (ret (GL_CALL_CONV*) params)SDL_GL_GetProcAddress(#nameCore); \ | ||||
if(!pname) /* use the ARB name if the driver lied about what version it supports */ \ | if(!pname) /* use the ARB name if the driver lied about what version it supports */ \ | ||||
pname = (ret (GL_CALL_CONV*) params)SDL_GL_GetProcAddress(#nameARB); | pname = (ret (GL_CALL_CONV*) params)SDL_GL_GetProcAddress(#nameARB); | ||||
#define FUNC2(ret, nameARB, nameCore, version, params) FUNC23(p##nameARB, ret, nameARB, nameCore, version, params) | #define FUNC2(ret, nameARB, nameCore, version, params) FUNC23(p##nameARB, ret, nameARB, nameCore, version, params) | ||||
#define FUNC3(ret, nameARB, nameCore, version, params) FUNC23(p##nameCore, ret, nameARB, nameCore, version, params) | #define FUNC3(ret, nameARB, nameCore, version, params) FUNC23(p##nameCore, ret, nameARB, nameCore, version, params) | ||||
#include "lib/external_libraries/glext_funcs.h" | |||||
#undef FUNC3 | #undef FUNC3 | ||||
#undef FUNC2 | #undef FUNC2 | ||||
#undef FUNC23 | #undef FUNC23 | ||||
#undef FUNC | #undef FUNC | ||||
enableDummyFunctions(); | enableDummyFunctions(); | ||||
} | } | ||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
const char* ogl_GetErrorName(GLenum err) | const char* ogl_GetErrorName(GLenum err) | ||||
{ | { | ||||
#define E(e) case e: return #e; | #define E(e) case e: return #e; | ||||
switch (err) | switch (err) | ||||
{ | { | ||||
E(GL_INVALID_ENUM) | E(GL_INVALID_ENUM) | ||||
E(GL_INVALID_VALUE) | E(GL_INVALID_VALUE) | ||||
E(GL_INVALID_OPERATION) | E(GL_INVALID_OPERATION) | ||||
#if !CONFIG2_GLES | #if !CONFIG2_GLES | ||||
E(GL_STACK_OVERFLOW) | E(GL_STACK_OVERFLOW) | ||||
E(GL_STACK_UNDERFLOW) | E(GL_STACK_UNDERFLOW) | ||||
#endif | #endif | ||||
E(GL_OUT_OF_MEMORY) | E(GL_OUT_OF_MEMORY) | ||||
E(GL_INVALID_FRAMEBUFFER_OPERATION) | E(GL_INVALID_FRAMEBUFFER_OPERATION) | ||||
Done Inline ActionsWhy so? By https://www.khronos.org/opengl/wiki/OpenGL_Error it's ok to call it GL_INVALID_FRAMEBUFFER_OPERATION. vladislavbelov: Why so? By https://www.khronos.org/opengl/wiki/OpenGL_Error it's ok to call it… | |||||
Done Inline Actionsbecause GL_INVALID_FRAMEBUFFER_OPERATION is part of GL 3.0, and initially I only generated all GL 2.1 functions + extensions, note that IIRC now I generate 3.0 as well, as something we used does not exist as part of an extensions, so it could be changed back. echotangoecho: because GL_INVALID_FRAMEBUFFER_OPERATION is part of GL 3.0, and initially I only generated all… | |||||
default: return "Unknown GL error"; | default: return "Unknown GL error"; | ||||
} | } | ||||
#undef E | #undef E | ||||
} | } | ||||
static void dump_gl_error(GLenum err) | static void dump_gl_error(GLenum err) | ||||
{ | { | ||||
debug_printf("OGL| %s (%04x)\n", ogl_GetErrorName(err), err); | debug_printf("OGL| %s (%04x)\n", ogl_GetErrorName(err), err); | ||||
▲ Show 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | |||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
// feature and limit detect | // feature and limit detect | ||||
//---------------------------------------------------------------------------- | //---------------------------------------------------------------------------- | ||||
GLint ogl_max_tex_size = -1; // [pixels] | GLint ogl_max_tex_size = -1; // [pixels] | ||||
GLint ogl_max_tex_units = -1; // limit on GL_TEXTUREn | GLint ogl_max_tex_units = -1; // limit on GL_TEXTUREn | ||||
// call after each video mode change, since thereafter extension functions | #if OS_WIN | ||||
// may have changed [address]. | bool ogl_Init(void* (load)(const char*), void* hdc) | ||||
void ogl_Init() | #elif !CONFIG2_GLES && !OS_MACOSX && !OS_MAC | ||||
bool ogl_Init(void* (load)(const char*), void* display) | |||||
#else | |||||
bool ogl_Init(void* (load)(const char*)) | |||||
#endif | |||||
{ | |||||
GLADloadfunc loadFunc = reinterpret_cast<GLADloadfunc>(load); | |||||
if (!loadFunc) | |||||
return false; | |||||
#if !CONFIG2_GLES | |||||
GLVersion = gladLoadGL(loadFunc); | |||||
if (!GLVersion) | |||||
{ | |||||
if (g_Logger) | |||||
LOGERROR("Failed to load OpenGL functions."); | |||||
else | |||||
debug_printf("Failed to load OpenGL functions."); | |||||
return false; | |||||
} | |||||
# if OS_WIN | |||||
WGLVersion = gladLoadWGL(reinterpret_cast<HDC>(hdc), loadFunc); | |||||
if (!WGLVersion) | |||||
{ | |||||
if (g_Logger) | |||||
LOGERROR("Failed to load WGL functions."); | |||||
else | |||||
debug_printf("Failed to load WGL functions."); | |||||
return false; | |||||
} | |||||
# elif !OS_MACOSX && !OS_MAC | |||||
GLXVersion = gladLoadGLX(reinterpret_cast<Display*>(display), DefaultScreen(display), loadFunc); | |||||
if (!GLXVersion) | |||||
{ | |||||
if (g_Logger) | |||||
LOGERROR("Failed to load GLX functions."); | |||||
else | |||||
debug_printf("Failed to load GLX functions."); | |||||
return false; | |||||
} | |||||
# endif | |||||
#else | |||||
GLVersion = gladLoadGLES2(loadFunc); | |||||
if (!GLVersion) | |||||
{ | { | ||||
if (g_Logger) | |||||
LOGERROR("Failed to load GLES2 functions."); | |||||
else | |||||
debug_printf("Failed to load GLES2 functions."); | |||||
return false; | |||||
} | |||||
#endif | |||||
// cache extension list and versions for oglHave*. | // cache extension list and versions for oglHave*. | ||||
// note: this is less about performance (since the above are not | // note: this is less about performance (since the above are not | ||||
// time-critical) than centralizing the 'OpenGL is ready' check. | // time-critical) than centralizing the 'OpenGL is ready' check. | ||||
Done Inline ActionsUnnecessary brackets, also we use brackets on a new line. The same applies to the line below. vladislavbelov: Unnecessary brackets, also we use brackets on a new line. The same applies to the line below. | |||||
exts = (const char*)glGetString(GL_EXTENSIONS); | exts = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS)); | ||||
ENSURE(exts); // else: called before OpenGL is ready for use | ENSURE(exts); // else: called before OpenGL is ready for use | ||||
have_12 = ogl_HaveVersion("1.2"); | have_12 = ogl_HaveVersion(1, 2); | ||||
have_13 = ogl_HaveVersion("1.3"); | have_13 = ogl_HaveVersion(1, 3); | ||||
have_14 = ogl_HaveVersion("1.4"); | have_14 = ogl_HaveVersion(1, 4); | ||||
Done Inline ActionsSeems somewhat strange that we end up having more platform specific code due to using a library. leper: Seems somewhat strange that we end up having more platform specific code due to using a library. | |||||
have_15 = ogl_HaveVersion("1.5"); | have_15 = ogl_HaveVersion(1, 5); | ||||
have_20 = ogl_HaveVersion("2.0"); | have_20 = ogl_HaveVersion(2, 0); | ||||
have_21 = ogl_HaveVersion("2.1"); | have_21 = ogl_HaveVersion(2, 1); | ||||
have_30 = ogl_HaveVersion("3.0"); | have_30 = ogl_HaveVersion(3, 0); | ||||
importExtensionFunctions(); | importExtensionFunctions(); | ||||
glGetIntegerv(GL_MAX_TEXTURE_SIZE, &ogl_max_tex_size); | glGetIntegerv(GL_MAX_TEXTURE_SIZE, &ogl_max_tex_size); | ||||
#if !CONFIG2_GLES | #if !CONFIG2_GLES | ||||
glGetIntegerv(GL_MAX_TEXTURE_UNITS, &ogl_max_tex_units); | glGetIntegerv(GL_MAX_TEXTURE_UNITS, &ogl_max_tex_units); | ||||
#endif | #endif | ||||
glEnable(GL_TEXTURE_2D); | glEnable(GL_TEXTURE_2D); | ||||
return true; | |||||
} | |||||
void ogl_SetVsyncEnabled(bool enabled) | |||||
{ | |||||
#if !CONFIG2_GLES && OS_WIN | |||||
int interval = enabled ? 1 : 0; | |||||
if (ogl_HaveExtension("WGL_EXT_swap_control")) | |||||
wglSwapIntervalEXT(interval); | |||||
#elif !CONFIG2_GLES && !OS_MACOSX && !OS_MAC | |||||
int interval = enabled ? 1 : 0; | |||||
if (ogl_HaveExtension("GLX_SGI_swap_control")) | |||||
glXSwapIntervalSGI(interval); | |||||
#else | |||||
UNUSED2(enabled); | |||||
#endif | |||||
} | } | ||||
Done Inline ActionsWe need to avoid static linking of the OpenGL lib. vladislavbelov: We need to avoid static linking of the OpenGL lib. | |||||
Done Inline ActionsOpen to suggestions but maybe another patch? Stan: Open to suggestions but maybe another patch? | |||||
Done Inline ActionsPrefer return bool over exception. vladislavbelov: Prefer return bool over exception. | |||||
Done Inline ActionsShould it work in Unix at the moment? I decided to test it - it writes a compilation error: ogl.cpp g++ -MMD -MP -DNDEBUG -DCONFIG_FINAL=1 -DCONFIG2_AUDIO=0 -DCONFIG2_LOBBY=0 -DCONFIG2_MINIUPNPC=0 -DLIB_STATIC_LINK -DCONFIG_ENABLE_PCH=1 -I../../../source/pch/lowlevel -I../../../source -isystem ../../../libraries/source/glad/include -isystem /usr/include/SDL2 -isystem /usr/include/AL -isystem /usr/include/libpng16 -isystem ../../../libraries/source/cxxtest-4.4 -O3 -g -Wall -Wextra -fno-rtti -std=c++17 -Wno-switch -Wno-reorder -Wno-invalid-offsetof -Wextra -Wno-missing-field-initializers -Wunused-parameter -Wredundant-decls -Wnon-virtual-dtor -Wundef -fstack-protector-all -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fstrict-aliasing -fno-omit-frame-pointer -fpch-preprocess -fPIC -march=pentium3 -mtune=generic -fvisibility=hidden -D_REENTRANT -include obj/lowlevel_Release/precompiled.h -o "obj/lowlevel_Release/ogl.o" -MF "obj/lowlevel_Release/ogl.d" -c "../../../source/lib/ogl.cpp" ../../../source/lib/ogl.cpp: In function ‘void ogl_SetVsyncEnabled(bool)’: ../../../source/lib/ogl.cpp:321:3: error: ‘glXSwapIntervalSGI’ was not declared in this scope glXSwapIntervalSGI(interval); ^~~~~~~~~~~~~~~~~~ nwtour: Should it work in Unix at the moment? I decided to test it - it writes a compilation error… | |||||
Done Inline ActionsI added it in the last iteration. I was missing an extension. Can you try again Stan: I added it in the last iteration. I was missing an extension. Can you try again |
I prefer full paths.