-
Notifications
You must be signed in to change notification settings - Fork 0
/
AppScreen.hpp
63 lines (43 loc) · 1.37 KB
/
AppScreen.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#pragma once
#include "IAppScreen.hpp"
#include "vitiGL.hpp"
#include "Fork.hpp"
#include <string>
#include <map>
class App;
class vitiGL::Window;
class AppScreen : public vitiGL::IAppScreen {
public:
// the one time we use a friend class (for the menu's callback functions):
friend class MenuScreen;
AppScreen(App* app, vitiGL::Window* window);
~AppScreen();
// Inherited via IAppScreen
virtual void onEntry() override;
virtual void onExit() override;
virtual void update() override;
virtual void draw() override;
virtual int next() const override;
virtual int previous() const override;
//get the latest screen content:
GLuint texture() const { return _drender.texture(); }
//get a pointer to the scene:
vitiGL::Scene* scene() { return &_scene; }
protected:
void updateInput();
void updateFreezed(); //called from MenuScreen
void addCube(float mass, const glm::vec3& pos);
void addOctahedron(float mass, const glm::vec3& pos);
void addTetrahedron(float mass, const glm::vec3& pos);
void addIcosahedron(float mass, const glm::vec3& pos);
void addChain( const glm::vec3& startPos,
int counter, float distance,
const glm::vec3& scale = { 1.0f, 1.0f, 1.0f });
vitiGL::Window* _window;
vitiGL::Scene _scene;
vitiGL::Camera _cam;
vitiGL::glRenderer _renderer;
vitiGL::glRendererDeferred _drender; //test
vitiGL::Timer _timer;
Fork _fork;
};