mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
begun adding uniform hooks
This commit is contained in:
parent
512c4515fc
commit
5019478aad
3 changed files with 64 additions and 3 deletions
|
|
@ -485,6 +485,8 @@ void Material::initPersistFields()
|
|||
|
||||
addProtectedField("customShaderFeature", TypeRealString, NULL, &protectedSetCustomShaderFeature, &defaultProtectedGetFn,
|
||||
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors);
|
||||
addProtectedField("CustomShaderFeatureUniforms", TypeRealString, NULL, &protectedSetCustomShaderFeatureUniforms, &defaultProtectedGetFn,
|
||||
"Do not modify, for internal use.", AbstractClassRep::FIELD_HideInInspectors);
|
||||
|
||||
Parent::initPersistFields();
|
||||
}
|
||||
|
|
@ -516,6 +518,29 @@ bool Material::protectedSetCustomShaderFeature(void *object, const char *index,
|
|||
return false;
|
||||
}
|
||||
|
||||
bool Material::protectedSetCustomShaderFeatureUniforms(void *object, const char *index, const char *data)
|
||||
{
|
||||
Material *material = static_cast< Material* >(object);
|
||||
|
||||
//CustomShaderFeatureData* customFeature;
|
||||
//if (!Sim::findObject(data, customFeature))
|
||||
// return false;
|
||||
|
||||
//material->mCustomShaderFeatures.push_back(customFeature);
|
||||
if (index != NULL)
|
||||
{
|
||||
char featureName[256] = { 0 };
|
||||
U32 id = 0;
|
||||
dSscanf(index, "%s_%i", featureName, id);
|
||||
|
||||
String uniformName = data;
|
||||
|
||||
bool tmp = true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Material::onAdd()
|
||||
{
|
||||
if (Parent::onAdd() == false)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue