addressing review and warnings

This commit is contained in:
samcake 2018-02-21 11:18:41 -08:00
parent 33b47f9ae2
commit 1c3bc0aa67
2 changed files with 7 additions and 4 deletions

View file

@ -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);

View file

@ -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;