[nostalgia/core/studio] Break out TileSheetEditor application logic

This commit is contained in:
2022-02-13 11:17:57 -06:00
parent 320df614a9
commit 8774f1c062
10 changed files with 246 additions and 149 deletions
@@ -25,9 +25,9 @@ void TileSheetGrid::draw(bool update, const geo::Vec2 &scroll) noexcept {
if (update) {
glutils::sendVbo(m_bufferSet);
}
const auto uniformScroll = static_cast<GLint>(glGetUniformLocation(m_shader, "gScroll"));
const auto uniformScroll = glGetUniformLocation(m_shader, "gScroll");
glUniform2f(uniformScroll, scroll.x, scroll.y);
glDrawArrays(GL_POINTS, 0, m_bufferSet.vertices.size() / VertexVboRowLength);
glDrawArrays(GL_POINTS, 0, static_cast<GLsizei>(m_bufferSet.vertices.size() / VertexVboRowLength));
}
void TileSheetGrid::initBufferSet(const geo::Vec2 &paneSize, const NostalgiaGraphic &img) noexcept {