MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / _texDelegate

Method _texDelegate

Engine/source/gfx/video/theoraTextureObject.cpp:103–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

101//-----------------------------------------------------------------------------
102
103GFXTextureObject* TheoraTextureObject::_texDelegate( U32 index )
104{
105 // Refresh the video texture state.
106 mTheoraTexture.refresh();
107
108 // No texture if not playing.
109 if( !mTheoraTexture.isPlaying() )
110 {
111 // Was this video playing and should it loop?
112 if(mIsPlaying && mLoop)
113 {
114 play();
115
116 // It won't be ready this frame
117 return NULL;
118 }
119 else
120 {
121 mIsPlaying = false;
122 return NULL;
123 }
124 }
125
126 // Return the Theora video texture for the current frame.
127 return mTheoraTexture.getTexture();
128}
129
130//-----------------------------------------------------------------------------
131

Callers

nothing calls this directly

Calls 3

refreshMethod · 0.45
isPlayingMethod · 0.45
getTextureMethod · 0.45

Tested by

no test coverage detected