diff --git a/gl2.rs b/gl2.rs index 5db9bee..03f1716 100644 --- a/gl2.rs +++ b/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));