mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-04 04:50:31 +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
|
|
@ -34,6 +34,7 @@
|
|||
#include "scene/sceneManager.h"
|
||||
#include "console/engineAPI.h"
|
||||
#include "math/mathUtils.h"
|
||||
#include "gfx/bitmap/cubemapSaver.h"
|
||||
|
||||
IMPLEMENT_CONOBJECT( CubemapData );
|
||||
|
||||
|
|
@ -183,3 +184,18 @@ DefineEngineMethod( CubemapData, getFilename, const char*, (),,
|
|||
{
|
||||
return object->getFilename();
|
||||
}
|
||||
|
||||
DefineEngineMethod(CubemapData, save, void, (const char* filename, const GFXFormat format), ("", GFXFormatBC1),
|
||||
"Returns the script filename of where the CubemapData object was "
|
||||
"defined. This is used by the material editor.")
|
||||
{
|
||||
if (filename == "")
|
||||
filename = object->getName();
|
||||
|
||||
//add dds extension if needed
|
||||
String finalName = String(filename);
|
||||
if(!finalName.endsWith(".dds") || !finalName.endsWith(".DDS"))
|
||||
finalName += String(".dds");
|
||||
|
||||
CubemapSaver::save(object->mCubemap, finalName, format);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue