skein/src/gfx.hpp

19 lines
662 B
C++

#pragma once
#include <string>
#include "GL/glew.h"
#include <GLFW/glfw3.h>
int initGraphics(GLFWwindow** window, const std::string& title);
void windowSizeCallback(GLFWwindow* window, int width, int height);
GLuint compileShaderProgram(const std::string& fragShaderPath);
GLuint compileShader(const std::string& shaderPath, GLenum shaderType);
GLint getShaderUniformLocation(GLuint shaderProgram, const std::string& uniformName);
void updateProjectionMatrix(GLuint shaderProgram);
void updateModelMatrix(GLuint shaderProgram);
void updateViewMatrix(GLuint shaderProgram, float time);
void updateModelViewProjectionMatrix(GLuint shaderProgram, float time);