Skip to content
Snippets Groups Projects
Commit 1c4f8160 authored by Marie AUDOUARD's avatar Marie AUDOUARD
Browse files
parents 8928d83d 0b93d2dd
No related branches found
No related tags found
No related merge requests found
#version 300 es // Compatible with OpenGL ES
precision mediump float;
#version 330 core
// Fragment shader - this code is executed for every pixel/fragment that belongs to a displayed shape
//
......
#version 300 es // Compatible with OpenGL ES
precision mediump float;
#version 330 core
// Vertex shader - this code is executed for every vertex of the shape
......
......@@ -359,7 +359,7 @@ void scene_structure::display_gui()
void scene_structure::display_ball() {
bouncing.simulate(timer_chain.scale * 0.01f, terrain_length);
bouncing.simulate(timer.scale * 0.01f, terrain_length);
for (int i = 0; i < bouncing.N; i++) {
bouncing.mesh.model.translation = bouncing.pos[i];
bouncing.mesh.material.color = bouncing.color[i];
......@@ -369,7 +369,7 @@ void scene_structure::display_ball() {
void scene_structure::display_projectiles() {
projectiles.simulate(timer_chain.scale * 0.01f, terrain_length);
projectiles.simulate(timer.scale * 0.03f, terrain_length);
for (int i = 0; i < projectiles.N; i++) {
projectiles.mesh.model.translation = projectiles.pos[i];
projectiles.mesh.material.color = projectiles.color[i];
......
......@@ -47,10 +47,10 @@ struct scene_structure : cgp::scene_inputs_generic {
// ****************************** //
// Elements and shapes of the scene
// ****************************** //
// Timer used for the animation
cgp::skybox_drawable skybox;
// Timer used for the animation
timer_basic timer;
cgp::mesh_drawable terrain;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment