Neatware Header
Home   Products   Forums   Partners   Buy   Company   Contact   Blog   

17. Miscellaneous


17.1 Font

  • In the shader class declares a font variable ft
  variable ft
  • In InitDeviceObjects method of the shader class inserts following line that will initailize the ft.
  %ft init
  • In the RestoreDeviceObjects method inserts following line that restores the ft.
  $ft restore
  • In the InvalidateDeviceObjects method inserts following line that invalidates the ft.
  $ft invalidate
  • In the DeleteDeviceObjects method inserts following line that frees ft.
  $ft release 
  • In the Render method following command draw a text string

$ft draw row column color string

The text string with color is painted on the row and column.

17.2 Arcball

set arcball [$app arcball]

creates an arcball using mouse control.

17.3 Light

set lit [$app light directional x y z]

creates a directional light object lit in position vector <x, y, z>. $lit set $n command sets the lit as the n-th light. $lit enable 0 true enables the light lit. When you using the pixel shader you can ignore this fixed-function lighting.

17.4 Material

set mtrl [$app material x y z w]
$mtrl set

These two commands create a material mtrl with float4 vector <x, y, z, w> and sets it with $mtrl set command.