Probably we don't want the default first pass to be stuck with us if we're loading a material.

--HG--
branch : gsoc2013-dfighter
hg/feature/gsoc2013-dfighter
dfighter1985 12 years ago
parent fa3ad050de
commit ed267a6587

@ -76,6 +76,7 @@ namespace NL3D
public:
CDynMaterial();
~CDynMaterial();
void clear();
void serial( NLMISC::IStream &f );
std::string getClassName(){ return "CDynMaterial"; }

@ -150,6 +150,11 @@ namespace NL3D
}
CDynMaterial::~CDynMaterial()
{
clear();
}
void CDynMaterial::clear()
{
std::vector< SRenderPass* >::iterator itr = passes.begin();
while( itr != passes.end() )

@ -81,7 +81,7 @@ namespace MaterialEditor
void MaterialEditorWindow::onNewMaterialClicked()
{
nl3dIface->newMaterial();
materialSplitter->onNewMaterial();
materialSplitter->onMaterialLoaded();
passesWidget->onMaterialLoaded();
}

@ -167,6 +167,7 @@ namespace MaterialEditor
return false;
newMaterial();
mat->clear();
mat->serial( xml );
file.close();
@ -194,6 +195,7 @@ namespace MaterialEditor
{
delete mat;
mat = new NL3D::CDynMaterial();
}
CNelMaterialProxy CNel3DInterface::getMaterial()

Loading…
Cancel
Save