mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:01:06 +02:00
Remove DrawBackround task
This commit is contained in:
parent
1a3a9be605
commit
74c4930034
2 changed files with 0 additions and 43 deletions
|
@ -264,40 +264,6 @@ void DrawLight::run(const SceneContextPointer& sceneContext, const RenderContext
|
||||||
args->_batch = nullptr;
|
args->_batch = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
void DrawBackground::run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext) {
|
|
||||||
assert(renderContext->getArgs());
|
|
||||||
assert(renderContext->getArgs()->_viewFrustum);
|
|
||||||
|
|
||||||
// render backgrounds
|
|
||||||
auto& scene = sceneContext->_scene;
|
|
||||||
auto& items = scene->getMasterBucket().at(ItemFilter::Builder::background());
|
|
||||||
|
|
||||||
|
|
||||||
ItemIDsBounds inItems;
|
|
||||||
inItems.reserve(items.size());
|
|
||||||
for (auto id : items) {
|
|
||||||
inItems.emplace_back(id);
|
|
||||||
}
|
|
||||||
RenderArgs* args = renderContext->getArgs();
|
|
||||||
doInBatch(args->_context, [=](gpu::Batch& batch) {
|
|
||||||
args->_batch = &batch;
|
|
||||||
batch.enableSkybox(true);
|
|
||||||
batch.setViewportTransform(args->_viewport);
|
|
||||||
batch.setStateScissorRect(args->_viewport);
|
|
||||||
|
|
||||||
glm::mat4 projMat;
|
|
||||||
Transform viewMat;
|
|
||||||
args->_viewFrustum->evalProjectionMatrix(projMat);
|
|
||||||
args->_viewFrustum->evalViewTransform(viewMat);
|
|
||||||
|
|
||||||
batch.setProjectionTransform(projMat);
|
|
||||||
batch.setViewTransform(viewMat);
|
|
||||||
|
|
||||||
renderItems(sceneContext, renderContext, inItems);
|
|
||||||
});
|
|
||||||
args->_batch = nullptr;
|
|
||||||
}
|
|
||||||
|
|
||||||
void ItemMaterialBucketMap::insert(const ItemID& id, const model::MaterialKey& key) {
|
void ItemMaterialBucketMap::insert(const ItemID& id, const model::MaterialKey& key) {
|
||||||
// Insert the itemID in every bucket where it filters true
|
// Insert the itemID in every bucket where it filters true
|
||||||
for (auto& bucket : (*this)) {
|
for (auto& bucket : (*this)) {
|
||||||
|
|
|
@ -275,15 +275,6 @@ public:
|
||||||
typedef Job::Model<DrawLight> JobModel;
|
typedef Job::Model<DrawLight> JobModel;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DrawBackground {
|
|
||||||
public:
|
|
||||||
void run(const SceneContextPointer& sceneContext, const RenderContextPointer& renderContext);
|
|
||||||
|
|
||||||
|
|
||||||
typedef Job::Model<DrawBackground> JobModel;
|
|
||||||
};
|
|
||||||
|
|
||||||
|
|
||||||
class DrawSceneTask : public Task {
|
class DrawSceneTask : public Task {
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue