Example usage:
let mut pointer: *mut GLvoid = std::ptr::null_mut();
gl21::GetPointerv(gl21::NORMAL_ARRAY_POINTER, &mut pointer);
I was surprised when Clippy gave me this warning:
warning: the function gl21::GetPointerv doesn't need a mutable reference
Looking at the generated documentation, it seems that gl_generator produced this signature:
pub unsafe fn GetPointerv(pname: u32, params: *const *mut c_void)
I think the mutability here is the exact opposite of what it should be: the pointer returned is *const so far as the API should care, but it needs a *mut pointer to be able to write it out. Though I see that the Khronos C headers use void** so *mut *mut might be more faithful to the original API.
This happens for at least OpenGL 2.1 compatibility profile and OpenGL ES 1.1.
I might eventually attempt to fix this myself, I assume it's something simple.
Example usage:
I was surprised when Clippy gave me this warning:
Looking at the generated documentation, it seems that gl_generator produced this signature:
I think the mutability here is the exact opposite of what it should be: the pointer returned is
*constso far as the API should care, but it needs a*mutpointer to be able to write it out. Though I see that the Khronos C headers usevoid**so*mut *mutmight be more faithful to the original API.This happens for at least OpenGL 2.1 compatibility profile and OpenGL ES 1.1.
I might eventually attempt to fix this myself, I assume it's something simple.