ceb9e365de
Add loading image from glb file.
28 lines
733 B
C
28 lines
733 B
C
#ifndef FILE_UTILS_H
|
|
#define FILE_UTILS_H
|
|
|
|
#include <stddef.h>
|
|
#include "commons.h"
|
|
#include "cgltf.h"
|
|
|
|
#define MAX_PATH_LENGTH (4096U)
|
|
|
|
/**
|
|
* @brief Reads file and puts its content into char buffer. If NULL is provided as buffer, than just bytes_count
|
|
* is set
|
|
*
|
|
* @param file_path Path to file
|
|
* @param bytes_count Returned bytes count
|
|
* @param buffer Returned filled buffer
|
|
*/
|
|
rse_err_t file_read_bytes(const char* file_path, size_t* bytes_count, unsigned char* buffer);
|
|
|
|
rse_err_t file_write(const char* file_name, size_t bytes_count, char* buffer);
|
|
|
|
rse_err_t file_append_full_path(char* file_path, size_t max_buffer_size);
|
|
|
|
rse_err_t file_load_gltf(const char* file_name, cgltf_data** data);
|
|
|
|
#endif /* FILE_UTILS_H */
|
|
|