Files
RealTimeFractal/App/Source/Renderer.h
TheCherno 87873485f3 Added LoadTexture function
- Added stb_image for image loading
2025-04-21 16:18:38 +10:00

26 lines
576 B
C++

#pragma once
#include <glad/gl.h>
#define GLFW_INCLUDE_NONE
#include <GLFW/glfw3.h>
#include <filesystem>
struct Texture
{
GLuint Handle = 0;
uint32_t Width = 0;
uint32_t Height = 0;
};
struct Framebuffer
{
GLuint Handle = 0;
Texture ColorAttachment;
};
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);