lib/gamnit: intro static particles, the default most simple particle program
authorAlexis Laferrière <alexis.laf@xymus.net>
Mon, 1 Feb 2016 16:43:56 +0000 (11:43 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Tue, 2 Feb 2016 14:40:49 +0000 (09:40 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

lib/gamnit/depth/depth.nit
lib/gamnit/depth/particles.nit

index b3cab23..9eed0e6 100644 (file)
@@ -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
index e3be795..11b9aac 100644 (file)
@@ -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 = """