This commit is contained in:
2025-06-19 05:29:06 -04:00
parent 9929e69f22
commit 91190987ed
30 changed files with 2754 additions and 475 deletions

26
src/preview.h Normal file
View File

@@ -0,0 +1,26 @@
#pragma once
#include "texture.h"
static const ivec2 PREVIEW_SIZE = {1280, 720};
#define PREVIEW_ZOOM_MIN 0
#define PREVIEW_ZOOM_MAX 400
#define PREVIEW_GRID_MIN 0
#define PREVIEW_GRID_MAX 20
struct Preview
{
GLuint texture;
GLuint fbo;
GLuint rbo;
bool isGrid;
f32 zoom = 100;
ivec2 gridSize = {10, 10};
vec4 color = {0.69, 0.69, 0.69, 1.0f};
vec4 gridColor = {0.35, 0.35, 0.35, 1.0f};
};
void preview_init(Preview* self);
void preview_draw(Preview* self);
void preview_free(Preview* self);