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

Brought in glDepthFunc #10

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Added glDepthFunc and associated constants

  • Loading branch information
Jeaye
Jeaye committed Apr 8, 2013
commit 58ff4ddef352e0d28d2104bf05ba1714ba77b9ce
18 gl2.rs
@@ -67,6 +67,16 @@ pub static POLYGON_OFFSET_FILL: c_uint = 0x8037 as c_uint;
pub static SAMPLE_ALPHA_TO_COVERAGE: c_uint = 0x809E as c_uint;
pub static SAMPLE_COVERAGE: c_uint = 0x80A0 as c_uint;

/* Depth buffer */
pub static NEVER: c_uint = 0x0200 as c_uint;
pub static LESS: c_uint = 0x0201 as c_uint;
pub static EQUAL: c_uint = 0x0202 as c_uint;
pub static LEQUAL: c_uint = 0x0203 as c_uint;
pub static GREATER: c_uint = 0x0204 as c_uint;
pub static NOTEQUAL: c_uint = 0x0205 as c_uint;
pub static GEQUAL: c_uint = 0x0206 as c_uint;
pub static ALWAYS: c_uint = 0x0207 as c_uint;

/* FrontFaceDirection */
pub static CW: c_uint = 0x0900 as c_uint;
pub static CCW: c_uint = 0x0901 as c_uint;
@@ -321,6 +331,12 @@ pub fn clear_color(red: GLclampf, green: GLclampf, blue: GLclampf, alpha: GLclam
}
}

pub fn depth_func(func: GLenum) {
unsafe {
ll::glDepthFunc(func);
}
}

pub fn compile_shader(shader: GLuint) {
unsafe {
ll::glCompileShader(shader);
@@ -692,7 +708,7 @@ pub fn glClear(++mask: GLbitfield);
pub fn glClearColor(++red: GLclampf, ++green: GLclampf, ++blue: GLclampf, ++alpha: GLclampf);

// Unsupported on Mac:
//fn glClearDepthf(++depth: GLclampf);
pub fn glClearDepthf(++depth: GLclampf);

pub fn glClearStencil(++s: GLint);

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.