Added UI functionality to the Graphics System #232
|
@ -172,11 +172,20 @@ namespace SHADE
|
|||
|
||||
// Shader
|
||||
bool shaderChanged = false;
|
||||
const auto* SHADER_INFO = SHAssetManager::GetData<SHShaderAsset>(currentMatSpec->fragShader);
|
||||
const std::string SHADER_NAME = SHADER_INFO ? SHADER_INFO->name : "Unknown Shader";
|
||||
const auto* VERT_SHADER_INFO = SHAssetManager::GetData<SHShaderAsset>(currentMatSpec->vertexShader);
|
||||
const std::string VERT_SHADER_NAME = VERT_SHADER_INFO ? VERT_SHADER_INFO->name : "Unknown Shader";
|
||||
isDirty |= SHEditorWidgets::DragDropReadOnlyField<AssetID>
|
||||
(
|
||||
"Fragment Shader", SHADER_NAME.data(),
|
||||
"Fragment Shader", VERT_SHADER_NAME.data(),
|
||||
[this]() { return currentMatSpec->vertexShader; },
|
||||
[this](const AssetID& id) { currentMatSpec->vertexShader = id; },
|
||||
SHDragDrop::DRAG_RESOURCE
|
||||
);
|
||||
const auto* FRAG_SHADER_INFO = SHAssetManager::GetData<SHShaderAsset>(currentMatSpec->fragShader);
|
||||
const std::string FRAG_SHADER_NAME = FRAG_SHADER_INFO ? FRAG_SHADER_INFO->name : "Unknown Shader";
|
||||
isDirty |= SHEditorWidgets::DragDropReadOnlyField<AssetID>
|
||||
(
|
||||
"Fragment Shader", FRAG_SHADER_NAME.data(),
|
||||
[this]() { return currentMatSpec->fragShader; },
|
||||
[this](const AssetID& id) { currentMatSpec->fragShader = id; },
|
||||
SHDragDrop::DRAG_RESOURCE
|
||||
|
|
Loading…
Reference in New Issue