mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +00:00
Core implementation of Physical Based Rendering.
This commit is contained in:
parent
54f1d8c18e
commit
b4a1d18f42
148 changed files with 4464 additions and 1016 deletions
|
|
@ -52,6 +52,11 @@ GFXTexHandle::GFXTexHandle( const String &texName, GFXTextureProfile *profile, c
|
|||
set( texName, profile, desc );
|
||||
}
|
||||
|
||||
GFXTexHandle::GFXTexHandle(const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc)
|
||||
{
|
||||
set(texNameR, texNameG, texNameB, texNameA, inputKey, profile, desc);
|
||||
}
|
||||
|
||||
bool GFXTexHandle::set( const String &texName, GFXTextureProfile *profile, const String &desc )
|
||||
{
|
||||
// Clear the existing texture first, so that
|
||||
|
|
@ -70,6 +75,24 @@ bool GFXTexHandle::set( const String &texName, GFXTextureProfile *profile, const
|
|||
return isValid();
|
||||
}
|
||||
|
||||
bool GFXTexHandle::set(const String &texNameR, const String &texNameG, const String &texNameB, const String &texNameA, U32 inputKey[4], GFXTextureProfile *profile, const String &desc)
|
||||
{
|
||||
// Clear the existing texture first, so that
|
||||
// its memory is free for the new allocation.
|
||||
free();
|
||||
|
||||
// Create and set the new texture.
|
||||
AssertFatal( texNameR.isNotEmpty(), "Texture name is empty" );
|
||||
StrongObjectRef::set( TEXMGR->createCompositeTexture( texNameR, texNameG, texNameB, texNameA, inputKey, profile ) );
|
||||
|
||||
#ifdef TORQUE_DEBUG
|
||||
if ( getPointer() )
|
||||
getPointer()->mDebugDescription = desc;
|
||||
#endif
|
||||
|
||||
return isValid();
|
||||
}
|
||||
|
||||
GFXTexHandle::GFXTexHandle( GBitmap *bmp, GFXTextureProfile *profile, bool deleteBmp, const String &desc )
|
||||
{
|
||||
set( bmp, profile, deleteBmp, desc );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue