summaryrefslogtreecommitdiffstats
path: root/src/native/jogl/MacOSXWindowSystemInterface.m
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2005-12-06 19:28:31 +0000
committerKenneth Russel <[email protected]>2005-12-06 19:28:31 +0000
commit3dc7a014af0e9a0a409bea49c2d8f6b0010cafb4 (patch)
tree0a14c40695b81b60011921a645a327e21c0af8f3 /src/native/jogl/MacOSXWindowSystemInterface.m
parente056d2fd5c9e91f530d98a7b3ef4454756faf150 (diff)
Refactored code on Windows and X11 constructing attribute lists for
wglChoosePixelFormatARB / glXChooseVisual / glXChooseFBConfig to unify code paths between on-screen drawables and pbuffers. This primarily enables multisampling for pbuffers. Made small change to Mac native code to stop specifying sample buffers if multisampling is not enabled. Tested with demos on Windows and X11. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@484 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'src/native/jogl/MacOSXWindowSystemInterface.m')
-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]