Home My Page Projects Code Snippets Project Openings 3D graphics for Standard ML
Summary Activity SCM

SCM Repository

[sml3d] Diff of /trunk/sml3d/src/particles/particles.sml
ViewVC logotype

Diff of /trunk/sml3d/src/particles/particles.sml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 462, Sat May 23 16:59:29 2009 UTC revision 463, Sun May 24 14:43:38 2009 UTC
# Line 358  Line 358 
358            GL.vertex3fv (V.adds(pos, 0.1,vel))            GL.vertex3fv (V.adds(pos, 0.1,vel))
359          )          )
360    
361      fun render (particleGroup) =      fun render (particleGroup) = let
362          let val PG{count, maxParticles, posBuf, particles, ...} = particleGroup            val PG{count, maxParticles, posBuf, particles, ...} = particleGroup
363              in
364                if (!count > 0)
365                  then let
366                  val indexBuf = DB.new(DB.sizeus, !count)                  val indexBuf = DB.new(DB.sizeus, !count)
367          in          in
368                    GL.blendFunc {src=GL.SRC_ALPHA, dst=GL.ONE_MINUS_SRC_ALPHA};                    GL.blendFunc {src=GL.SRC_ALPHA, dst=GL.ONE_MINUS_SRC_ALPHA};
# Line 374  Line 377 
377                    GL.drawElementsus(GL.POINTS, indexBuf);                    GL.drawElementsus(GL.POINTS, indexBuf);
378                    GL.disable(GL.BLEND)                    GL.disable(GL.BLEND)
379                  end                  end
380                  else ()
381              end
382    
383    (******** Action list stuff *********)    (******** Action list stuff *********)
384      fun avoid{magnitude : float,      fun avoid{magnitude : float,

Legend:
Removed from v.462  
changed lines
  Added in v.463

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0