mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-30 22:07:58 +03:00
Imported Upstream version 0.26.0
This commit is contained in:
commit
9a2b6c69b6
1398 changed files with 212217 additions and 0 deletions
35
extern/shiny/Main/MaterialInstancePass.cpp
vendored
Normal file
35
extern/shiny/Main/MaterialInstancePass.cpp
vendored
Normal file
|
@ -0,0 +1,35 @@
|
|||
#include "MaterialInstancePass.hpp"
|
||||
|
||||
#include <fstream>
|
||||
|
||||
namespace sh
|
||||
{
|
||||
|
||||
MaterialInstanceTextureUnit* MaterialInstancePass::createTextureUnit (const std::string& name)
|
||||
{
|
||||
mTexUnits.push_back(MaterialInstanceTextureUnit(name));
|
||||
return &mTexUnits.back();
|
||||
}
|
||||
|
||||
void MaterialInstancePass::save(std::ofstream &stream)
|
||||
{
|
||||
if (mShaderProperties.listProperties().size())
|
||||
{
|
||||
stream << "\t\t" << "shader_properties" << '\n';
|
||||
stream << "\t\t{\n";
|
||||
mShaderProperties.save(stream, "\t\t\t");
|
||||
stream << "\t\t}\n";
|
||||
}
|
||||
|
||||
PropertySetGet::save(stream, "\t\t");
|
||||
|
||||
for (std::vector <MaterialInstanceTextureUnit>::iterator it = mTexUnits.begin();
|
||||
it != mTexUnits.end(); ++it)
|
||||
{
|
||||
stream << "\t\ttexture_unit " << it->getName() << '\n';
|
||||
stream << "\t\t{\n";
|
||||
it->save(stream, "\t\t\t");
|
||||
stream << "\t\t}\n";
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue