Add sampler names to ShaderData for use on old versions of OpenGL and Opengl ES2 that not support explicit sampler location on shader files.

This commit is contained in:
LuisAntonRebollo 2014-11-08 00:46:09 +01:00
parent c354f59b72
commit 79e158d528
6 changed files with 156 additions and 3 deletions

View file

@ -91,8 +91,23 @@ protected:
/// @see LightManager::smActivateSignal
static void _onLMActivate( const char *lm, bool activate );
enum
{
NumTextures = 8
};
String mSamplerNames[NumTextures];
bool mRTParams[NumTextures];
bool _checkDefinition(GFXShader *shader);
public:
void setSamplerName(const String &name, int idx) { mSamplerNames[idx] = name; }
String getSamplerName(int idx) const { return mSamplerNames[idx]; }
bool hasSamplerDef(const String &samplerName, int &pos) const;
bool hasRTParamsDef(const int pos) const { return mRTParams[pos]; }
ShaderData();