Add texture handler

Added functionality to load images as textures and bind them to meshes.
This commit is contained in:
Piotr Krygier committed 2023-10-02 13:21:17 +02:00
1 parent 0e040dd0d5
commit 4fcda01ba2
24 files changed
+897 -200

No files matched your search

+11 -1
View File
@@ -3,7 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
void read_file(const char* file_name, long* bytes_count, char* buffer)
void rse_read_file(const char* file_name, long* bytes_count, char* buffer)
{
FILE* file;
@@ -20,3 +20,13 @@ void read_file(const char* file_name, long* bytes_count, char* buffer)
fread(buffer, *bytes_count, 1, file);
fclose(file);
}
void rse_write_to_file(const char* file_name, long bytes_count, char* buffer)
{
FILE* file;
file = fopen(file_name, "wb");
fwrite(buffer, bytes_count, 1, file);
fclose(file);
}
-1
View File
@@ -7,7 +7,6 @@ const char* log_levels[] = {
void _log_log(unsigned int level, const char* file, int line, const char* fmt, ...)
{
char buf[256];
va_list list;
va_start(list, fmt);