Merge pull request #298 from andreasgal/master

Make headless rendering work on Mac OS X 10.10
This commit is contained in:
tomaka 2015-03-01 12:03:48 +01:00
commit 65046ffc41
2 changed files with 3 additions and 7 deletions

View file

@ -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"]

View file

@ -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
]; ];