-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBackground.h
More file actions
48 lines (33 loc) · 910 Bytes
/
Background.h
File metadata and controls
48 lines (33 loc) · 910 Bytes
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
#pragma once
#include "GLWindow.h"
#include "FlatCamera.h"
#include <vector>
class Background
{
public:
static bool Init(const unsigned &w, const unsigned &h);
static void Kill();
static void Update(uint_fast64_t ns);
static void Draw();
static void Render();
static void Add(Background *bg);
static unsigned Width();
static unsigned Height();
protected:
static FlatCamera flatcamera;
static void StartRender();
virtual void BGUpdate(const float &time) = 0;
virtual void BGRender() = 0;
virtual void BGRestart() = 0;
private:
static uint_fast64_t duration;
static uint_fast32_t fadelength;
static float fadetime;
static bool fading;
static unsigned fadefx;
static std::vector<Background*> vector;
static unsigned width, height;
static unsigned framebuffertexture[3], framebuffer[3], depthrenderbuffer;
static unsigned currentbackground;
static unsigned currentbuffer;
};