mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 03:19:24 +02:00
Make procedural dirty marker atomic
This commit is contained in:
parent
4017bea60f
commit
ff07e47626
2 changed files with 7 additions and 5 deletions
|
@ -62,13 +62,13 @@ QJsonValue Procedural::getProceduralData(const QString& proceduralJson) {
|
||||||
return doc.object()[PROCEDURAL_USER_DATA_KEY];
|
return doc.object()[PROCEDURAL_USER_DATA_KEY];
|
||||||
}
|
}
|
||||||
|
|
||||||
Procedural::Procedural() {
|
Procedural::Procedural() : _state { std::make_shared<gpu::State>() } {
|
||||||
_state = std::make_shared<gpu::State>();
|
_proceduralDataDirty = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Procedural::Procedural(const QString& userDataJson) {
|
Procedural::Procedural(const QString& userDataJson) : Procedural() {
|
||||||
parse(userDataJson);
|
parse(userDataJson);
|
||||||
_state = std::make_shared<gpu::State>();
|
_proceduralDataDirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Procedural::parse(const QString& userDataJson) {
|
void Procedural::parse(const QString& userDataJson) {
|
||||||
|
|
|
@ -10,6 +10,8 @@
|
||||||
#ifndef hifi_RenderableProcedrualItem_h
|
#ifndef hifi_RenderableProcedrualItem_h
|
||||||
#define hifi_RenderableProcedrualItem_h
|
#define hifi_RenderableProcedrualItem_h
|
||||||
|
|
||||||
|
#include <atomic>
|
||||||
|
|
||||||
#include <QtCore/qglobal.h>
|
#include <QtCore/qglobal.h>
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
#include <QtCore/QUrl>
|
#include <QtCore/QUrl>
|
||||||
|
@ -74,7 +76,7 @@ protected:
|
||||||
NetworkShaderPointer _networkShader;
|
NetworkShaderPointer _networkShader;
|
||||||
QJsonObject _parsedUniforms;
|
QJsonObject _parsedUniforms;
|
||||||
QJsonArray _parsedChannels;
|
QJsonArray _parsedChannels;
|
||||||
bool _proceduralDataDirty { true };
|
std::atomic_bool _proceduralDataDirty;
|
||||||
bool _shaderDirty { true };
|
bool _shaderDirty { true };
|
||||||
bool _uniformsDirty { true };
|
bool _uniformsDirty { true };
|
||||||
bool _channelsDirty { true };
|
bool _channelsDirty { true };
|
||||||
|
|
Loading…
Reference in a new issue