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 various missing functions/constants #4

Merged
merged 5 commits into from Mar 19, 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

Added glCullFace and its mode consts

  • Loading branch information
sp0 committed Mar 19, 2013
commit 93b79af13948629e89e022ddcc3108c5b17eb168
11 gl2.rs
@@ -165,6 +165,11 @@ pub const STREAM_DRAW: c_uint = 0x88E0 as c_uint;
pub const STATIC_DRAW: c_uint = 0x88E4 as c_uint;
pub const DYNAMIC_DRAW: c_uint = 0x88E8 as c_uint;

/* CullFaceMode */
pub const FRONT: c_uint = 0x0404 as c_uint;
pub const BACK: c_uint = 0x0405 as c_uint;
pub const FRONT_AND_BACK: c_uint = 0x0408 as c_uint;

/* TextureMagFilter */
pub const NEAREST: c_uint = 0x2600 as c_uint;
pub const LINEAR: c_uint = 0x2601 as c_uint;
@@ -325,6 +330,12 @@ pub fn create_shader(shader_type: GLenum) -> GLuint {
}
}

pub fn cull_face(mode: GLenum) {
unsafe {
ll::glCullFace(mode);
}
}

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