Undo + Recording
This commit is contained in:
1 parent
93ab62e494
commit
4b12153512
27 files changed
+2485
-367
No files matched your search
@@ -6,6 +6,9 @@
|
||||
#define STB_IMAGE_IMPLEMENTATION
|
||||
#include <stb_image.h>
|
||||
|
||||
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
||||
#include <stb_image_write.h>
|
||||
|
||||
void
|
||||
texture_gl_set(Texture* self, void* data)
|
||||
{
|
||||
@@ -58,6 +61,14 @@ texture_from_data_init(Texture* self, const u8* data, u32 length)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Writes a *.png to the path from the data/size */
|
||||
/* Returns true on success */
|
||||
bool
|
||||
texture_from_data_write(const char* path, const u8* data, s32 width, s32 height)
|
||||
{
|
||||
return (bool)stbi_write_png(path, width, height, 4, data, width * 4);
|
||||
}
|
||||
|
||||
void
|
||||
texture_free(Texture* self)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user