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

Method onAdd

Engine/source/gfx/video/theoraTextureObject.cpp:132–156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

130//-----------------------------------------------------------------------------
131
132bool TheoraTextureObject::onAdd()
133{
134 if( !Parent::onAdd() )
135 return false;
136
137 if( mFilename == StringTable->EmptyString())
138 {
139 Con::errorf( "TheoraTextureObject::onAdd - 'filename' must be set" );
140 return false;
141 }
142
143 if( mTexTargetName.isEmpty() )
144 {
145 Con::errorf( "TheoraTextureObject::onAdd - 'texTargetName' not set" );
146 return false;
147 }
148
149 if( !mTexTarget.registerWithName( mTexTargetName ) )
150 {
151 Con::errorf( "TheoraTextureObject::onAdd - Could not register texture target '%s", mTexTargetName.c_str() );
152 return false;
153 }
154
155 return true;
156}
157
158//-----------------------------------------------------------------------------
159

Callers

nothing calls this directly

Calls 5

EmptyStringMethod · 0.80
registerWithNameMethod · 0.80
errorfFunction · 0.50
isEmptyMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected