Skip to content

Commit

Permalink
Synced branch with master, and made necessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben-Bingham committed Jun 22, 2024
1 parent a3f0230 commit edefd23
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions src/testapp/sessions/solar_system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -379,8 +379,7 @@ Session setup_solar_system_planets_draw(
CoSpaceCommon &rMainSpace = rUniverse.m_coordCommon[planetMainSpace];

rPlanetDraw.drawEnts.resize(rMainSpace.m_satCount, lgrn::id_null<DrawEnt>());

rScnRender.m_drawIds.create(rPlanetDraw.drawEnts .begin(), rPlanetDraw.drawEnts .end());
rScnRender.m_drawIds.create(rPlanetDraw.drawEnts.begin(), rPlanetDraw.drawEnts.end());
});

rBuilder.task()
Expand All @@ -396,17 +395,16 @@ Session setup_solar_system_planets_draw(
Material &rMatPlanet = rScnRender.m_materials[rPlanetDraw.matPlanets];

MeshId const sphereMeshId = rNMesh.m_shapeToMesh.at(EShape::Sphere);
MeshId const cubeMeshId = rNMesh.m_shapeToMesh.at(EShape::Box);

for (std::size_t i = 0; i < rMainSpace.m_satCount; ++i)
{
DrawEnt const drawEnt = rPlanetDraw.drawEnts[i];

rScnRender.m_mesh[drawEnt] = rDrawing.m_meshRefCounts.ref_add(sphereMeshId);
rScnRender.m_meshDirty.push_back(drawEnt);
rScnRender.m_visible.set(std::size_t(drawEnt));
rScnRender.m_opaque.set(std::size_t(drawEnt));
rMatPlanet.m_ents.set(std::size_t(drawEnt));
rScnRender.m_visible.insert(drawEnt);
rScnRender.m_opaque.insert(drawEnt);
rMatPlanet.m_ents.insert(drawEnt);
rMatPlanet.m_dirty.push_back(drawEnt);
}

Expand Down

0 comments on commit edefd23

Please sign in to comment.