-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathRenderer.h
50 lines (37 loc) · 1.03 KB
/
Renderer.h
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
#pragma once
#include "DbAlbumCollection.h"
#include "Image.h"
#include "TextDisplay.h"
#include "utils.h"
class TextureCache;
class WorldState;
class Engine;
class Renderer {
public:
explicit Renderer(Engine& engine);
void resizeGlScene(int width, int height);
void setProjectionMatrix(bool pickMatrix = false, int x = 0, int y = 0);
std::optional<AlbumInfo> albumAtPoint(int x, int y);
void drawFrame();
void ensureVSync(bool enableVSync);
void glPushOrthoMatrix();
void glPopOrthoMatrix();
TextDisplay textDisplay;
BitmapFont bitmapFont;
class Engine& engine;
bool wasMissingTextures = false;
int winWidth = 1;
int winHeight = 1;
private:
GLImage spinnerTexture;
void getFrustrumSize(double& right, double& top, double& zNear, double& zFar);
bool vSyncEnabled;
void drawBg();
void drawGui();
void drawSpinner();
void drawScene(bool selectionPass);
pfc::array_t<double> getMirrorClipPlane();
void drawMirrorPass();
void drawMirrorOverlay();
void drawCovers(bool showTarget = false);
};