summary refs log tree commit diff stats
path: root/src/renderer.h
diff options
context:
space:
mode:
authorKelly Rauchenberger <fefferburbia@gmail.com>2018-05-17 15:55:37 -0400
committerGitHub <noreply@github.com>2018-05-17 15:55:37 -0400
commit90aadf3844386824140a20d7fbb847bc16009a94 (patch)
tree6f83fce90e71abb22b1a8f3e09c79963b2a34d5d /src/renderer.h
parentbc63fa57ced1c7329f7fdcfd168eaf7e290158bc (diff)
parent86f0106d0523825549f1e74b835688c78a10cf6c (diff)
downloadtherapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.gz
therapy-90aadf3844386824140a20d7fbb847bc16009a94.tar.bz2
therapy-90aadf3844386824140a20d7fbb847bc16009a94.zip
Merge pull request #7 from hatkirby/es-rewrite
The ECS rewrite exceeds the original branch in functionality, so it is time to merge it in.
Diffstat (limited to 'src/renderer.h')
-rw-r--r--src/renderer.h37
1 files changed, 0 insertions, 37 deletions
diff --git a/src/renderer.h b/src/renderer.h deleted file mode 100644 index 84ad688..0000000 --- a/src/renderer.h +++ /dev/null
@@ -1,37 +0,0 @@
1#include <GL/glew.h>
2#include <GLFW/glfw3.h>
3
4#ifndef RENDERER_H
5#define RENDERER_H
6
7struct Rectangle {
8 int x;
9 int y;
10 int w;
11 int h;
12};
13
14class Texture {
15 public:
16 Texture(int width, int height);
17 Texture(const char* file);
18 Texture(const Texture& tex);
19 Texture(Texture&& tex);
20 ~Texture();
21 Texture& operator= (Texture tex);
22 friend void swap(Texture& tex1, Texture& tex2);
23 void fill(Rectangle loc, int r, int g, int b);
24 void blit(const Texture& src, Rectangle srcrect, Rectangle dstrect, double alpha = 1.0);
25 void renderScreen() const;
26 Rectangle entirety() const;
27
28 private:
29 GLuint texID;
30 int width;
31 int height;
32};
33
34GLFWwindow* initRenderer();
35void destroyRenderer();
36
37#endif