skein/src/gfx.hpp

21 lines
670 B
C++
Raw Normal View History

#pragma once
#include <string>
#include "GL/glew.h"
2023-08-06 15:49:59 +02:00
#include <GLFW/glfw3.h>
extern const int WIDTH;
extern const int HEIGHT;
extern const float ASPECT;
int initGraphics(GLFWwindow** window, const std::string& title);
2023-08-06 13:08:49 +02:00
GLuint compileShaderProgram(const std::string& fragShaderPath);
2023-08-06 15:49:59 +02:00
GLuint compileShader(const std::string& shaderPath, GLenum shaderType);
GLint getShaderUniformLocation(GLuint shaderProgram, const std::string& uniformName);
void updateProjectionMatrix(GLuint shaderProgram);
void updateModelMatrix(GLuint shaderProgram, float time);
void updateViewMatrix(GLuint shaderProgram);
void updateModelViewProjectionMatrix(GLuint shaderProgram, float time);