diff --git a/src/inferno.cpp b/src/inferno.cpp index 78cbe9d..6de00c0 100644 --- a/src/inferno.cpp +++ b/src/inferno.cpp @@ -46,6 +46,8 @@ void Inferno::uiPreset() int Inferno::run() { + mWin->setKeyCallback(&handleKbd); + mWin->setMouseCallback(&handlePtr); while (true) { if (!mWin->newFrame()) { break; } @@ -110,4 +112,14 @@ int Inferno::run() return 0; } +void handleKbd(int key, int scan, int action, int mod) +{ + +} + +void handlePtr(double x, double y) +{ + +} + } diff --git a/src/inferno.hpp b/src/inferno.hpp index 526a796..5bba487 100644 --- a/src/inferno.hpp +++ b/src/inferno.hpp @@ -10,7 +10,6 @@ class GLFWwindow; class RasterizeRenderer; class Scene; - class Inferno { public: @@ -20,13 +19,21 @@ public: void uiPreset(); int run(); +private: + double mLastMouseX, mLastMouseY; + + friend void handleKbd(int key, int scan, int action, int mod); + friend void handlePtr(double x, double y); + private: RasterizeRenderer* mRasterRenderer; - Scene* mScene; private: Window* mWin; }; +void handleKbd(int key, int scan, int action, int mod); +void handlePtr(double x, double y); + }