Minor improvements

This commit is contained in:
2026-04-28 00:25:31 +02:00
parent 45e121bf77
commit 442cb8f2dd
6 changed files with 22 additions and 6 deletions
@@ -491,6 +491,13 @@ void GPUContextVulkan::BeginRenderPass()
else else
{ {
handle = _rtHandles[0]; handle = _rtHandles[0];
#if !BUILD_RELEASE
if (!handle)
{
LOG(Error, "BeginRenderPass called with no render targets bound");
return;
}
#endif
layout.ReadDepth = false; layout.ReadDepth = false;
layout.WriteDepth = false; layout.WriteDepth = false;
} }
+8 -1
View File
@@ -48,8 +48,15 @@ void BoneSocket::UpdateTransformation()
Transform t; Transform t;
if (nodes.IsValidIndex(_index)) if (nodes.IsValidIndex(_index))
nodes.Get()[_index].Decompose(t); nodes.Get()[_index].Decompose(t);
else else if (parent->SkinnedModel->Skeleton.Nodes.IsValidIndex(_index))
t = parent->SkinnedModel->Skeleton.GetNodeTransform(_index); t = parent->SkinnedModel->Skeleton.GetNodeTransform(_index);
else
{
// Retry when cached index become invalid (eg. model reimport)
_index = -1;
UpdateTransformation();
return;
}
if (!_useScale) if (!_useScale)
t.Scale = _localTransform.Scale; t.Scale = _localTransform.Scale;
SetLocalTransform(t); SetLocalTransform(t);
+1 -1
View File
@@ -21,7 +21,7 @@
#include "Editor/Editor.h" #include "Editor/Editor.h"
#endif #endif
void LightmapEntry::Serialize(ISerializable::SerializeStream& stream) void LightmapEntry::Serialize(ISerializable::SerializeStream& stream) const
{ {
stream.JKEY("LightmapIndex"); stream.JKEY("LightmapIndex");
stream.Int(TextureIndex); stream.Int(TextureIndex);
+2 -2
View File
@@ -61,14 +61,14 @@ Actor* Prefab::GetDefaultInstance()
// Skip if not loaded // Skip if not loaded
if (!IsLoaded()) if (!IsLoaded())
{ {
LOG(Warning, "Cannot instantiate object from not loaded prefab asset."); LOG(Warning, "Cannot instantiate object from not loaded prefab asset '{}'", GetPath());
return nullptr; return nullptr;
} }
// Prevent recursive calls // Prevent recursive calls
if (_isCreatingDefaultInstance) if (_isCreatingDefaultInstance)
{ {
LOG(Warning, "Loop call to Prefab::GetDefaultInstance."); LOG(Warning, "Loop call to Prefab::GetDefaultInstance for '{}'", GetPath());
return nullptr; return nullptr;
} }
_isCreatingDefaultInstance = true; _isCreatingDefaultInstance = true;
@@ -370,7 +370,9 @@ bool ParticleEmitterGraphCPUExecutor::ComputeBounds(ParticleEmitter* emitter, Pa
void ParticleEmitterGraphCPUExecutor::Draw(ParticleEmitter* emitter, ParticleEffect* effect, ParticleEmitterInstance& data, RenderContext& renderContext, Matrix& transform) void ParticleEmitterGraphCPUExecutor::Draw(ParticleEmitter* emitter, ParticleEffect* effect, ParticleEmitterInstance& data, RenderContext& renderContext, Matrix& transform)
{ {
if (!emitter->IsUsingLights || _graph._attrPosition == -1) if (!emitter->IsUsingLights ||
_graph._attrPosition == -1 ||
data.Version != _graph.Version)
return; return;
// Prepare particles buffer access // Prepare particles buffer access
+1 -1
View File
@@ -58,7 +58,7 @@ struct LightmapEntry
{ {
} }
void Serialize(ISerializable::SerializeStream& stream); void Serialize(ISerializable::SerializeStream& stream) const;
void Deserialize(ISerializable::DeserializeStream& stream); void Deserialize(ISerializable::DeserializeStream& stream);
}; };