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

Add wrappers for glScissor and glGetIntegerv #47

Merged
merged 1 commit into from Aug 5, 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

12 gl2.rs
@@ -709,6 +709,12 @@ pub fn get_error() -> GLenum {
}
}

pub fn get_integer_v(pname: GLenum, result: &mut [GLint]) {
unsafe {
glGetIntegerv(pname, to_unsafe_ptr(&result[0]));
}
}

pub fn get_program_info_log(program: GLuint) -> ~str {
unsafe {
let mut result = from_elem(1024u, 0u8);
@@ -861,6 +867,12 @@ pub fn read_pixels(x: GLint, y: GLint, width: GLsizei, height: GLsizei, format:
pixels
}

pub fn scissor(x: GLint, y: GLint, width: GLsizei, height: GLsizei) {
unsafe {
glScissor(x, y, width, height);
}
}

pub fn shader_source(shader: GLuint, strings: &[~[u8]]) {
unsafe {
let pointers = strings.map(|string| to_ptr(*string));
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.