CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
WGDevice.hpp
Go to the documentation of this file.
1//
2// CeresEngine - A game development framework
3//
4// Created by Rogiel Sulzbach.
5// Copyright (c) 2018-2022 Rogiel Sulzbach. All rights reserved.
6//
7
8#pragma once
9
10#include "WebGPU.hpp"
11
13
15
17
18namespace CeresEngine {
19
20 class WGRenderAPI;
21 class WGCommandQueue;
22 class WGImage;
23
24 class WGRenderPass;
25 class WGPipelineLayout;
26 class WGGraphicsPipeline;
27 class WGRenderTarget;
28
29 class WGSwapchain;
30
32 class WGDevice final : public GPUDevice, public WGObject<WGDevice, GPUDevice> {
33 friend class WGCommandQueue;
34
35 public:
37
38 private:
41
42 private:
45
48
51
54
55 private: // Command Queues
58
59 private: // Swapchain
62
65
66 public:
67 explicit WGDevice(WGRenderAPI& renderAPI);
69
72
73 public:
76
79
82
85
88
91
94
97
100
103
106
109
112
115
116 public: // Presentation
119
120 public: // Default Queues
123
126
129
130 public:
133 };
134
135} // namespace CeresEngine
#define CE_EXPLICIT_FALSE
Definition Macros.hpp:416
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUDevice.hpp:357
The thread pool class is an execution context where functions are permitted to run on one of a fixed ...
Definition ThreadPool.hpp:40
WebGPU RenderAPI command queue object.
Definition WGCommandQueue.hpp:23
WebGPU RenderAPI device object.
Definition WGDevice.hpp:32
WGCommandQueuePtr mCommandQueue
The WebGPU graphics queue.
Definition WGDevice.hpp:57
WGDevice(WGRenderAPI &renderAPI)
WGRenderAPI & getRenderAPI()
Definition WGDevice.hpp:132
const GPURenderTargetPtr & getNextRenderTarget() const
Definition WGDevice.hpp:117
GPURenderPassPtr createRenderPass(const GPURenderPassDescriptor &descriptor) final
ThreadPool wGransferExecutor
The executor used to run the transfer operations on.
Definition WGDevice.hpp:47
GPURenderPassPtr mDefaultRenderPass
The default render pass.
Definition WGDevice.hpp:61
GPUCommandQueuePtr getTransferQueue() final
GPUComputePipelinePtr createComputePipeline(const GPUComputePipelineDescriptor &descriptor) final
GPUShaderProgramPtr createShaderProgram(const GPUShaderProgramDescriptor &descriptor) final
GPUSamplerPtr createSampler(const GPUSamplerDescriptor &descriptor) final
WGRenderAPI & mRenderAPI
The owning WGRenderAPI instance.
Definition WGDevice.hpp:44
GPUDeviceInfo mInformation
The The device information structure.
Definition WGDevice.hpp:50
GPUImagePtr createImage(const GPUImageDescriptor &descriptor) final
GPUCommandQueuePtr getComputeQueue() final
GPUGraphicsPipelinePtr createGraphicsPipeline(const GPUGraphicsPipelineDescriptor &descriptor) final
GPUShaderPtr createShader(const GPUShaderDescriptor &descriptor) final
GPUBufferPtr createBuffer(const GPUBufferDescriptor &descriptor) final
GPURenderingCapabilities mCapabilities
Definition WGDevice.hpp:53
GPURenderTargetPtr createRenderTarget(const GPURenderTargetDescriptor &descriptor) final
WGLDeviceType mDevice
The WebGPU API device object.
Definition WGDevice.hpp:40
const GPURenderPassPtr & getDefaultRenderPass() const
Definition WGDevice.hpp:118
GPUCommandBufferPtr createCommandBuffer(const GPUCommandBufferDescriptor &descriptor) final
GPUSwapchainPtr createSwapchain(const GPUSwapchainDescriptor &descriptor) final
GPUFencePtr createFence(const GPUFenceDescriptor &descriptor) final
GPUCommandQueuePtr getGraphicsQueue() final
GPURenderTargetPtr mDefaultRenderTarget
The default render target object.
Definition WGDevice.hpp:64
GPUPipelineLayoutPtr createPipelineLayout(const GPUPipelineLayoutDescriptor &descriptor) final
GPUTimerQueryPtr createTimerQuery(const GPUTimerQueryDescriptor &descriptor) final
CE_WG_HANDLE(WGLDevice) WGLDeviceType
Definition WGDevice.hpp:36
Definition WebGPU.hpp:34
Definition WGRenderAPI.hpp:20
Definition Application.hpp:19
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25
Hardware buffer descriptor structure.
Definition GPUBuffer.hpp:92
Command buffer descriptor structure.
Definition GPUCommandBuffer.hpp:32
Compute pipeline descriptor structure.
Definition GPUComputePipeline.hpp:25
Renderer basic information structure.
Definition GPUDevice.hpp:330
Definition GPUFence.hpp:23
Definition GPUGraphicsPipeline.hpp:721
Definition GPUImage.hpp:247
Pipeline layout descriptor structure.
Definition GPUPipelineLayout.hpp:70
Render pass descriptor structure.
Definition GPURenderPass.hpp:112
Definition GPURenderTarget.hpp:78
Structure with all attributes describing the rendering capabilities of the render system.
Definition GPUDevice.hpp:269
Image sampler descriptor structure.
Definition GPUSampler.hpp:61
Shader source and binary code descriptor structure.
Definition GPUShader.hpp:193
Descriptor structure for shader programs.
Definition GPUShader.hpp:303
Swapchain descriptor structure.
Definition GPUSwapchain.hpp:50
A descriptor structure for TimerQuery.
Definition GPUQuery.hpp:29