mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Shader Gen to produce ShaderData
Shader gen now produces a shaderdata class - this should reduce full recompilation of shaders when a macro switch happens. FileStream can now also be setup to be async write, so it will write out the file on a separate thread hopefully freeing up the main thread to continue working.
This commit is contained in:
parent
8adf692da5
commit
4cf780e7b8
11 changed files with 337 additions and 126 deletions
|
|
@ -771,7 +771,7 @@ void AssimpShapeLoader::extractTexture(U32 index, aiTexture* pTex)
|
|||
{ // Compressed format, write the data directly to disc
|
||||
texPath.setExtension(pTex->achFormatHint);
|
||||
FileStream *outputStream;
|
||||
if ((outputStream = FileStream::createAndOpen(texPath.getFullPath(), Torque::FS::File::Write)) != NULL)
|
||||
if ((outputStream = FileStream::createAndOpen(texPath.getFullPath(), Torque::FS::File::Write, FileStream::AsyncMode::Background)) != NULL)
|
||||
{
|
||||
outputStream->setPosition(0);
|
||||
outputStream->write(pTex->mWidth, pTex->pcData);
|
||||
|
|
|
|||
|
|
@ -720,7 +720,7 @@ static bool sReadCollada(const Torque::Path& path, TSShape*& res_shape)
|
|||
// Cache the model to a DTS file for faster loading next time.
|
||||
cachedPath.setExtension("cached.dts");
|
||||
// Cache the model to a DTS file for faster loading next time.
|
||||
FileStream dtsStream;
|
||||
FileStream dtsStream(FileStream::AsyncMode::Background);
|
||||
if (dtsStream.open(cachedPath.getFullPath(), Torque::FS::File::Write))
|
||||
{
|
||||
Con::printf("Writing cached shape to %s", cachedPath.getFullPath().c_str());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue