Added LoadTexture function

- Added stb_image for image loading
This commit is contained in:
TheCherno
2025-04-21 16:18:38 +10:00
parent 9e6f7d5e8d
commit 87873485f3
5 changed files with 8039 additions and 1 deletions

View File

@@ -4,6 +4,8 @@
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <filesystem>
struct Texture
{
GLuint Handle = 0;
@@ -18,6 +20,7 @@ struct Framebuffer
};
Texture CreateTexture(int width, int height);
Texture LoadTexture(const std::filesystem::path& path);
Framebuffer CreateFramebufferWithTexture(const Texture texture);
bool AttachTextureToFramebuffer(Framebuffer& framebuffer, const Texture texture);
void BlitFramebufferToSwapchain(const Framebuffer framebuffer);