mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 22:30:04 -04:00
Merge pull request #298 from andreasgal/master
Make headless rendering work on Mac OS X 10.10
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
[package]
|
[package]
|
||||||
|
|
||||||
name = "glutin"
|
name = "glutin"
|
||||||
version = "0.0.5"
|
version = "0.0.6"
|
||||||
authors = ["tomaka <pierre.krieger1708@gmail.com>"]
|
authors = ["tomaka <pierre.krieger1708@gmail.com>"]
|
||||||
description = "Cross-plaform OpenGL context provider. Important: the crates.io only supports Windows and Linux for the moment."
|
description = "Cross-plaform OpenGL context provider. Important: the crates.io only supports Windows and Linux for the moment."
|
||||||
keywords = ["windowing", "opengl"]
|
keywords = ["windowing", "opengl"]
|
||||||
|
|||||||
@@ -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