skein/src/gfx.hpp

19 lines
662 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>
int initGraphics(GLFWwindow** window, const std::string& title);
2023-08-12 00:16:35 +02:00
void windowSizeCallback(GLFWwindow* window, int width, int height);
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);
2023-08-12 00:16:35 +02:00
void updateModelViewProjectionMatrix(GLuint shaderProgram, float time);