Skip to content

Commit 17b0579

Browse files
author
devsh
committed
scene was empty, no wonder nothing drew
1 parent 08c28ef commit 17b0579

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

09_GeometryCreator/main.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@ class GeometryCreatorApp final : public MonoWindowApplication, public applicatio
6767
m_renderer = CSimpleDebugRenderer::create(m_assetMgr.get(),scRes->getRenderpass(),0,m_scene.get());
6868
if (!m_renderer)
6969
return logFail("Could not create Renderer!");
70+
m_renderer->m_instances.resize(1);
71+
m_renderer->m_instances[0].world = float32_t3x4(
72+
float32_t4(1,0,0,0),
73+
float32_t4(0,1,0,0),
74+
float32_t4(0,0,1,0)
75+
);
7076

7177
// camera
7278
{
@@ -147,6 +153,9 @@ class GeometryCreatorApp final : public MonoWindowApplication, public applicatio
147153
memcpy(&viewProjMatrix,camera.getConcatenatedMatrix().pointer(),sizeof(viewMatrix));
148154
}
149155
const auto viewParams = CSimpleDebugRenderer::SViewParams(viewMatrix,viewProjMatrix);
156+
157+
// tear down scene every frame
158+
m_renderer->m_instances[0].packedGeo = m_renderer->getInitParams().geoms.data()+gcIndex;
150159
m_renderer->render(cb,viewParams);
151160

152161
cb->endRenderPass();

0 commit comments

Comments
 (0)