-
Notifications
You must be signed in to change notification settings - Fork 0
/
glhelpers.h
36 lines (27 loc) · 1.1 KB
/
glhelpers.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
#pragma once
// Includes
#include <glad.h>
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/ext.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/quaternion.hpp>
#include <glm/gtx/quaternion.hpp>
#include <glm/gtc/type_ptr.hpp>
char* loadFile(const char* name);
float randFloat();
float randFloatUnit();
GLuint genFloatTexture(float *data, int width, int height);
GLuint makeBO(GLenum type, void* data, GLsizei size, int accessFlags);
GLuint makeTextureBuffer(int w, int h, GLint internalFormat);
GLuint makeFBO(GLuint texture);
void renderSAQ(GLuint texture);
GLchar* getSaqVSSource();
GLuint loadShader(GLenum type, const char *file);
GLuint buildShader(GLenum type, GLchar* shaderSrc);
GLuint makeShaderProgram(GLuint vertexShader, GLuint fragmentShader);
GLuint makeShaderProgramMRT(GLuint vertexShader, GLuint fragmentShader, const char** targets, int numTargets);
GLuint buildSaqShaderProgram(GLchar* saqFSSource);
GLuint loadSaqShaderProgram(const char* file);
GLuint loadTexture(const char *filename);
void registerGlDebugLogger(unsigned int logLevel);