/// Retrieves the OpenGL function pointer for the given name.
Retrieves the OpenGL function pointer for the given name.
Retrieves the OpenGL function pointer for the given name .
pub fn proc_address(&self, name_str: &str) -> *const c_void {
        let name = name_str.as_bytes();
        let mut cstr = [0_u8; 256];
        assert!(name.len() < cstr.len());
        unsafe {
            ::std::ptr::copy_nonoverlapping(name.as_ptr(), cstr.as_mut_ptr(), name.len());
            self.get_proc_address(cstr.as_ptr() as _)
        }
    }
pub fn proc_address ( & self , name_str : & str ) -> * const c_void { let name = name_str . as_bytes ( ) ; let mut cstr = [ 0_u8 ; 256 ] ; assert ! ( name len ( ) cstr len ( ) ) ; unsafe { :: std :: ptr :: copy_nonoverlapping ( name . as_ptr ( ) , cstr . as_mut_ptr ( ) , name . len ( ) ) ; self . get_proc_address ( cstr . as_ptr ( ) as _ ) } }
Retrieves the OpenGL function pointer for the given name.
Retrieves the OpenGL function pointer for the given name .
&self
name_str
&str