Adding Display Example
This commit is contained in:
parent
b43f2fcca8
commit
4d69ff3a18
5 changed files with 112 additions and 1 deletions
34
examples/display/DisplayExample.h
Normal file
34
examples/display/DisplayExample.h
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
#ifndef DISPLAY_EXAMPLE_H
|
||||
#define DISPLAY_EXAMPLE_H
|
||||
|
||||
#include <Spectre/Scene/Camera2D.h>
|
||||
#include <Spectre/Graphics/Texture.h>
|
||||
#include <Spectre/Graphics/Sprite.h>
|
||||
#include <Spectre/System/EventListener.h>
|
||||
#include <Spectre/Game.h>
|
||||
|
||||
class DisplayExample : public sp::Game, sp::EventListener
|
||||
{
|
||||
public :
|
||||
void onEvent(const sp::Event& event);
|
||||
|
||||
protected :
|
||||
|
||||
void init();
|
||||
|
||||
void update(double dt);
|
||||
|
||||
void render();
|
||||
|
||||
protected :
|
||||
|
||||
sp::Display::Mode m_mode;
|
||||
|
||||
sp::Camera2D m_camera;
|
||||
sp::Renderer2D *m_renderer;
|
||||
sp::Texture m_texture;
|
||||
sp::Sprite m_sprite;
|
||||
};
|
||||
|
||||
#endif /* DISPLAY_EXAMPLE_H */
|
||||
Loading…
Add table
Add a link
Reference in a new issue