Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to libc 0.2, remove unnecessary gl_common crate #658

Closed
wants to merge 2 commits into from
Closed
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
24 changes: 12 additions & 12 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ build = "build.rs"
[dependencies]
gl_common = "0.1.0"
lazy_static = "0.1.10"
libc = "0.1"
libc = "0.2"
shared_library = "0.1.0"

[build-dependencies]
gl_generator = "0.1.0"
gl_generator = "0.2.0"
khronos_api = "0.0.8"

[dev-dependencies]
Expand All @@ -27,22 +27,22 @@ clock_ticks = "0.1.0"
version = "0.1"

[target.i386-apple-ios.dependencies]
objc = ">=0.1.0, <=0.1.7"
objc = "0.1.8"

[target.x86_64-apple-ios.dependencies]
objc = ">=0.1.0, <=0.1.7"
objc = "0.1.8"

[target.aarch64-apple-ios.dependencies]
objc = ">=0.1.0, <=0.1.7"
objc = "0.1.8"

[target.armv7s-apple-ios.dependencies]
objc = ">=0.1.0, <=0.1.7"
objc = "0.1.8"

[target.armv7-apple-ios.dependencies]
objc = ">=0.1.0, <=0.1.7"
objc = "0.1.8"

[target.x86_64-apple-darwin.dependencies]
objc = ">=0.1.0, <=0.1.7"
objc = "0.1.8"
cgl = "0.1"
cocoa = "0.1.4"
core-foundation = "0"
Expand All @@ -53,31 +53,31 @@ winapi = "0.2"
shell32-sys = "0.1"
gdi32-sys = "0.1"
user32-sys = "~0.1.2"
kernel32-sys = "0.1"
kernel32-sys = "0.2"
dwmapi-sys = "0.1"

[target.i686-pc-windows-msvc.dependencies]
winapi = "0.2"
shell32-sys = "0.1"
gdi32-sys = "0.1"
user32-sys = "~0.1.2"
kernel32-sys = "0.1"
kernel32-sys = "0.2"
dwmapi-sys = "0.1"

[target.x86_64-pc-windows-gnu.dependencies]
winapi = "0.2"
shell32-sys = "0.1"
gdi32-sys = "0.1"
user32-sys = "~0.1.2"
kernel32-sys = "0.1"
kernel32-sys = "0.2"
dwmapi-sys = "0.1"

[target.x86_64-pc-windows-msvc.dependencies]
winapi = "0.2"
shell32-sys = "0.1"
gdi32-sys = "0.1"
user32-sys = "~0.1.2"
kernel32-sys = "0.1"
kernel32-sys = "0.2"
dwmapi-sys = "0.1"

[target.i686-unknown-linux-gnu.dependencies]
Expand Down
2 changes: 1 addition & 1 deletion examples/support/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub struct Context {
}

pub fn load(window: &glutin::Window) -> Context {
let gl = gl::Gl::load(window);
let gl = gl::Gl::load_with(|s| window.get_proc_address(s));

let version = unsafe {
let data = CStr::from_ptr(gl.GetString(gl::VERSION) as *const _).to_bytes().to_vec();
Expand Down
8 changes: 0 additions & 8 deletions src/headless.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ use PixelFormat;
use PixelFormatRequirements;
use Robustness;

use gl_common;
use libc;

use platform;
Expand Down Expand Up @@ -120,13 +119,6 @@ impl HeadlessContext {
}
}

impl gl_common::GlFunctionsSource for HeadlessContext {
#[inline]
fn get_proc_addr(&self, addr: &str) -> *const libc::c_void {
self.get_proc_address(addr)
}
}

impl GlContext for HeadlessContext {
#[inline]
unsafe fn make_current(&self) -> Result<(), ContextError> {
Expand Down
1 change: 0 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ extern crate lazy_static;
#[macro_use]
extern crate shared_library;

extern crate gl_common;
extern crate libc;

#[cfg(target_os = "windows")]
Expand Down
8 changes: 0 additions & 8 deletions src/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ use Window;
use WindowAttributes;
use native_monitor::NativeMonitorId;

use gl_common;
use libc;

use platform;
Expand Down Expand Up @@ -492,13 +491,6 @@ impl Window {
}
}

impl gl_common::GlFunctionsSource for Window {
#[inline]
fn get_proc_addr(&self, addr: &str) -> *const libc::c_void {
self.get_proc_address(addr)
}
}

impl GlContext for Window {
#[inline]
unsafe fn make_current(&self) -> Result<(), ContextError> {
Expand Down