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 glIs* #20

Merged
merged 3 commits into from Apr 20, 2013
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

42 gl2.rs
@@ -696,6 +696,48 @@ pub fn get_uniform_location(program: GLuint, name: ~str) -> c_int {
}
}

pub fn is_buffer(buffer: GLuint) -> bool {
unsafe {
ll::glIsBuffer(buffer) > 0
}
}

pub fn is_enabled(cap: GLenum) -> bool {
unsafe {
ll::glIsEnabled(cap) > 0
}
}

pub fn is_framebuffer(framebuffer: GLuint) -> bool {
unsafe {
ll::glIsFramebuffer(framebuffer) > 0
}
}

pub fn is_program(program: GLuint) -> bool {
unsafe {
ll::glIsProgram(program) > 0
}
}

pub fn is_renderbuffer(renderbuffer: GLuint) -> bool {
unsafe {
ll::glIsRenderbuffer(renderbuffer) > 0
}
}

pub fn is_shader(shader: GLuint) -> bool {
unsafe {
ll::glIsShader(shader) > 0
}
}

pub fn is_texture(texture: GLuint) -> bool {
unsafe {
ll::glIsTexture(texture) > 0
}
}

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