Flatten src into model, edit and ui, with .h headers
Resources and utilities sit directly in src. The ImGui windows, wizards, popups and helpers are in ui. Headers that would shadow system ones are renamed: math_util, timestamp, subprocess, localization. Includes are written from src.
This commit is contained in:
1 parent
a515267e26
commit
7fb2c607c2
175 files changed
+537
-537
No files matched your search
@@ -0,0 +1,38 @@
|
||||
#pragma once
|
||||
|
||||
#include <glad/glad.h>
|
||||
#include <glm/glm.hpp>
|
||||
|
||||
namespace anm2ed
|
||||
{
|
||||
class Framebuffer
|
||||
{
|
||||
public:
|
||||
enum class Type
|
||||
{
|
||||
UNDERLAY,
|
||||
LAYER,
|
||||
OVERLAY,
|
||||
};
|
||||
|
||||
GLuint fbo{};
|
||||
GLuint rbo{};
|
||||
GLuint texture{};
|
||||
glm::vec2 size{};
|
||||
glm::vec2 previousSize{};
|
||||
GLint filter{GL_LINEAR}; // how the texture is sampled when drawn scaled; takes effect on the next resize
|
||||
|
||||
Framebuffer();
|
||||
~Framebuffer();
|
||||
|
||||
void set();
|
||||
void resize_check();
|
||||
void size_set(glm::vec2);
|
||||
void viewport_set() const;
|
||||
void clear(glm::vec4 = glm::vec4(1.0f, 1.0f, 1.0f, 0.0f)) const;
|
||||
std::vector<uint8_t> pixels_get() const;
|
||||
bool is_valid() const;
|
||||
void bind() const;
|
||||
void unbind() const;
|
||||
};
|
||||
};
|
||||
Reference in new issue
Block a user