Handle keyboard in QML
This commit is contained in:
@@ -45,6 +45,7 @@ public:
|
||||
m_count(count) {}
|
||||
|
||||
void draw(const Matrix4 &transformation, SceneGraph::Camera3D &camera);
|
||||
|
||||
void count(int count);
|
||||
void hue(float hue);
|
||||
void t(float t);
|
||||
@@ -62,6 +63,9 @@ public:
|
||||
MagnumRenderer();
|
||||
~MagnumRenderer();
|
||||
|
||||
/**
|
||||
* @brief Called when Qt needs to resize/re-create FBO.
|
||||
*/
|
||||
void reset(Platform::GLContext *ctx,
|
||||
GL::Framebuffer fbo,
|
||||
Vector2i windowSize,
|
||||
@@ -72,16 +76,25 @@ public:
|
||||
void t(float t);
|
||||
void hue(float hue);
|
||||
void count(int count);
|
||||
Containers::Optional<ArcBallCamera> camera();
|
||||
|
||||
Containers::Optional<ArcBallCamera>& camera();
|
||||
void lagging(float lagging);
|
||||
float lagging();
|
||||
|
||||
private:
|
||||
/**
|
||||
* @brief We need to delay initialization until we have valid OpenGL context.
|
||||
*/
|
||||
void lazyInitialize();
|
||||
/**
|
||||
* @brief Reset OpenGL state to our desired state.
|
||||
*/
|
||||
void prepGLState();
|
||||
|
||||
bool m_init;
|
||||
int m_count;
|
||||
|
||||
Platform::GLContext *m_ctx;
|
||||
Platform::GLContext *m_ctx{nullptr};
|
||||
GL::Framebuffer m_FBO{NoCreate};
|
||||
|
||||
Scene3D m_scene;
|
||||
|
||||
Reference in New Issue
Block a user