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/compiler/translate.sml
ViewVC logotype

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

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

revision 863, Tue Apr 27 23:09:18 2010 UTC revision 864, Wed Apr 28 17:21:18 2010 UTC
# Line 67  Line 67 
67            val size = IR.newParam ("ps_size", IR.T_FLOAT)            val size = IR.newParam ("ps_size", IR.T_FLOAT)
68            val isDead = IR.newParam ("ps_isDead", IR.T_BOOL)            val isDead = IR.newParam ("ps_isDead", IR.T_BOOL)
69            val color = IR.newParam ("ps_color", IR.T_VEC)            val color = IR.newParam ("ps_color", IR.T_VEC)
70            val dummy = IR.newParam ("ps_dummy", IR.T_VEC)            val dummy = IR.newParam ("ps_dummy", IR.T_FLOAT)
71            val state = PS{pos=pos, vel=vel, size=size, isDead=isDead, color=color, dummy=IR.newParam("dmy", IR.T_FLOAT)}            val state = PS{pos=pos, vel=vel, size=size, isDead=isDead, color=color, dummy=dummy}
72            val blk = IR.newBlock ([pos, vel, size, isDead, color, dummy], k state)            val blk = IR.newBlock ([pos, vel, size, isDead, color, dummy], k state)
73            in            in
74              blks := blk :: !blks;              blks := blk :: !blks;
# Line 81  Line 81 
81            val size = IR.newParam ("ps_size", IR.T_FLOAT)            val size = IR.newParam ("ps_size", IR.T_FLOAT)
82            val isDead = IR.newParam ("ps_isDead", IR.T_BOOL)            val isDead = IR.newParam ("ps_isDead", IR.T_BOOL)
83            val color = IR.newParam ("ps_color", IR.T_VEC)            val color = IR.newParam ("ps_color", IR.T_VEC)
84            val dummy = IR.newParam ("ps_dummy", IR.T_VEC)            val dummy = IR.newParam ("ps_dummy", IR.T_FLOAT)
85            val state = PS{pos=pos, vel=vel, size=size, isDead=isDead, color=color, dummy = IR.newParam("dmy", IR.T_FLOAT)}            val state = PS{pos=pos, vel=vel, size=size, isDead=isDead, color=color, dummy = dummy}
86            val blk = IR.newBlock ([pos, vel, size, isDead, color, dummy] @ args, k state)            val blk = IR.newBlock ([pos, vel, size, isDead, color, dummy] @ args, k state)
87            in            in
88              blks := blk :: !blks;              blks := blk :: !blks;
# Line 351  Line 351 
351          end          end
352    
353          fun trEmitter(emit, env, state, k : particle_state -> IR.stmt) = let          fun trEmitter(emit, env, state, k : particle_state -> IR.stmt) = let
354            val PS{pos, vel, size, isDead, color, ...} = state            val PS{pos, vel, size, isDead, color, dummy} = state
355            val P.EMIT{maxNum, posDomain, velDomain, colDomain, ...} = emit            val P.EMIT{maxNum, posDomain, velDomain, colDomain, ...} = emit
356            val blk = newBlock (env, k)            val blk = newBlock (env, k)
357           in           in

Legend:
Removed from v.863  
changed lines
  Added in v.864

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