Add GFXShader::init with support for ordered vector of sampler names for shader.

This commit is contained in:
LuisAntonRebollo 2014-04-17 20:29:44 +02:00
parent 938e28b6f3
commit 086c6b5416
2 changed files with 30 additions and 0 deletions

View file

@ -45,16 +45,29 @@ GFXShader::~GFXShader()
Torque::FS::RemoveChangeNotification( mPixelFile, this, &GFXShader::_onFileChanged );
}
#ifndef TORQUE_OPENGL
bool GFXShader::init( const Torque::Path &vertFile,
const Torque::Path &pixFile,
F32 pixVersion,
const Vector<GFXShaderMacro> &macros )
{
Vector<String> samplerNames;
return init( vertFile, pixFile, pixVersion, macros, samplerNames );
}
#endif
bool GFXShader::init( const Torque::Path &vertFile,
const Torque::Path &pixFile,
F32 pixVersion,
const Vector<GFXShaderMacro> &macros,
const Vector<String> &samplerNames)
{
// Store the inputs for use in reloading.
mVertexFile = vertFile;
mPixelFile = pixFile;
mPixVersion = pixVersion;
mMacros = macros;
mSamplerNamesOrdered = samplerNames;
// Before we compile the shader make sure the
// conditioner features have been updated.