[nostalgia/core/studio] Add zoom support to TileSheetEditor

This commit is contained in:
2022-02-03 00:24:40 -06:00
parent 78942ce21d
commit d4e198ecc3
6 changed files with 49 additions and 12 deletions
@@ -37,10 +37,13 @@ class TileSheetPixels {
outColor = vec4(fColor, 1.0);
})";
float m_pixelSizeMod = 1;
glutils::GLProgram m_shader;
glutils::BufferSet m_bufferSet;
public:
void setPixelSizeMod(float sm) noexcept;
ox::Error buildShader() noexcept;
void draw(bool update) noexcept;
@@ -48,11 +51,11 @@ class TileSheetPixels {
void initBufferSet(const NostalgiaGraphic &img, const NostalgiaPalette &pal) noexcept;
private:
static void setPixelBufferObject(unsigned vertexRow, float x, float y, Color16 color, float *vbo, GLuint *ebo) noexcept;
void setPixelBufferObject(unsigned vertexRow, float x, float y, Color16 color, float *vbo, GLuint *ebo) noexcept;
void setBufferObjects(const NostalgiaGraphic &img, const NostalgiaPalette &pal, glutils::BufferSet *bg) noexcept;
static class ImVec2 pixelSize() noexcept;
class ImVec2 pixelSize() const noexcept;
};