Torque3D Documentation / _generateds / TheoraTextureObject

TheoraTextureObject

consoledoc.h

Definition of a named texture target playing a Theora video.

More...

Theora

filename

Theora video file to play.

string

Name of the texture target by which the texture can be referenced in materials.

Sound description to use for the video's audio channel.

bool

Should the video loop.

Public Functions

void

Pause playback of the video.

void
play()

Start playback of the video.

void
stop()

Stop playback of the video.

Detailed Description

Definition of a named texture target playing a Theora video.

TheoraTextureObject defines a named texture target that may play back a Theora video. This texture target can, for example, be used by materials to texture objects with videos.

// The object that provides the video texture and controls its playback.
singleton TheoraTextureObject( TheVideo )
{
   // Unique name for the texture target for referencing in materials.
   texTargetName = "video";

   // Path to the video file.
   theoraFile = "./MyVideo.ogv";
};

// Material that uses the video texture.
singleton Material( TheVideoMaterial )
{
   // This has to reference the named texture target defined by the
   // TheoraTextureObject's 'texTargetName' property.  Prefix with '#' to
   // identify as texture target reference.
   diffuseMap[ 0 ] = "#video";
};

Theora

filename theoraFile 

Theora video file to play.

string texTargetName 

Name of the texture target by which the texture can be referenced in materials.

SFXDescription SFXDescription 

Sound description to use for the video's audio channel.

If not set, will use a default one.

bool Loop 

Should the video loop.

Public Functions

pause()

Pause playback of the video.

play()

Start playback of the video.

stop()

Stop playback of the video.