From 4e3bbe01b6bfc77e3565bdaf98c1eba7aa22a83e Mon Sep 17 00:00:00 2001 From: Nikolay Kasyanov Date: Thu, 12 Nov 2015 21:40:59 +0100 Subject: [PATCH] OS X: disable `glTexStorage2D` because of OSG/driver issue See http://forum.openscenegraph.org/viewtopic.php?p=65276#65276 for the details. --- apps/opencs/main.cpp | 4 ++++ apps/openmw/main.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/apps/opencs/main.cpp b/apps/opencs/main.cpp index de2e6e83e..0b7a34cdb 100644 --- a/apps/opencs/main.cpp +++ b/apps/opencs/main.cpp @@ -43,6 +43,10 @@ class Application : public QApplication int main(int argc, char *argv[]) { + #ifdef Q_OS_MAC + setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0); + #endif + try { // To allow background thread drawing in OSG diff --git a/apps/openmw/main.cpp b/apps/openmw/main.cpp index 3d631c743..609452a9f 100644 --- a/apps/openmw/main.cpp +++ b/apps/openmw/main.cpp @@ -321,6 +321,10 @@ private: int main(int argc, char**argv) { +#if defined(__APPLE__) + setenv("OSG_GL_TEXTURE_STORAGE", "OFF", 0); +#endif + // Some objects used to redirect cout and cerr // Scope must be here, so this still works inside the catch block for logging exceptions std::streambuf* cout_rdbuf = std::cout.rdbuf ();