summaryrefslogtreecommitdiff
path: root/vcl/osx/salobj.cxx
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-09-01 23:59:24 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2014-09-02 01:08:54 +0200
commit8b384c946cb6725d691123152f5e7c6ac0692185 (patch)
treebcdb61ec3c578afec8d2261733bc32f3090cfcde /vcl/osx/salobj.cxx
parent6626d135299f91c20b338a858af8f42f4e3d07d0 (diff)
support legacy and core context on OSX
Change-Id: Ib8cadb3f182ce49c0ca8b6ccaa95960eb8e5f9ae
Diffstat (limited to 'vcl/osx/salobj.cxx')
-rw-r--r--vcl/osx/salobj.cxx38
1 files changed, 30 insertions, 8 deletions
diff --git a/vcl/osx/salobj.cxx b/vcl/osx/salobj.cxx
index 7c7ad5d41129..816eaf10e9bb 100644
--- a/vcl/osx/salobj.cxx
+++ b/vcl/osx/salobj.cxx
@@ -49,17 +49,39 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWindowDat
}
if (pWindowData->bOpenGL)
{
- NSOpenGLPixelFormatAttribute aAttributes[] =
+ NSOpenGLPixelFormat* pixFormat = NULL;
+
+ if (pWindowData->bLegacy)
+ {
+ NSOpenGLPixelFormatAttribute aAttributes[] =
+ {
+ NSOpenGLPFADoubleBuffer,
+ NSOpenGLPFAAlphaSize, 8,
+ NSOpenGLPFAColorSize, 24,
+ NSOpenGLPFAMultisample,
+ NSOpenGLPFASampleBuffers, (NSOpenGLPixelFormatAttribute)1,
+ NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)4,
+ 0
+ };
+ pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:aAttributes];
+ }
+ else
{
- NSOpenGLPFADoubleBuffer,
- NSOpenGLPFAAlphaSize, 8,
- NSOpenGLPFAColorSize, 24,
- 0
- };
+ NSOpenGLPixelFormatAttribute aAttributes[] =
+ {
+ NSOpenGLPFAOpenGLProfile, NSOpenGLProfileVersion3_2Core,
+ NSOpenGLPFADoubleBuffer,
+ NSOpenGLPFAAlphaSize, 8,
+ NSOpenGLPFAColorSize, 24,
+ NSOpenGLPFAMultisample,
+ NSOpenGLPFASampleBuffers, (NSOpenGLPixelFormatAttribute)1,
+ NSOpenGLPFASamples, (NSOpenGLPixelFormatAttribute)4,
+ 0
+ };
+ pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:aAttributes];
+ }
- NSOpenGLPixelFormat* pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:aAttributes];
maSysData.mpNSView = [[NSOpenGLView alloc] initWithFrame: aInitFrame pixelFormat:pixFormat];
-
}
else
{