Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Upgrade to current Rust #78

Merged
merged 1 commit into from
Apr 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cgl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@

// Mac-specific OpenGL bindings.

#[allow(non_uppercase_statics)];
#![allow(non_uppercase_statics)]

use gl2::{GLenum, GLint, GLsizei, GLuint};
use std::libc::{c_void, c_int};
use libc::{c_void, c_int};

pub type CGLContextObj = *c_void;
pub type CGLError = c_int;
Expand Down Expand Up @@ -103,7 +103,6 @@ pub static CORE_INTEGER_ATTRIBUTES: &'static [CGLPixelFormatAttribute] =
kCGLPFAOpenGLProfile,
kCGLPFAVirtualScreenCount];

#[nolink]
extern {
// CGLCurrent.h

Expand Down
8 changes: 2 additions & 6 deletions gl2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

/* automatically generated by rust-bindgen */

use std::libc::{c_uint, c_uchar, c_void, c_char, int8_t, c_short, c_int, uint8_t, c_ushort};
use std::libc::{int32_t, intptr_t, ssize_t};
use libc::{c_uint, c_uchar, c_void, c_char, int8_t, c_short, c_int, uint8_t, c_ushort};
use libc::{int32_t, intptr_t, ssize_t};
use std::cast;
use std::cast::transmute;
use std::cmp;
Expand All @@ -21,17 +21,14 @@ use std::mem::size_of;
use std::slice::from_elem;

// Linking
#[nolink]
#[cfg(target_os = "macos")]
#[link(name = "OpenGL", kind = "framework")]
extern { }

#[nolink]
#[cfg(target_os = "linux")]
#[link(name = "GL")]
extern { }

#[nolink]
#[cfg(target_os = "android")]
#[link(name = "GLESv2")]
extern { }
Expand Down Expand Up @@ -1110,7 +1107,6 @@ pub mod apple {
}
}

#[nolink]
extern {

// Lower-level API
Expand Down
9 changes: 5 additions & 4 deletions lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@
// option. This file may not be copied, modified, or distributed
// except according to those terms.

#[crate_id = "github.com/mozilla-servo/rust-opengles#opengles:0.1"];
#[crate_type = "lib"];
#[crate_type = "dylib"];
#[crate_type = "rlib"];
#![crate_id = "github.com/mozilla-servo/rust-opengles#opengles:0.1"]
#![crate_type = "lib"]
#![crate_type = "dylib"]
#![crate_type = "rlib"]

extern crate libc;
extern crate std;

pub mod gl2;
Expand Down