mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-19 00:57:35 +02:00
fix crash in Particle Entities and pendingChanges.updateItem()
This commit is contained in:
parent
31bce8a50e
commit
c15161b71a
4 changed files with 2 additions and 6 deletions
|
@ -3482,7 +3482,6 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se
|
|||
|
||||
pendingChanges.resetItem(WorldBoxRenderData::_item, worldBoxRenderPayload);
|
||||
} else {
|
||||
|
||||
pendingChanges.updateItem<WorldBoxRenderData>(WorldBoxRenderData::_item,
|
||||
[](WorldBoxRenderData& payload) {
|
||||
payload._val++;
|
||||
|
|
|
@ -93,7 +93,6 @@ void EntityTreeRenderer::clear() {
|
|||
|
||||
auto scene = _viewState->getMain3DScene();
|
||||
render::PendingChanges pendingChanges;
|
||||
|
||||
foreach(auto entity, _entitiesInScene) {
|
||||
entity->removeFromScene(entity, scene, pendingChanges);
|
||||
}
|
||||
|
|
|
@ -174,7 +174,6 @@ uint32_t toRGBA(uint8_t r, uint8_t g, uint8_t b, uint8_t a) {
|
|||
}
|
||||
|
||||
void RenderableParticleEffectEntityItem::updateRenderItem() {
|
||||
|
||||
if (!_scene) {
|
||||
return;
|
||||
}
|
||||
|
@ -212,8 +211,7 @@ void RenderableParticleEffectEntityItem::updateRenderItem() {
|
|||
}
|
||||
|
||||
render::PendingChanges pendingChanges;
|
||||
pendingChanges.updateItem<ParticlePayload>(_renderItemId, [&](ParticlePayload& payload) {
|
||||
|
||||
pendingChanges.updateItem<ParticlePayload>(_renderItemId, [this](ParticlePayload& payload) {
|
||||
// update vertex buffer
|
||||
auto vertexBuffer = payload.getVertexBuffer();
|
||||
size_t numBytes = sizeof(Vertex) * _vertices.size();
|
||||
|
|
|
@ -184,8 +184,8 @@ void Scene::processPendingChangesQueue() {
|
|||
// Now we know for sure that we have enough items in the array to
|
||||
// capture anything coming from the pendingChanges
|
||||
resetItems(consolidatedPendingChanges._resetItems, consolidatedPendingChanges._resetPayloads);
|
||||
removeItems(consolidatedPendingChanges._removedItems);
|
||||
updateItems(consolidatedPendingChanges._updatedItems, consolidatedPendingChanges._updateFunctors);
|
||||
removeItems(consolidatedPendingChanges._removedItems);
|
||||
|
||||
// ready to go back to rendering activities
|
||||
_itemsMutex.unlock();
|
||||
|
|
Loading…
Reference in a new issue