mirror of
https://github.com/TheRedShip/RT_GPU.git
synced 2025-09-28 02:58:35 +02:00
~ | Shader class working
This commit is contained in:
15
srcs/RT.cpp
15
srcs/RT.cpp
@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user