45 lines
747 B
C++
45 lines
747 B
C++
#pragma once
|
|
|
|
#include <psemek/app/scene.hpp>
|
|
|
|
#include <SDL2/SDL_keycode.h>
|
|
|
|
#include <memory>
|
|
|
|
namespace psemek::app
|
|
{
|
|
|
|
struct app
|
|
: scene_base
|
|
{
|
|
app(std::string const & name);
|
|
app(std::string const & name, int multisampling);
|
|
~app() override;
|
|
|
|
virtual bool running() const;
|
|
virtual void stop();
|
|
virtual void on_quit();
|
|
|
|
void on_resize(int width, int height) override;
|
|
|
|
void render() override;
|
|
|
|
void poll_events();
|
|
void run();
|
|
|
|
scene * set_scene(scene * s);
|
|
|
|
void show_cursor(bool show);
|
|
float time() const;
|
|
|
|
int width() const;
|
|
int height() const;
|
|
|
|
private:
|
|
struct impl;
|
|
std::unique_ptr<impl> pimpl_;
|
|
struct impl & impl() { return *pimpl_; }
|
|
struct impl const & impl() const { return *pimpl_; }
|
|
};
|
|
|
|
}
|