Move onscreen rendering into SGCT's render2D function (closes #181)

Same fix makes GUI windows work again (closes #412)
This commit is contained in:
Alexander Bock
2017-11-09 18:12:13 -05:00
parent 51a71d5ce2
commit aa20c677dd
5 changed files with 43 additions and 18 deletions

View File

@@ -87,6 +87,7 @@ public:
void postSynchronizationPreDraw();
void render(const glm::mat4& sceneMatrix, const glm::mat4& viewMatrix,
const glm::mat4& projectionMatrix);
void drawOverlays();
void postDraw();
void keyboardCallback(Key key, KeyModifier mod, KeyAction action);
void charCallback(unsigned int codepoint, KeyModifier mod);
@@ -133,6 +134,7 @@ public:
PreSync, // Callback for the end of the pre-sync function
PostSyncPreDraw, // Callback for the end of the post-sync-pre-draw function
Render, // Callback for the end of the render function
Draw2D, // Callback for the two-dimensional rendering functions
PostDraw // Callback for the end of the post-draw function
};
@@ -218,6 +220,7 @@ private:
std::vector<std::function<void()>> preSync;
std::vector<std::function<void()>> postSyncPreDraw;
std::vector<std::function<void()>> render;
std::vector<std::function<void()>> draw2D;
std::vector<std::function<void()>> postDraw;
std::vector<std::function<bool (Key, KeyModifier, KeyAction)>> keyboard;