mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-28 11:49:06 +00:00
VideoCommon: add additional data types (int, int2, float, bool, etc) as properties of materials and some helper functions to support sending the data to the GPU
This commit is contained in:
parent
96c256f97a
commit
e204b3c8ee
3 changed files with 219 additions and 53 deletions
|
@ -393,21 +393,15 @@ void CustomPipelineAction::OnTextureCreate(GraphicsModActionData::TextureCreate*
|
|||
return;
|
||||
}
|
||||
|
||||
if (property.m_type == VideoCommon::MaterialProperty::Type::Type_TextureAsset)
|
||||
if (auto* value = std::get_if<std::string>(&property.m_value))
|
||||
{
|
||||
if (property.m_value)
|
||||
auto asset = loader.LoadGameTexture(*value, m_library);
|
||||
if (asset)
|
||||
{
|
||||
if (auto* value = std::get_if<std::string>(&*property.m_value))
|
||||
{
|
||||
auto asset = loader.LoadGameTexture(*value, m_library);
|
||||
if (asset)
|
||||
{
|
||||
const auto loaded_time = asset->GetLastLoadedTime();
|
||||
game_assets.push_back(VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{
|
||||
std::move(asset), loaded_time});
|
||||
m_texture_code_names.push_back(property.m_code_name);
|
||||
}
|
||||
}
|
||||
const auto loaded_time = asset->GetLastLoadedTime();
|
||||
game_assets.push_back(
|
||||
VideoCommon::CachedAsset<VideoCommon::GameTextureAsset>{std::move(asset), loaded_time});
|
||||
m_texture_code_names.push_back(property.m_code_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue