Cogs.Core
EditorRenderTask.h
1#pragma once
2
3#include "Renderer/Tasks/RenderTask.h"
4
5#include <glm/vec4.hpp>
6
7namespace Cogs::Core
8{
9 class CameraComponent;
10
11 class ViewContext;
12
15 {
16 public:
17 void init(const ViewContext* viewContext, IGraphicsDevice * device);
18 void apply(RenderTaskContext * renderContext) override;
20
21 private:
22 void renderEntity(RenderTaskContext* renderContext, const EntityId id, glm::vec4 diffuseColor);
23 void renderCamera(RenderTaskContext* renderContext, const CameraComponent& cameraComponent, glm::vec4 diffuseColor);
24
25 private:
26 const ViewContext* viewContext = nullptr;
27
28 Cogs::EffectHandle effectHandle;
29 Cogs::InputLayoutHandle inputLayoutHandle;
30 Cogs::VertexFormatHandle vertexFormat;
32 Cogs::BufferHandle constantBuffer;
33 };
34}
WireFrame Rendering task for Selected entity outline and extra cameras.
Cogs::ResourceStatus checkReady(RenderTaskContext *context) override
Check if the task is ready to be applied, e.g.
Represents a graphics device used to manage graphics resources and issue drawing commands.
Contains the Engine, Renderer, resource managers and other systems needed to run Cogs....
ResourceStatus
Status of an asynchronously loaded resource, such as an effect or a pipeline.
Definition: Common.h:198
@ Pending
The resource is still loading.