Skip to content
Snippets Groups Projects
Commit 1a937d94 authored by Pascal Engeler's avatar Pascal Engeler
Browse files

Added mirror setting

parent d902246e
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ public:
void setObjectState(int objectIndex, int state);
bool setAllObjectStates(std::vector<ObjectMetadata> data);
void setMirrorState(bool mirror);
std::string name() const;
int numObjects() const;
......
......@@ -193,6 +193,12 @@ void Layer::setObjectState(int objectIndex, int state) {
glBindBuffer(GL_ARRAY_BUFFER, 0);
}
void Layer::setMirrorState(bool mirror) {
_shader.use();
_shader.setBool("mirror", mirror);
_shader.unuse();
}
bool Layer::setAllObjectStates(std::vector<ObjectMetadata> data) {
if (data.size() != numObjects()) {
std::cerr << "Size mismatch in Object States Update: Loaded " << data.size() << ", expected " << numObjects() << std::endl;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment