mirror of
https://github.com/italicsjenga/winit-sonoma-fix.git
synced 2024-12-24 22:31:30 +11:00
Removed NSOpenGLPFAOpenGLProfiles enum in favor of the one defined in the AppKit bindings
This commit is contained in:
parent
b0dddb2d3f
commit
0e64651db8
|
@ -45,15 +45,6 @@ static mut alt_pressed: bool = false;
|
|||
static DELEGATE_NAME: &'static [u8] = b"glutin_window_delegate\0";
|
||||
static DELEGATE_STATE_IVAR: &'static [u8] = b"glutin_state";
|
||||
|
||||
// TODO: Should be added to cocoa bindings
|
||||
#[allow(non_camel_case_types)]
|
||||
#[deriving(Show)]
|
||||
enum NSOpenGLPFAOpenGLProfiles {
|
||||
NSOpenGLProfileVersionLegacy = 0x1000,
|
||||
NSOpenGLProfileVersion3_2Core = 0x3200,
|
||||
NSOpenGLProfileVersion4_1Core = 0x4100
|
||||
}
|
||||
|
||||
struct DelegateState<'a> {
|
||||
is_closed: bool,
|
||||
context: id,
|
||||
|
@ -271,12 +262,10 @@ impl Window {
|
|||
}
|
||||
|
||||
fn create_context(view: id, vsync: bool, gl_version: Option<(uint, uint)>) -> Option<id> {
|
||||
let profile = {
|
||||
match gl_version {
|
||||
None | Some((0...2, _)) | Some((3, 0)) => NSOpenGLPFAOpenGLProfiles::NSOpenGLProfileVersionLegacy as uint,
|
||||
Some((3, 1...2)) => NSOpenGLPFAOpenGLProfiles::NSOpenGLProfileVersion3_2Core as uint,
|
||||
Some((_, _)) => NSOpenGLPFAOpenGLProfiles::NSOpenGLProfileVersion4_1Core as uint,
|
||||
}
|
||||
let profile = match gl_version {
|
||||
None | Some((0...2, _)) | Some((3, 0)) => NSOpenGLProfileVersionLegacy as uint,
|
||||
Some((3, 1...2)) => NSOpenGLProfileVersion3_2Core as uint,
|
||||
Some((_, _)) => NSOpenGLProfileVersion4_1Core as uint,
|
||||
};
|
||||
unsafe {
|
||||
let attributes = [
|
||||
|
|
Loading…
Reference in a new issue