瀏覽代碼

scene: fix regression in primitive rendering.

We were no longer calling Render() on primitives with a null source.
legacy
Sam Hocevar 6 年之前
父節點
當前提交
41764c0a56
共有 1 個文件被更改,包括 4 次插入3 次删除
  1. +4
    -3
      src/scene.cpp

+ 4
- 3
src/scene.cpp 查看文件

@@ -480,8 +480,7 @@ void Scene::ReleasePrimitiveRenderer(int index, uintptr_t key)

void Scene::ReleaseAllPrimitiveRenderers(uintptr_t key)
{
for (auto& renderer : data->m_prim_renderers[key])
renderer = nullptr;
data->m_prim_renderers[key].clear();
}

//-----------------------------------------------------------------------------
@@ -689,8 +688,10 @@ void Scene::render_primitives()
for (int idx = 0; idx < data->m_prim_renderers[key].count(); ++idx)
{
/* TODO: Not sure if thread compliant */
std::shared_ptr<PrimitiveSource> source;
if (idx < SceneData::m_prim_sources[key].count())
data->m_prim_renderers[key][idx]->Render(*this, SceneData::m_prim_sources[key][idx]);
source = SceneData::m_prim_sources[key][idx];
data->m_prim_renderers[key][idx]->Render(*this, source);
}
}
}


Loading…
取消
儲存