From de6f424214456e3f69735f7fbdc7a6e34d0bd648 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Mon, 1 Feb 2016 11:43:56 -0500 Subject: [PATCH] lib/gamnit: intro static particles, the default most simple particle program MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- lib/gamnit/depth/depth.nit | 2 +- lib/gamnit/depth/particles.nit | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/gamnit/depth/depth.nit b/lib/gamnit/depth/depth.nit index b3cab23..9eed0e6 100644 --- a/lib/gamnit/depth/depth.nit +++ b/lib/gamnit/depth/depth.nit @@ -30,7 +30,7 @@ redef class App world_camera.near = 0.1 # Prepare programs - var programs = [versatile_program, normals_program, explosion_program, smoke_program: GamnitProgram] + var programs = [versatile_program, normals_program, explosion_program, smoke_program, static_program: GamnitProgram] for program in programs do program.compile_and_link var gamnit_error = program.error diff --git a/lib/gamnit/depth/particles.nit b/lib/gamnit/depth/particles.nit index e3be795..11b9aac 100644 --- a/lib/gamnit/depth/particles.nit +++ b/lib/gamnit/depth/particles.nit @@ -39,6 +39,9 @@ import depth_core redef class App + # Graphics program to display static non-moving particles + var static_program = new ParticleProgram + # Graphics program to display blowing up particles var explosion_program = new ExplosionProgram @@ -153,7 +156,7 @@ end # # This program should be subclassed to create custom particle effects. # Either `vertex_shader_source` and `vertex_shader_core` can be refined. -abstract class ParticleProgram +class ParticleProgram super GamnitProgramFromSource redef var vertex_shader_source = """ -- 1.7.9.5