GameApi 28
Library used by GameApi Builder tool
Loading...
Searching...
No Matches
GLTFImageDecoder Class Reference
Collaboration diagram for GLTFImageDecoder:

Public Member Functions

 GLTFImageDecoder (std::string url_prefix, LoadGltf *load)
 GLTFImageDecoder (std::string url_prefix, LoadGltf_from_string *load)
 ~GLTFImageDecoder ()
std::vector< std::string > scan_gltf_file (GameApi::ASyncVec *vec)
FETCHID fetch_file (GameApi::Env &e, std::string filename)
std::string get_fetch_filename (FETCHID id)
std::vector< FETCHID > fetch_ids (const std::vector< std::string > &filenames)
void fetch_all_files (GameApi::Env &e, const std::vector< FETCHID > &ids)
void set_fetch_callback (GameApi::Env &e, FETCHID id, void(*fptr)(void *), void *user_data)
GameApi::ASyncVec * get_file (GameApi::Env &e, FETCHID id)
FILEID add_file (GameApi::ASyncVec *vec, std::string filename)
FILEID find_file (std::string filename)
void start_decode_process (int i, FETCHID fetch_id, FILEID id, int req_width, int req_height, int m_decode_mutex_id)
bool is_decoded (FILEID id, int m_decode_mutex_id)
void set_decode_callback (FILEID id, void(*fptr)(void *), void *user_data)
tinygltf::Image * get_decoded_file (FILEID id)
IMAGEID convert_to_image (std::vector< unsigned char > &vec)
Bitmap< Color > * get_converted_image (IMAGEID id)

Public Attributes

LoadGltf * load
LoadGltf_from_string * load2
std::string url_prefix
std::map< FETCHID, std::string > filenames
std::map< FETCHID, std::vector< unsigned char, GameApiAllocator< unsigned char > > * > files
std::map< FETCHID, void(*)(void *)> fetch_cb
std::map< FILEID, std::string > filenames2
std::map< FILEID, GameApi::ASyncVec * > files2
std::map< FILEID, tinygltf::Image * > decoded_files
std::map< FILEID, tinygltf::Image * > decoded_image
std::map< FILEID, void(*)(void *)> decode_cb
std::map< FILEID, void * > decode_user_data
std::map< IMAGEID, std::vector< unsigned char, GameApiAllocator< unsigned char > > * > image_data
std::map< IMAGEID, Bitmap< Color > * > images

Friends

void * thread_func_gltf_bitmap (void *data2)

Constructor & Destructor Documentation

◆ GLTFImageDecoder() [1/2]

GLTFImageDecoder::GLTFImageDecoder ( std::string url_prefix,
LoadGltf * load )
inline

◆ GLTFImageDecoder() [2/2]

GLTFImageDecoder::GLTFImageDecoder ( std::string url_prefix,
LoadGltf_from_string * load )
inline

◆ ~GLTFImageDecoder()

GLTFImageDecoder::~GLTFImageDecoder ( )

Member Function Documentation

◆ add_file()

FILEID GLTFImageDecoder::add_file ( GameApi::ASyncVec * vec,
std::string filename )

◆ convert_to_image()

IMAGEID GLTFImageDecoder::convert_to_image ( std::vector< unsigned char > & vec)

◆ fetch_all_files()

void GLTFImageDecoder::fetch_all_files ( GameApi::Env & e,
const std::vector< FETCHID > & ids )

◆ fetch_file()

FETCHID GLTFImageDecoder::fetch_file ( GameApi::Env & e,
std::string filename )

◆ fetch_ids()

std::vector< FETCHID > GLTFImageDecoder::fetch_ids ( const std::vector< std::string > & filenames)

◆ find_file()

FILEID GLTFImageDecoder::find_file ( std::string filename)
Here is the caller graph for this function:

◆ get_converted_image()

Bitmap< Color > * GLTFImageDecoder::get_converted_image ( IMAGEID id)

◆ get_decoded_file()

tinygltf::Image * GLTFImageDecoder::get_decoded_file ( FILEID id)
Here is the caller graph for this function:

◆ get_fetch_filename()

std::string GLTFImageDecoder::get_fetch_filename ( FETCHID id)
Here is the caller graph for this function:

◆ get_file()

GameApi::ASyncVec * GLTFImageDecoder::get_file ( GameApi::Env & e,
FETCHID id )

◆ is_decoded()

bool GLTFImageDecoder::is_decoded ( FILEID id,
int m_decode_mutex_id )
Here is the caller graph for this function:

◆ scan_gltf_file()

std::vector< std::string > GLTFImageDecoder::scan_gltf_file ( GameApi::ASyncVec * vec)

◆ set_decode_callback()

void GLTFImageDecoder::set_decode_callback ( FILEID id,
void(* fptr )(void *),
void * user_data )

◆ set_fetch_callback()

void GLTFImageDecoder::set_fetch_callback ( GameApi::Env & e,
FETCHID id,
void(* fptr )(void *),
void * user_data )

◆ start_decode_process()

void GLTFImageDecoder::start_decode_process ( int i,
FETCHID fetch_id,
FILEID id,
int req_width,
int req_height,
int m_decode_mutex_id )

◆ thread_func_gltf_bitmap

void * thread_func_gltf_bitmap ( void * data2)
friend

Member Data Documentation

◆ decode_cb

std::map<FILEID, void (*)(void*)> GLTFImageDecoder::decode_cb

◆ decode_user_data

std::map<FILEID, void*> GLTFImageDecoder::decode_user_data

◆ decoded_files

std::map<FILEID, tinygltf::Image* > GLTFImageDecoder::decoded_files

◆ decoded_image

std::map<FILEID, tinygltf::Image*> GLTFImageDecoder::decoded_image

◆ fetch_cb

std::map<FETCHID,void (*)(void*)> GLTFImageDecoder::fetch_cb

◆ filenames

std::map<FETCHID,std::string> GLTFImageDecoder::filenames

◆ filenames2

std::map<FILEID, std::string> GLTFImageDecoder::filenames2

◆ files

std::map<FETCHID,std::vector<unsigned char, GameApiAllocator<unsigned char> > *> GLTFImageDecoder::files

◆ files2

std::map<FILEID, GameApi::ASyncVec *> GLTFImageDecoder::files2

◆ image_data

std::map<IMAGEID,std::vector<unsigned char, GameApiAllocator<unsigned char> > *> GLTFImageDecoder::image_data

◆ images

std::map<IMAGEID,Bitmap<Color> *> GLTFImageDecoder::images

◆ load

LoadGltf* GLTFImageDecoder::load

◆ load2

LoadGltf_from_string* GLTFImageDecoder::load2

◆ url_prefix

std::string GLTFImageDecoder::url_prefix

The documentation for this class was generated from the following file: