pub fn create(texture_file: &Path) -> Self {
    unsafe {
      let path = CString::new(
        texture_file
          .as_os_str()
          .to_str()
          .expect("Path includes invalid unicode")
      )
      .expect("CString::from failed");

      Self {
        id: createTexture(path.as_ptr())
      }
    }
  }
/// Creates a new texture from a file path.
Creates a new texture from a file path.
Creates a new texture from a file path .
pub fn create(texture_file: &Path) -> Self {
    unsafe {
      let path = CString::new(
        texture_file
          .as_os_str()
          .to_str()
          .expect("Path includes invalid unicode")
      )
      .expect("CString::from failed");
      Self {
        id: createTexture(path.as_ptr())
      }
    }
  }
pub fn create ( texture_file : & Path ) -> Self { unsafe { let path = CString :: new ( texture_file . as_os_str ( ) . to_str ( ) . expect ( " " ) ) . expect ( " " ) ; Self { id : createTexture ( path . as_ptr ( ) ) } } }
Creates a new texture from a file path.
Creates a new texture from a file path .
texture_file
&Path
texture_file
&Path