blob: 144956ab40b005f76aafb503af7646210177df13 (
plain) (
blame)
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
|
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
using namespace glm;
#ifndef RENDERER_H
#define RENDERER_H
struct Rectangle {
int x;
int y;
int w;
int h;
Rectangle() {};
Rectangle(int m_x, int m_y, int m_w, int m_h)
{
x = m_x;
y = m_y;
w = m_w;
h = m_h;
}
};
struct Texture {
GLuint texID;
int width;
int height;
};
GLFWwindow* initRenderer();
void destroyRenderer();
Texture* createTexture(int width, int height);
void destroyTexture(Texture* tex);
Texture* loadTextureFromBMP(char* filename);
void saveTextureToBMP(Texture* tex, char* filename);
void fillTexture(Texture* tex, Rectangle* loc, int r, int g, int b);
void blitTexture(Texture* srctex, Texture* dsttex, Rectangle* srcrect, Rectangle* dstrect);
void renderWithoutEffects(Texture* tex);
void renderScreen(Texture* tex);
#endif
|