From ed08b673c50b076042d8f0c49501372168142764 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Fri, 16 Feb 2018 16:04:32 -0500 Subject: Refactored renderer Renderer is basically now more C++'y, as it makes more use of classes (a lot of GL types have been wrapped), and the renderer itself is now a class. The monitor mesh is also now indexed. Tweaked the NTSC artifacting after inadvertently fixing a bug with the way the image was loaded. --- src/renderer.h | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 src/renderer.h (limited to 'src/renderer.h') 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 @@ -#include -#include - -#ifndef RENDERER_H -#define RENDERER_H - -struct Rectangle { - int x; - int y; - int w; - int h; -}; - -class Texture { - public: - Texture(int width, int height); - Texture(const char* file); - Texture(const Texture& tex); - Texture(Texture&& tex); - ~Texture(); - Texture& operator= (Texture tex); - friend void swap(Texture& tex1, Texture& tex2); - void fill(Rectangle loc, int r, int g, int b); - void blit(const Texture& src, Rectangle srcrect, Rectangle dstrect, double alpha = 1.0); - void renderScreen() const; - Rectangle entirety() const; - - private: - GLuint texID; - int width; - int height; -}; - -GLFWwindow* initRenderer(); -void destroyRenderer(); - -#endif -- cgit 1.4.1