diff options
Diffstat (limited to 'src/renderer.h')
-rw-r--r-- | src/renderer.h | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/renderer.h b/src/renderer.h deleted file mode 100644 index 6dccf7a..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 | |||
7 | struct Rectangle { | ||
8 | int x; | ||
9 | int y; | ||
10 | int w; | ||
11 | int h; | ||
12 | }; | ||
13 | |||
14 | class 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 | |||
34 | GLFWwindow* initRenderer(); | ||
35 | void destroyRenderer(); | ||
36 | |||
37 | #endif | ||