summaryrefslogtreecommitdiffstats
path: root/src/native/jogl
diff options
context:
space:
mode:
Diffstat (limited to 'src/native/jogl')
-rw-r--r--src/native/jogl/MacOSXWindowSystemInterface.m6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/native/jogl/MacOSXWindowSystemInterface.m b/src/native/jogl/MacOSXWindowSystemInterface.m
index 125f6abb4..73027bbee 100644
--- a/src/native/jogl/MacOSXWindowSystemInterface.m
+++ b/src/native/jogl/MacOSXWindowSystemInterface.m
@@ -80,8 +80,10 @@ void* createContext(void* shareContext, void* view,
attribs[idx++] = NSOpenGLPFADepthSize; attribs[idx++] = depthBits;
attribs[idx++] = NSOpenGLPFAStencilSize; attribs[idx++] = stencilBits;
attribs[idx++] = NSOpenGLPFAAccumSize; attribs[idx++] = accumSize;
- attribs[idx++] = NSOpenGLPFASampleBuffers; attribs[idx++] = sampleBuffers;
- attribs[idx++] = NSOpenGLPFASamples; attribs[idx++] = numSamples;
+ if (sampleBuffers != 0) {
+ attribs[idx++] = NSOpenGLPFASampleBuffers; attribs[idx++] = sampleBuffers;
+ attribs[idx++] = NSOpenGLPFASamples; attribs[idx++] = numSamples;
+ }
attribs[idx++] = 0;
NSOpenGLPixelFormat* fmt = [[NSOpenGLPixelFormat alloc]