gamnit :: SmokeProgram :: defaultinit
gamnit $ SmokeProgram :: SELF
Type of this instance, automatically specialized in every classgamnit $ SmokeProgram :: vertex_shader_core
Core GLSL code forvertex_shader_source
gamnit :: GamnitProgram :: attributes
Attributes of this program organized by namegamnit :: GamnitProgram :: attributes=
Attributes of this program organized by namegamnit :: ParticleProgram :: center=
Coordinates of particle effectscore :: Object :: class_factory
Implementation used byget_class
to create the specific class.
gamnit :: ParticleProgram :: color=
Color tint per vertexgamnit :: GamnitProgram :: compile_and_link
Compile the shaders, and this program, then link and report any errorsgamnit :: SmokeProgram :: defaultinit
gamnit :: ParticleProgram :: defaultinit
gamnit :: GamnitProgram :: defaultinit
core :: Object :: defaultinit
gamnit :: GamnitProgram :: deleted=
Has this program been deleted?gamnit :: GamnitProgram :: diagnose
Diagnose possible problems with the shaders of the programgamnit :: GamnitProgram :: error=
Last error raised bycompile_and_link
gamnit :: GamnitProgram :: fragment_shader
Fragment shader to attach to this programgamnit :: GamnitProgramFromSource :: fragment_shader_source
Source code of the fragment shadercore :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
gamnit :: ParticleProgram :: ot=
Creation time of each particlecore :: Object :: output_class_name
Display class name on stdout (debug only).gamnit :: ParticleProgram :: texture=
Visible texture unitgamnit :: ParticleProgram :: ttl=
Time-to-live of each particlegamnit :: GamnitProgram :: uniforms
Uniforms of this program organized by namegamnit :: GamnitProgram :: uniforms=
Uniforms of this program organized by namegamnit :: ParticleProgram :: use_texture
Should this program use the texturetexture
?
gamnit :: ParticleProgram :: use_texture=
Should this program use the texturetexture
?
gamnit :: GamnitProgram :: vertex_shader
Vertex shader to attach to this programgamnit :: ParticleProgram :: vertex_shader_core
Core GLSL code forvertex_shader_source
gamnit :: GamnitProgramFromSource :: vertex_shader_source
Source code of the vertex shadergamnit :: GamnitProgramFromSource
Gamnit graphical program from the shaders source code
# Graphics program to display particles slowly drifting upwards
class SmokeProgram
super ParticleProgram
redef fun vertex_shader_core do return """
vec4 c = center;
c.y += dt * 1.0;
c.x += dt * 0.1;
gl_Position = c * mvp;
gl_PointSize = scale / gl_Position.z * (pt+0.1);
if (pt < 0.1)
v_color *= pt / 0.1;
else
v_color *= 1.0 - pt*0.9;
"""
end
lib/gamnit/depth/particles.nit:317,1--334,3