diff options
-rw-r--r-- | vcl/Library_vcl.mk | 4 | ||||
-rw-r--r-- | vcl/inc/OpenGLWrapper.hxx | 20 | ||||
-rw-r--r-- | vcl/osx/OpenGLWrapper.cxx | 27 | ||||
-rw-r--r-- | vcl/source/opengl/OpenGLContext.cxx | 13 |
4 files changed, 7 insertions, 57 deletions
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk index 87570d64916d..c7eee7f86123 100644 --- a/vcl/Library_vcl.mk +++ b/vcl/Library_vcl.mk @@ -106,10 +106,6 @@ $(eval $(call gb_Library_add_cxxflags,vcl,\ $(gb_OBJCXXFLAGS) \ )) -$(eval $(call gb_Library_add_exception_objects,vcl,\ - vcl/osx/OpenGLWrapper \ -)) - endif ifeq ($(ENABLE_JAVA),TRUE) diff --git a/vcl/inc/OpenGLWrapper.hxx b/vcl/inc/OpenGLWrapper.hxx deleted file mode 100644 index 9134801ea98a..000000000000 --- a/vcl/inc/OpenGLWrapper.hxx +++ /dev/null @@ -1,20 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "AppKit/NSOpenGLView.h" -#include "AppKit/NSOpenGL.h" - -namespace OpenGLWrapper -{ - void swapBuffers(NSOpenGLView* pView); - void makeCurrent(NSOpenGLView* pView); - void resetCurrent(); -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/osx/OpenGLWrapper.cxx b/vcl/osx/OpenGLWrapper.cxx deleted file mode 100644 index fc008f41929d..000000000000 --- a/vcl/osx/OpenGLWrapper.cxx +++ /dev/null @@ -1,27 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include "OpenGLWrapper.hxx" - -void OpenGLWrapper::swapBuffers(NSOpenGLView* pView) -{ - [[pView openGLContext] flushBuffer]; -} - -void OpenGLWrapper::makeCurrent(NSOpenGLView* pView) -{ - [[pView openGLContext] makeCurrentContext]; -} - -void OpenGLWrapper::resetCurrent() -{ - [NSOpenGLContext clearCurrentContext]; -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx index 4a68ab823bf7..8c5db0fe9708 100644 --- a/vcl/source/opengl/OpenGLContext.cxx +++ b/vcl/source/opengl/OpenGLContext.cxx @@ -20,7 +20,8 @@ #if defined(MACOSX) #include <premac.h> -#include "OpenGLWrapper.hxx" +#include <AppKit/NSOpenGLView.h> +#include <AppKit/NSOpenGL.h> #include <postmac.h> #endif @@ -986,7 +987,7 @@ bool OpenGLContext::ImplInit() VCL_GL_INFO("OpenGLContext::ImplInit----start"); NSOpenGLView* pView = getOpenGLView(); - OpenGLWrapper::makeCurrent(pView); + [[pView openGLContext] makeCurrentContext]; bool bRet = InitGLEW(); InitGLEWDebugging(); @@ -1252,7 +1253,7 @@ void OpenGLContext::reset() m_aGLWin.hRC = 0; } #elif defined( MACOSX ) - OpenGLWrapper::resetCurrent(); + [NSOpenGLContext clearCurrentContext]; #elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) // nothing #elif defined( UNX ) @@ -1408,7 +1409,7 @@ void OpenGLContext::makeCurrent() } #elif defined( MACOSX ) NSOpenGLView* pView = getOpenGLView(); - OpenGLWrapper::makeCurrent(pView); + [[pView openGLContext] makeCurrentContext]; #elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) // nothing #elif defined( UNX ) @@ -1462,7 +1463,7 @@ void OpenGLContext::resetCurrent() wglMakeCurrent(NULL, NULL); #elif defined( MACOSX ) (void) this; // loplugin:staticmethods - OpenGLWrapper::resetCurrent(); + [NSOpenGLContext clearCurrentContext]; #elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) // nothing #elif defined( UNX ) @@ -1479,7 +1480,7 @@ void OpenGLContext::swapBuffers() SwapBuffers(m_aGLWin.hDC); #elif defined( MACOSX ) NSOpenGLView* pView = getOpenGLView(); - OpenGLWrapper::swapBuffers(pView); + [[pView openGLContext] flushBuffer]; #elif defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS) // nothing #elif defined( UNX ) |