Skip to content

Commit

Permalink
gl.rs (#343)
Browse files Browse the repository at this point in the history
Moved gl.rs to the correct folder and made the um-gl feature
Added missing um/gl/mod.rs file
Moved doc header comment in the right position.
That's what you get for changing things without testing them
  • Loading branch information
VictorKoenders authored and retep998 committed Nov 23, 2016
1 parent c59350c commit 1179bb2
Show file tree
Hide file tree
Showing 5 changed files with 56 additions and 35 deletions.
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ headers = ["headers-shared", "headers-um", "headers-vc", "headers-winrt"]
"um-dwrite",
"um-errhandlingapi",
"um-fileapi",
"um-gl",
"um-handleapi",
"um-heapapi",
"um-http",
Expand Down Expand Up @@ -201,6 +202,7 @@ headers = ["headers-shared", "headers-um", "headers-vc", "headers-winrt"]
"um-dwrite" = ["shared-basetsd", "shared-minwindef", "shared-windef", "shared-winerror", "um-dcommon", "um-unknwnbase", "um-wingdi", "um-winnt"]
"um-errhandlingapi" = ["um-winnt"]
"um-fileapi" = ["shared-minwindef", "um-minwinbase", "um-winnt"]
"um-gl" = []
"um-handleapi" = ["shared-minwindef", "um-winnt", "kernel32"]
"um-heapapi" = ["shared-basetsd", "shared-minwindef"]
"um-http" = ["shared-guiddef", "shared-minwindef", "shared-sspi", "um-winnt", "um-winsock2"]
Expand Down
35 changes: 0 additions & 35 deletions src/gl.rs

This file was deleted.

42 changes: 42 additions & 0 deletions src/um/gl/gl.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
// Copyright © 2015, Peter Atashian
// Licensed under the MIT License <LICENSE.md>

use ctypes::{c_double, c_float, c_int, c_uchar, c_uint, c_ushort, c_schar, c_short, c_void};

//48
pub type GLenum = c_uint;
pub type GLboolean = c_uchar;
pub type GLbitfield = c_uint;
pub type GLbyte = c_schar;
pub type GLshort = c_short;
pub type GLint = c_int;
pub type GLsizei = c_int;
pub type GLubyte = c_uchar;
pub type GLushort = c_ushort;
pub type GLuint = c_uint;
pub type GLfloat = c_float;
pub type GLclampf = c_float;
pub type GLdouble = c_double;
pub type GLclampd = c_double;
pub type GLvoid = c_void;
//63
//68
//AccumOp
pub const GL_ACCUM: GLenum = 0x0100;
pub const GL_LOAD: GLenum = 0x0101;
pub const GL_RETURN: GLenum = 0x0102;
pub const GL_MULT: GLenum = 0x0103;
pub const GL_ADD: GLenum = 0x0104;
//AlphaFunction
pub const GL_NEVER: GLenum = 0x0200;
pub const GL_LESS: GLenum = 0x0201;
pub const GL_EQUAL: GLenum = 0x0202;
pub const GL_LEQUAL: GLenum = 0x0203;
pub const GL_GREATER: GLenum = 0x0204;
pub const GL_NOTEQUAL: GLenum = 0x0205;
pub const GL_GEQUAL: GLenum = 0x0206;
pub const GL_ALWAYS: GLenum = 0x0207;

// TODO: we're missing about 1500 lines of defines and methods
// until that time, you can use the excellent GL crate
// https://github.com/brendanzab/gl-rs
9 changes: 9 additions & 0 deletions src/um/gl/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Copyright © 2016 winapi-rs developers
// Licensed under the Apache License, Version 2.0
// <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Headers for user mode only

#[cfg(feature = "um-gl")] pub mod gl;
3 changes: 3 additions & 0 deletions src/um/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
// All files in the project carrying such notice may not be copied, modified, or distributed
// except according to those terms.
//! Headers for user mode only

pub mod gl;

#[cfg(feature = "um-audioclient")] pub mod audioclient;
#[cfg(feature = "um-audiosessiontypes")] pub mod audiosessiontypes;
#[cfg(feature = "um-cfgmgr32")] pub mod cfgmgr32;
Expand Down

0 comments on commit 1179bb2

Please sign in to comment.