Neatware Header
Home   Products   Forums   Partners   Buy   Company   Contact   Blog   

10. Texture

Texture command creates a texture object. There are several types of texture commands.

  • Texture file

    $app texture file path width height miplevels usage format pool

This command creates a texture from file path. The width and height are in pixels. If they are zero, the dimensions are taken from file. Miplevels specified the number of mip levels. If it is zero a complete chain is created. The usage could be the value rendertarget or dynamic. Format has the D3DFORMAT enumerated type. In mCL the D3DFMT_ prefix is omitted when used as the format value. Pool has the enumeration value default, managed, systemmem, and scratch.

  • Texture normal

    $app texture normal width height miplevels usage format pool

This command creates an empty texture. The width and height are in pixels. If they are zero, the dimensions are taken from file. Miplevels specified the number of mip levels. If it is zero a complete chain is created. The usage could be the value rendertarget or dynamic. Format has the D3DFORMAT enumerated type. In mCL the D3DFMT_ prefix is omitted when used as the format value. Pool has the enumeration value default, managed, systemmem, and scratch.

  • Texture cube

    $app texture cube size miplevels usage format pool
  • It creates a cube texture. The size ..... If they are zero, the dimensions are taken from file. Miplevels specified the number of mip levels. If it is zero a complete chain is created. The usage could be the value rendertarget or dynamic. Format has the D3DFORMAT enumerated type. In mCL the D3DFMT_ prefix is omitted when used as the format value. Pool has the enumeration value default, managed, systemmem, and scratch.

    $app texture cubefile path size miplevels usage format pool

    This command creates a cube texture from file path. The size .... If they are zero, the dimensions are taken from file. Miplevels specified the number of mip levels. If it is zero a complete chain is created. The usage could be the value rendertarget or dynamic. Format has the D3DFORMAT enumerated type. In mCL the D3DFMT_ prefix is omitted when used as the format value. Pool has the enumeration value default, managed, systemmem, and scratch.

  • Texture volume

    $app texture volume width height depth miplevels usage format pool


This command creates a volume texture. The width, height, and depth are in pixels. Miplevels specified the number of mip levels. If it is zero a complete chain is created. The usage could be the value rendertarget or dynamic. Format has the D3DFORMAT enumerated type. In mCL the D3DFMT_ prefix is omitted when used as the format value. Pool has the enumeration value default, managed, systemmem, and scratch.

  • Texture video
  • $app texture video path

This command creates a video with file name path.

Texture commands

  • $tx set stage

    assigns texture tx object to the stage of a device.
  • $tx release

    free the texture object tx.
  • $tx lockRect face [level] ?

    locks the rectangle of the tx in face and level.
  • $tx unlockRect face [level] ?

unlocks the rectangle that has been locked.

  • $tx lockBox [level]

    locks the volume of texture tx in level.
  • $tx unlockBox [level]

    unlocks the locked volume.
  • $tx getLockRect

    returns the pointer of the locked rectangle of tx.
  • $tx getLockRectPitch

    returns the pointer of the locked rectangle of pitch.
  • $tx getLockBox

    returns the pointer of the locked volume box.
  • $tx getLockBoxRowPitch

    returns the pointer of the locked row pitch in the volume box.
  • $tx getLockBoxSlicePitch

returns the pointer of the locked slice pitch in the volume box.