Cogs.Core
RenderTargetsVK.h
1#pragma once
2
3#include "../IRenderTargets.h"
4
5#include "CommonVK.h"
6
7namespace Cogs
8{
10 {
11 std::vector<TextureVK *> textures;
12 TextureVK * depthTexture;
13
14 VkRenderPass renderPass;
15 VkFramebuffer framebuffer;
16 };
17
19 {
20 RenderTargetHandle renderTarget;
21 };
22
24 {
25 VkPipelineRasterizationStateCreateInfo state;
26 };
27
29 {
30 VkPipelineDepthStencilStateCreateInfo state;
31 };
32
34 {
35 VkPipelineColorBlendAttachmentState attachmentStates[8];
36
37 VkPipelineColorBlendStateCreateInfo state;
38 };
39
41 {
42 public:
43 void initialize(class GraphicsDeviceVK * device);
44
45 RenderTargetHandle createRenderTarget(const RenderTargetViewDescription * renderTargetViews, const size_t numViews) override;
46
47 void releaseRenderTarget(RenderTargetHandle renderTargetHandle) override;
48
50 DepthStencilHandle createDepthStencilTarget(const RenderTargetHandle handle, const TextureHandle textureHandle) override;
52
53 void releaseDepthStencilTarget(DepthStencilHandle depthStencilHandle) override;
54
55 DepthStencilStateHandle loadDepthStencilState(const DepthStencilState & depthStencilState) override;
56
58
59 RasterizerStateHandle loadRasterizerState(const RasterizerState & rasterizerState) override;
60
62
63 BlendStateHandle loadBlendState(const BlendState & blendState) override;
64
65 void releaseBlendState(BlendStateHandle handle) override;
66
67 void releaseResources() override;
68
71
75
76 class GraphicsDeviceVK * graphicsDevice;
77 };
78}
void releaseBlendState(BlendStateHandle handle) override
Release the blend state with the given handle.
void releaseRenderTarget(RenderTargetHandle renderTargetHandle) override
Release the render target with the given renderTargetHandle.
DepthStencilStateHandle loadDepthStencilState(const DepthStencilState &depthStencilState) override
Load a depth stencil state object.
BlendStateHandle loadBlendState(const BlendState &blendState) override
Load a blend state object.
void releaseResources() override
Release all allocated render target resources.
void releaseDepthStencilState(DepthStencilStateHandle handle) override
Release the depth stencil state with the given handle.
void releaseRasterizerState(RasterizerStateHandle handle) override
Release the rasterizer state with the given handle.
RasterizerStateHandle loadRasterizerState(const RasterizerState &rasterizerState) override
Load a rasterizer state object.
void releaseDepthStencilTarget(DepthStencilHandle depthStencilHandle) override
Release the depth target with the given depthStencilHandle.
RenderTargetHandle createRenderTarget(const RenderTargetViewDescription *renderTargetViews, const size_t numViews) override
Create a render target using the given view descriptions.
DepthStencilHandle createDepthStencilTarget(const RenderTargetHandle handle) override
Creates a depth/stencil target to back the render target with the given handle.
Contains all Cogs related functionality.
Definition: FieldSetter.h:23
Encapsulates blend state for the graphics pipeline in a state object.
Definition: BlendState.h:9
Encapsulates state for depth buffer usage and stencil buffer usage in a state object.
Describes a single depth stencil view and which resources to use from the underlying texture.
Provides render target management functionality.
Encapsulates state for primitive rasterization in a state object.
Describes a single render target view and which resources to use from the underlying texture.