~ | Shader class working

This commit is contained in:
RedShip
2024-10-13 20:59:24 +02:00
parent 793398f888
commit d8fd3d0535
11 changed files with 285 additions and 26 deletions

View File

@ -1,12 +1,12 @@
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* RT.c :+: :+: :+: */
/* RT.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: TheRed <TheRed@students.42.fr> +#+ +:+ +#+ */
/* By: ycontre <ycontre@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2024/09/27 14:51:49 by TheRed #+# #+# */
/* Updated: 2024/09/27 14:51:49 by TheRed ### ########.fr */
/* Updated: 2024/10/13 20:58:06 by ycontre ### ########.fr */
/* */
/* ************************************************************************** */
@ -15,12 +15,19 @@
int main(void)
{
Window window;
GLFWwindow *win = window.getWindow();
Shader shader("shaders/vertex.glsl", "shaders/frag.glsl");
shader.attach();
while (!window.shouldClose())
{
glClear(GL_COLOR_BUFFER_BIT);
glUseProgram(shader.getProgram());
window.display();
window.pollEvents();
}