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

Added glDepthFunc, glDepthMask and StencilFunction consts. #7

Merged
merged 4 commits into from Apr 8, 2013
Merged
Changes from 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Next

Added glDepthFunc, glDepthMask and StencilFunction consts.

  • Loading branch information
sp0 committed Mar 25, 2013
commit b83ea9859ee1d2ca279bdd62adda57a77a08d8a4
22 gl2.rs
@@ -158,6 +158,16 @@ pub static ACTIVE_ATTRIBUTE_MAX_LENGTH: c_uint = 0x8B8A as c_uint;
pub static SHADING_LANGUAGE_VERSION: c_uint = 0x8B8C as c_uint;
pub static CURRENT_PROGRAM: c_uint = 0x8B8D as c_uint;

/* StencilFunction */
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;

/* Shader Source */
pub static COMPILE_STATUS: c_uint = 0x8B81 as c_uint;
pub static INFO_LOG_LENGTH: c_uint = 0x8B84 as c_uint;
@@ -357,6 +367,18 @@ pub fn delete_textures(textures: &[GLuint]) {
}
}

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

pub fn depth_mask(flag: bool) {
unsafe {
ll::glDepthMask(flag as GLboolean);
}
}

pub fn detach_shader(program: GLuint, shader: GLuint) {
unsafe {
ll::glDetachShader(program, shader);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.