Commit 68be07a2 authored by Philip Trettner's avatar Philip Trettner

Improved GlfwApp interface

parent 411edfcd
......@@ -53,6 +53,16 @@ std::string GlfwApp::getClipboardString() const
return s ? s : "";
bool GlfwApp::isMouseButtonPressed(int button) const
return glfwGetMouseButton(mWindow, button) == GLFW_PRESS;
bool GlfwApp::isKeyPressed(int key) const
return glfwGetKey(mWindow, key) == GLFW_PRESS;
void GlfwApp::init()
if (mUseDefaultRendering)
......@@ -175,6 +175,11 @@ public:
/// gets the current clipboard content
std::string getClipboardString() const;
/// Returns true iff the specified mouse button (GLFW_...) is pressed
bool isMouseButtonPressed(int button) const;
/// Returns true iff the specified key (GLFW_...) is pressed
bool isKeyPressed(int key) const;
/// Called once GLOW is initialized. Allocated your resources and init your logic here.
virtual void init();
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment