Cogs.Core
GPGPUQuadRenderer.h
1#pragma once
2
3#include "Rendering/IContext.h"
4#include "Rendering/VertexFormat.h"
5
6namespace Cogs
7{
8 class IGraphicsDevice;
9
11 {
12 public:
13 void initialize(IGraphicsDevice* device);
14
15 void bind(IContext* context);
16
17 void draw(IContext* context) { context->draw(PrimitiveType::TriangleList, 0, 6); }
18
19 VertexFormatHandle vertexFormat() { return format; }
20
21 private:
22 VertexFormatHandle format;
23 VertexBufferHandle quadVertexBuffer;
24 SamplerStateHandle pointSampleState;
25 BlendStateHandle solidBlendState;
26 DepthStencilStateHandle solidDepthStencilState;
27 RasterizerStateHandle solidRasterizerState;
28 };
29}
Represents a graphics device used to manage graphics resources and issue drawing commands.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
@ TriangleList
List of triangles.
Represents a graphics device context which can receive rendering commands.
Definition: IContext.h:43
virtual void draw(PrimitiveType primitiveType, const size_t startVertex, const size_t numVertexes)=0
Draws non-indexed, non-instanced primitives.