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 1 commit
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

Prev

Made glIs* return bool

  • Loading branch information
Jeaye
Jeaye committed Apr 20, 2013
commit 6b20b41b0ccd9d6fb1968cf3f4a1f4df102f81d2
28 gl2.rs
@@ -696,45 +696,45 @@ pub fn get_uniform_location(program: GLuint, name: ~str) -> c_int {
}
}

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

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

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

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

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

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

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

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