Cogs.Core
OctRenderer.h
1#pragma once
2
3#include "Renderer/IRenderer.h"
4#include "Resources/MeshStreamsLayout.h"
5
6#include "Rendering/IGraphicsDevice.h"
7#include "Rendering/VertexFormat.h"
8
9namespace Cogs
10{
11 namespace Core
12 {
13 struct CameraData;
14
15 namespace Volumetric
16 {
17 struct OctData;
18 struct OctComponent;
19
21 {
22 public:
23 void initialize(Context * context, IGraphicsDevice * device) override;
24 void handleEvent(uint32_t eventId, const DrawContext * renderingContext) override;
25 void generateCommands(const RenderTaskContext * renderingContext, RenderList * renderList) override;
26
27 void handleAtlasWipe(const DrawContext * renderingContext, OctComponent& octComp, OctData& octData);
28
29 IGraphicsDevice * device;
30 class Context * context;
31
32 struct OctSystem * octSystem;
33
34 // 0: Pos3f
35 // 1: Instance data
36 MeshStreamsLayout octStreamsLayout;
37
38 // 0: Pos3f
39 MeshStreamsLayout debugStreamsLayout;
40
41 MaterialInstanceHandle defaultMatInstance;
42 SamplerStateHandle atlasSampler;
43 DepthStencilStateHandle depthStencilState;
44
45 VertexBufferHandle cubeVertices;
46 IndexBufferHandle cubeIndices;
47 BufferHandle octParamsBuffer;
48 };
49 }
50 }
51}
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Definition: Context.h:83
Defines an extension to the renderer, capable of doing custom rendering.
Definition: IRenderer.h:123
Represents a graphics device used to manage graphics resources and issue drawing commands.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
void handleEvent(uint32_t eventId, const DrawContext *renderingContext) override
Called when rendering events occur.
void initialize(Context *context, IGraphicsDevice *device) override
Initialize the extension using the given context and device.