get rid of variable-based pixel format crap in cocoa.views

db4
Joe Groff 2009-04-30 22:35:15 -05:00
parent 8a4c6a30f9
commit b6074b95fa
1 changed files with 4 additions and 21 deletions
basis/cocoa/views

View File

@ -42,31 +42,14 @@ CONSTANT: NSOpenGLPFAAllowOfflineRenderers 96
CONSTANT: NSOpenGLPFAVirtualScreenCount 128
CONSTANT: NSOpenGLCPSwapInterval 222
<PRIVATE
SYMBOL: software-renderer?
SYMBOL: multisample?
PRIVATE>
: with-software-renderer ( quot -- )
[ t software-renderer? ] dip with-variable ; inline
: with-multisample ( quot -- )
[ t multisample? ] dip with-variable ; inline
: <PixelFormat> ( attributes -- pixelfmt )
NSOpenGLPixelFormat -> alloc swap [
%
NSOpenGLPFADepthSize , 16 ,
software-renderer? get [
NSOpenGLPFARendererID , kCGLRendererGenericFloatID ,
] when
multisample? get [
NSOpenGLPFASupersample ,
NSOpenGLPFASampleBuffers , 1 ,
NSOpenGLPFASamples , 8 ,
] when
! NSOpenGLPFARendererID , kCGLRendererGenericFloatID ,
! NSOpenGLPFASupersample ,
! NSOpenGLPFASampleBuffers , 1 ,
! NSOpenGLPFASamples , 8 ,
0 ,
] int-array{ } make
-> initWithAttributes: