mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
simplify pixel format requirements for cocoa offscreen rendering
This commit is contained in:
@@ -28,13 +28,9 @@ impl HeadlessContext {
|
|||||||
let (width, height) = builder.dimensions.unwrap_or((1024, 768));
|
let (width, height) = builder.dimensions.unwrap_or((1024, 768));
|
||||||
let context = unsafe {
|
let context = unsafe {
|
||||||
let attributes = [
|
let attributes = [
|
||||||
|
NSOpenGLPFAAccelerated as u32,
|
||||||
|
NSOpenGLPFAAllowOfflineRenderers as u32,
|
||||||
NSOpenGLPFADoubleBuffer as u32,
|
NSOpenGLPFADoubleBuffer as u32,
|
||||||
NSOpenGLPFAClosestPolicy as u32,
|
|
||||||
NSOpenGLPFAColorSize as u32, 24,
|
|
||||||
NSOpenGLPFAAlphaSize as u32, 8,
|
|
||||||
NSOpenGLPFADepthSize as u32, 24,
|
|
||||||
NSOpenGLPFAStencilSize as u32, 8,
|
|
||||||
NSOpenGLPFAOffScreen as u32,
|
|
||||||
0
|
0
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user