Add source

This commit is contained in:
Mylloon 2022-05-15 21:02:37 +02:00
parent 796214099c
commit b052570c1c
Signed by: Anri
GPG key ID: A82D63DFF8D1317F
5 changed files with 15 additions and 7 deletions

View file

@ -1,3 +1,5 @@
/* Auteur : Farès BELHADJ (amsi@up8.edu) */
#version 330 #version 330
uniform float delta_temps; uniform float delta_temps;

View file

@ -1,3 +1,5 @@
/* Auteur : Farès BELHADJ (amsi@up8.edu) */
#version 330 #version 330
layout (location = 0) in vec3 vsiPosition; layout (location = 0) in vec3 vsiPosition;

View file

@ -1,5 +1,7 @@
#include "../includes/animations.h" #include "../includes/animations.h"
/* TP6 */
void cube(int etat) { void cube(int etat) {
static GLuint cube = 0, proc_id = 0; static GLuint cube = 0, proc_id = 0;
@ -9,9 +11,9 @@ void cube(int etat) {
switch(etat) { switch(etat) {
case GL4DH_INIT: case GL4DH_INIT:
r = (rand() / (float)(RAND_MAX)) * 1.f; r = rand() / (float)RAND_MAX;
g = (rand() / (float)(RAND_MAX)) * 1.f; g = rand() / (float)RAND_MAX;
b = (rand() / (float)(RAND_MAX)) * 1.f; b = rand() / (float)RAND_MAX;
cube = gl4dgGenCubef(); cube = gl4dgGenCubef();
proc_id = gl4duCreateProgram("<vs>shaders/cube.vs", "<fs>shaders/cube.fs", NULL); proc_id = gl4duCreateProgram("<vs>shaders/cube.vs", "<fs>shaders/cube.fs", NULL);

View file

@ -1,5 +1,7 @@
#include "../includes/animations.h" #include "../includes/animations.h"
/* TP6 */
void cube2(int etat) { void cube2(int etat) {
static GLuint cube = 0, proc_id = 0; static GLuint cube = 0, proc_id = 0;
@ -9,9 +11,9 @@ void cube2(int etat) {
switch(etat) { switch(etat) {
case GL4DH_INIT: case GL4DH_INIT:
r = (rand() / (float)(RAND_MAX)) * 1.f; r = rand() / (float)RAND_MAX;
g = (rand() / (float)(RAND_MAX)) * 1.f; g = rand() / (float)RAND_MAX;
b = (rand() / (float)(RAND_MAX)) * 1.f; b = rand() / (float)RAND_MAX;
cube = gl4dgGenCubef(); cube = gl4dgGenCubef();
proc_id = gl4duCreateProgram("<vs>shaders/cube.vs", "<fs>shaders/cube.fs", NULL); proc_id = gl4duCreateProgram("<vs>shaders/cube.vs", "<fs>shaders/cube.fs", NULL);

View file

@ -1,6 +1,6 @@
#include "../includes/animations.h" #include "../includes/animations.h"
/* Fondu de Farès BELHADJ */ /* Auteur : Farès BELHADJ (amsi@up8.edu) */
void fondu(void (* ancienne_anim)(int), void (* nouvelle_anim)(int), Uint32 temps_total, Uint32 temps_ecoule, int etat) { void fondu(void (* ancienne_anim)(int), void (* nouvelle_anim)(int), Uint32 temps_total, Uint32 temps_ecoule, int etat) {
GLint viewport[4]; GLint viewport[4];