diff --git a/apps/OpenSpace/main.cpp b/apps/OpenSpace/main.cpp index 75e9e892cb..1f92ec9431 100644 --- a/apps/OpenSpace/main.cpp +++ b/apps/OpenSpace/main.cpp @@ -984,6 +984,32 @@ int main(int argc, char** argv) { LINFO(fmt::format("Detected OpenGL version: {}.{}", version.first, version.second)); bool initSuccess = SgctEngine->init(versionMapping[version]); +#ifdef __APPLE__ + // Workaround for OpenGL bug that Apple introduced in 10.14 Mojave that prevents an + // OpenGL context to display anything until it is first moved or resized in dark + // mode. So we are going through all windows here and resize them a bit larger and + // then back to the desired resolution. Resizing the window to the same size doesn't + // work as GLFW probably has a check for setting the current values. + // This can be removed once the OpenGL bug is fixed. + // In order to check, comment out the following lines and start OpenSpace on a 10.14 + // machine. If the loading screen shows up without doing anything to the window, it + // is fixed. With the bug, the rendering stays gray even well after the main render + // loop has started -- 2018-10-28 abock + size_t n = sgct::Engine::instance()->getNumberOfWindows(); + for (size_t i = 0; i < n; ++i) { + GLFWwindow* w = sgct::Engine::instance()->getWindowPtr(i)->getWindowHandle(); + int x, y; + glfwGetWindowPos(w, &x, &y); + glfwSetWindowPos(w, x + 1, y + 1); + glfwSwapBuffers(w); + glfwPollEvents(); + glfwSetWindowPos(w, x, y); + glfwSwapBuffers(w); + glfwPollEvents(); + } +#endif // __APPLE__ + + // Do not print message if slaves are waiting for the master // Only timeout after 15 minutes SgctEngine->setSyncParameters(false, 15.f * 60.f); diff --git a/ext/ghoul b/ext/ghoul index 72d2faba17..bc49533f5f 160000 --- a/ext/ghoul +++ b/ext/ghoul @@ -1 +1 @@ -Subproject commit 72d2faba17787c832d75cd4de40efd6b0cbb76e8 +Subproject commit bc49533f5fa97b23c7cde4cc45603f3671404d85 diff --git a/src/scene/scene_lua.inl b/src/scene/scene_lua.inl index 6673f72140..964bd0989d 100644 --- a/src/scene/scene_lua.inl +++ b/src/scene/scene_lua.inl @@ -522,7 +522,6 @@ int hasSceneGraphNode(lua_State* L) { return 1; } -#pragma optimize("", off) int addInterestingTime(lua_State* L) { ghoul::lua::checkArgumentsAndThrow(L, 2, "lua::addInterestingTime");