DarkRadiant: materialeditor2 d24d64f2
|greebo||greebo||materialeditor2||2021-03-13 05:08:08||materialeditor2 c9d942b5|
|Affected Issues||0005532: Material Editor: Ground Work|
|Changeset||0005532: Introduce an extended IEditableShaderLayer interface.
Just returning a const IShaderLayer reference for non-edit scenarios turns out to be impractical, since the render passes need to evaluate time-dependent expressions and update the stage's registers, requiring non-const access to the stages. The Material itself needs to know when it's being modified, so I went for intruducing a separate Material::getEditableLayer() method that is taking care of the backup clone as soon as it's called. This way it's possible to inspect and render a material without implicitly marking it as modified.
|mod - include/ishaderlayer.h||Diff File|
|mod - include/ishaders.h||Diff File|
|mod - radiantcore/shaders/CShader.cpp||Diff File|
|mod - radiantcore/shaders/CShader.h||Diff File|
|mod - radiantcore/shaders/Doom3ShaderLayer.h||Diff File|