mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 10:54:26 +02:00
addressing review and warnings
This commit is contained in:
parent
33b47f9ae2
commit
1c3bc0aa67
2 changed files with 7 additions and 4 deletions
|
@ -9,6 +9,7 @@
|
||||||
//
|
//
|
||||||
#include "GameWorkloadRenderer.h"
|
#include "GameWorkloadRenderer.h"
|
||||||
|
|
||||||
|
#include <cstring>
|
||||||
#include <gpu/Context.h>
|
#include <gpu/Context.h>
|
||||||
|
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ void GameSpaceToRender::run(const workload::WorkloadContextPointer& runContext,
|
||||||
if (!render::Item::isValidID(_spaceRenderItemID)) {
|
if (!render::Item::isValidID(_spaceRenderItemID)) {
|
||||||
_spaceRenderItemID = scene->allocateID();
|
_spaceRenderItemID = scene->allocateID();
|
||||||
auto renderItem = std::make_shared<GameWorkloadRenderItem>();
|
auto renderItem = std::make_shared<GameWorkloadRenderItem>();
|
||||||
renderItem->editBound().expandedContains(glm::vec3(0.0), 32000.0);
|
renderItem->editBound().expandedContains(glm::vec3(0.0f), 32000.0f);
|
||||||
transaction.resetItem(_spaceRenderItemID, std::make_shared<GameWorkloadRenderItem::Payload>(std::make_shared<GameWorkloadRenderItem>()));
|
transaction.resetItem(_spaceRenderItemID, std::make_shared<GameWorkloadRenderItem::Payload>(std::make_shared<GameWorkloadRenderItem>()));
|
||||||
scene->enqueueTransaction(transaction);
|
scene->enqueueTransaction(transaction);
|
||||||
}
|
}
|
||||||
|
@ -41,7 +42,7 @@ void GameSpaceToRender::run(const workload::WorkloadContextPointer& runContext,
|
||||||
|
|
||||||
std::vector<workload::Space::Proxy> proxies(space->getNumAllocatedProxies());
|
std::vector<workload::Space::Proxy> proxies(space->getNumAllocatedProxies());
|
||||||
|
|
||||||
space->copyProxyValues(proxies.data(), proxies.size());
|
space->copyProxyValues(proxies.data(), (uint32_t) proxies.size());
|
||||||
|
|
||||||
transaction.updateItem<GameWorkloadRenderItem>(_spaceRenderItemID, [proxies](GameWorkloadRenderItem& item) {
|
transaction.updateItem<GameWorkloadRenderItem>(_spaceRenderItemID, [proxies](GameWorkloadRenderItem& item) {
|
||||||
item.setAllProxies(proxies);
|
item.setAllProxies(proxies);
|
||||||
|
|
|
@ -47,7 +47,7 @@ namespace workload {
|
||||||
Q_PROPERTY(QString message READ getMessage WRITE setMessage)
|
Q_PROPERTY(QString message READ getMessage WRITE setMessage)
|
||||||
QString _message {"Hello World."};
|
QString _message {"Hello World."};
|
||||||
public:
|
public:
|
||||||
HelloWorldConfig() : Job::Config(true) {}
|
HelloWorldConfig() : Job::Config(true) {}
|
||||||
QString getMessage() const { return _message; }
|
QString getMessage() const { return _message; }
|
||||||
void setMessage(const QString& msg) { _message = msg; }
|
void setMessage(const QString& msg) { _message = msg; }
|
||||||
};
|
};
|
||||||
|
@ -64,9 +64,11 @@ namespace workload {
|
||||||
~Engine() = default;
|
~Engine() = default;
|
||||||
|
|
||||||
// (6) The Engine's Context is passed to its Jobs when they are run()
|
// (6) The Engine's Context is passed to its Jobs when they are run()
|
||||||
void run() { assert(_context); Task::run(_context); }
|
void run() { assert(_context); run(_context); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
// (6) Again, the Engine's Context is passed to its Jobs when they are run()
|
||||||
|
void run(const WorkloadContextPointer& context) override { assert(_context); Task::run(_context); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
WorkloadContextPointer _context;
|
WorkloadContextPointer _context;
|
||||||
|
|
Loading…
Reference in a new issue