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

Method _setBaseTexSize

Engine/source/terrain/terrData.cpp:275–296  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

273}
274
275bool TerrainBlock::_setBaseTexSize( void *obj, const char *index, const char *data )
276{
277 TerrainBlock *terrain = static_cast<TerrainBlock*>( obj );
278
279 // NOTE: We're limiting the base texture size to
280 // 2048 as anything greater in size becomes too
281 // large to generate for many cards.
282 //
283 // If you want to remove this limit feel free, but
284 // prepare for problems if you don't ship the baked
285 // base texture with your installer.
286 //
287
288 S32 texSize = mClamp( dAtoi( data ), 0, 2048 );
289 if ( terrain->mBaseTexSize != texSize )
290 {
291 terrain->mBaseTexSize = texSize;
292 terrain->setMaskBits( MaterialMask );
293 }
294
295 return false;
296}
297
298bool TerrainBlock::_setBaseTexFormat(void *obj, const char *index, const char *data)
299{

Callers

nothing calls this directly

Calls 3

mClampFunction · 0.85
dAtoiFunction · 0.85
setMaskBitsMethod · 0.45

Tested by

no test coverage detected