Neatware Header

MyrmecoX
Professional
tcl ide

Enterprise
server,runtime

Ladybug
Snaml

Buy

Neatware
Cinematic
Solution

LSXP
+
GeForceFX
Radeon9x

upto

30%
Saving


13. Graph and Video

You can add a graph object into a mCL shader in below. A graph can be an avi video, a mp3 audio, or a jpeg picture.

  • In the shader class declares a graph variable graph
  variable graph
  • In InitDeviceObjects method of the shader class inserts lines
  set userid 0xACDCADCD
  set filename [$app dialog file "*.mp3" $initfolder] 
  set graph [$app graph $filename $userid]

You may set fixed file name string without using the open file dialog box. The $app graph command creates a graph object gh with filename and userid. The userid is a 32-bit integer.

  • In the RestoreDeviceObjects method inserts following line that starts the graph.
  $graph start
  • In the InvalidateDeviceObjects method inserts following line that ends the graph.
  $graph end
  • In the DeleteDeviceObjects method inserts following line that free the graph.
  $graph release