summaryrefslogtreecommitdiff
path: root/vcl/source/opengl/OpenGLContext.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-02-16 14:14:43 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-02-17 11:33:57 +0000
commit2087484c65a3d5e75a9e8ad116d11a4e13366219 (patch)
tree1f335918a854319df9269329d165a91d711d2108 /vcl/source/opengl/OpenGLContext.cxx
parentd6bf086012343b4a1e27cd4242dced9ee0d73a06 (diff)
use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform with the compiler-defined '_WIN32' macro In this stage we focus on replacing usage of the WIN macro Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84 Reviewed-on: https://gerrit.libreoffice.org/22393 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/source/opengl/OpenGLContext.cxx')
-rw-r--r--vcl/source/opengl/OpenGLContext.cxx20
1 files changed, 10 insertions, 10 deletions
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 49a9b3e6d5d9..ba615ad9afaf 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -28,7 +28,7 @@
#include <postmac.h>
#endif
-#if defined( WNT )
+#if defined(_WIN32)
#include <win/saldata.hxx>
#endif
@@ -1089,7 +1089,7 @@ void OpenGLContext::setWinSize(const Size& rSize)
}
-#if defined( WNT )
+#if defined(_WIN32)
bool OpenGLContext::initWindow()
{
@@ -1252,7 +1252,7 @@ void OpenGLContext::reset()
mbInitialized = false;
// destroy the context itself
-#if defined( WNT )
+#if defined(_WIN32)
if (m_aGLWin.hRC)
{
std::vector<HGLRC>::iterator itr = std::remove(g_vShareList.begin(), g_vShareList.end(), m_aGLWin.hRC);
@@ -1287,7 +1287,7 @@ void OpenGLContext::reset()
#endif
}
-#if defined( WNT ) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID )
+#if defined(_WIN32) || defined( MACOSX ) || defined( IOS ) || defined( ANDROID )
SystemWindowData OpenGLContext::generateWinData(vcl::Window* /*pParent*/, bool bRequestLegacyContext)
{
@@ -1350,7 +1350,7 @@ bool OpenGLContext::isCurrent()
{
OpenGLZone aZone;
-#if defined( WNT )
+#if defined(_WIN32)
return wglGetCurrentContext() == m_aGLWin.hRC &&
wglGetCurrentDC() == m_aGLWin.hDC;
#elif defined( MACOSX )
@@ -1366,7 +1366,7 @@ bool OpenGLContext::isCurrent()
bool OpenGLContext::hasCurrent()
{
-#if defined( WNT )
+#if defined(_WIN32)
return wglGetCurrentContext() != NULL;
#elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS)
return false;
@@ -1414,7 +1414,7 @@ void OpenGLContext::makeCurrent()
clearCurrent();
-#if defined( WNT )
+#if defined(_WIN32)
if (!wglMakeCurrent(m_aGLWin.hDC, m_aGLWin.hRC))
{
SAL_WARN("vcl.opengl", "OpenGLContext::makeCurrent(): wglMakeCurrent failed: " << GetLastError());
@@ -1509,7 +1509,7 @@ void OpenGLContext::resetCurrent()
OpenGLZone aZone;
-#if defined( WNT )
+#if defined(_WIN32)
wglMakeCurrent(NULL, NULL);
#elif defined( MACOSX )
(void) this; // loplugin:staticmethods
@@ -1526,7 +1526,7 @@ void OpenGLContext::swapBuffers()
{
OpenGLZone aZone;
-#if defined( WNT )
+#if defined(_WIN32)
SwapBuffers(m_aGLWin.hDC);
#elif defined( MACOSX )
NSOpenGLView* pView = getOpenGLView();
@@ -1557,7 +1557,7 @@ void OpenGLContext::sync()
{
OpenGLZone aZone;
-#if defined( WNT )
+#if defined(_WIN32)
// nothing
#elif defined( MACOSX ) || defined( IOS ) || defined( ANDROID ) || defined(LIBO_HEADLESS)
(void) this; // loplugin:staticmethods