summaryrefslogtreecommitdiff
path: root/vcl/osx/salobj.cxx
diff options
context:
space:
mode:
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
{