get rid of variable-based pixel format crap in cocoa.views
parent
8a4c6a30f9
commit
b6074b95fa
|
@ -42,31 +42,14 @@ CONSTANT: NSOpenGLPFAAllowOfflineRenderers 96
|
||||||
CONSTANT: NSOpenGLPFAVirtualScreenCount 128
|
CONSTANT: NSOpenGLPFAVirtualScreenCount 128
|
||||||
CONSTANT: NSOpenGLCPSwapInterval 222
|
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 )
|
: <PixelFormat> ( attributes -- pixelfmt )
|
||||||
NSOpenGLPixelFormat -> alloc swap [
|
NSOpenGLPixelFormat -> alloc swap [
|
||||||
%
|
%
|
||||||
NSOpenGLPFADepthSize , 16 ,
|
NSOpenGLPFADepthSize , 16 ,
|
||||||
software-renderer? get [
|
! NSOpenGLPFARendererID , kCGLRendererGenericFloatID ,
|
||||||
NSOpenGLPFARendererID , kCGLRendererGenericFloatID ,
|
! NSOpenGLPFASupersample ,
|
||||||
] when
|
! NSOpenGLPFASampleBuffers , 1 ,
|
||||||
multisample? get [
|
! NSOpenGLPFASamples , 8 ,
|
||||||
NSOpenGLPFASupersample ,
|
|
||||||
NSOpenGLPFASampleBuffers , 1 ,
|
|
||||||
NSOpenGLPFASamples , 8 ,
|
|
||||||
] when
|
|
||||||
0 ,
|
0 ,
|
||||||
] int-array{ } make
|
] int-array{ } make
|
||||||
-> initWithAttributes:
|
-> initWithAttributes:
|
||||||
|
|
Loading…
Reference in New Issue