mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-05-05 17:40:39 +00:00
Save and load edited shaders as capture modifications
* When a shader edit is loaded with a capture, it's loaded as "pending" and not immediately applied.
This commit is contained in:
@@ -4368,8 +4368,9 @@ void TextureViewer::on_customEdit_clicked()
|
||||
ResourceId(), ShaderStage::Fragment, lit("main"), files,
|
||||
encodingExtensions[QFileInfo(filename).completeSuffix()], ShaderCompileFlags(),
|
||||
// Save Callback
|
||||
[thisPointer, key, filename, path](ICaptureContext *ctx, IShaderViewer *viewer,
|
||||
ShaderEncoding, ShaderCompileFlags, rdcstr, bytebuf bytes) {
|
||||
[thisPointer, key, filename, path](ICaptureContext *ctx, IShaderViewer *viewer, ResourceId,
|
||||
ShaderStage, ShaderEncoding, ShaderCompileFlags, rdcstr,
|
||||
bytebuf bytes) {
|
||||
{
|
||||
// don't trigger a full refresh
|
||||
if(thisPointer)
|
||||
@@ -4397,7 +4398,7 @@ void TextureViewer::on_customEdit_clicked()
|
||||
}
|
||||
},
|
||||
|
||||
[thisPointer, key](ICaptureContext *ctx) {
|
||||
[thisPointer, key](ICaptureContext *, IShaderViewer *, ResourceId) {
|
||||
if(thisPointer)
|
||||
thisPointer->m_CustomShaderEditor.remove(key);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user