pub struct TexParser { /* private fields */ }Expand description
Reads a TEX file or byte buffer and decodes it into a Texture.
Implementations§
Source§impl TexParser
impl TexParser
Sourcepub fn parse_buffer(&mut self, buffer: &[u8]) -> Option<Texture>
pub fn parse_buffer(&mut self, buffer: &[u8]) -> Option<Texture>
Parse a TEX byte buffer.
Sourcepub fn parse_tex_file_path_payload_file_path(
&mut self,
tex_file_path: &str,
payload_file_path: &str,
) -> Option<Texture>
pub fn parse_tex_file_path_payload_file_path( &mut self, tex_file_path: &str, payload_file_path: &str, ) -> Option<Texture>
Parse a D4 TEX file from two file paths (metadata .tex + pixel payload).
Sourcepub fn parse_tex_data_payload_data(
&mut self,
tex_data: &[u8],
payload_data: &[u8],
) -> Option<Texture>
pub fn parse_tex_data_payload_data( &mut self, tex_data: &[u8], payload_data: &[u8], ) -> Option<Texture>
Parse a D4 TEX file from two byte buffers (metadata + pixel payload).
Sourcepub fn parse_tex_file_path_hi_res_payload_file_path_low_res_payload_file_path(
&mut self,
tex_file_path: &str,
hi_res_payload_file_path: &str,
low_res_payload_file_path: &str,
) -> Option<Texture>
pub fn parse_tex_file_path_hi_res_payload_file_path_low_res_payload_file_path( &mut self, tex_file_path: &str, hi_res_payload_file_path: &str, low_res_payload_file_path: &str, ) -> Option<Texture>
Parse a D4 TEX with hi-res + low-res payloads from file paths.
Sourcepub fn has_issues(&self) -> bool
pub fn has_issues(&self) -> bool
@return true if the last parse produced any issues.
Trait Implementations§
impl Send for TexParser
Auto Trait Implementations§
impl !Sync for TexParser
impl Freeze for TexParser
impl RefUnwindSafe for TexParser
impl Unpin for TexParser
impl UnsafeUnpin for TexParser
impl UnwindSafe for TexParser
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more