CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
MTDevice.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 "Metal.hpp"
11
13
15
17
18namespace CeresEngine {
19
20 class MTRenderAPI;
21 class MTCommandQueue;
22 class MTImage;
23
24 class MTRenderPass;
25 class MTPipelineLayout;
26 class MTGraphicsPipeline;
27 class MTRenderTarget;
28
29 class MTSwapchain;
30
32 class MTDevice final : public GPUDevice, public MTObject<MTDevice, GPUDevice> {
33 friend class MTCommandQueue;
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 MTDevice(MTRenderAPI& renderAPI);
69
72
73 public:
76
79
82
85
88
91
94
97
100
103
106
109
112
115
118
119 public: // Presentation
122
123 public: // Default Queues
126
129
132
133 public:
136 };
137
138} // namespace CeresEngine
#define CE_EXPLICIT_FALSE
Definition Macros.hpp:416
#define CE_MT_HANDLE(T)
Definition Metal.hpp:20
A retain-release type of smart pointer.
Definition SmartPtr.hpp:132
Definition GPUDevice.hpp:357
Metal RenderAPI command queue object.
Definition MTCommandQueue.hpp:23
Metal RenderAPI device object.
Definition MTDevice.hpp:32
GPUBufferPtr createBuffer(const GPUBufferDescriptor &descriptor) final
GPUCommandQueuePtr getGraphicsQueue() final
const GPURenderPassPtr & getDefaultRenderPass() const
Definition MTDevice.hpp:121
GPURenderTargetPtr createRenderTarget(const GPURenderTargetDescriptor &descriptor) final
GPUSamplerPtr createSampler(const GPUSamplerDescriptor &descriptor) final
GPUOcclusionQueryPtr createOcclusionQuery(const GPUOcclusionQueryDescriptor &descriptor) final
GPUCommandQueuePtr getComputeQueue() final
GPUGraphicsPipelinePtr createGraphicsPipeline(const GPUGraphicsPipelineDescriptor &descriptor) final
GPURenderTargetPtr mDefaultRenderTarget
The default render target object.
Definition MTDevice.hpp:64
GPUPipelineLayoutPtr createPipelineLayout(const GPUPipelineLayoutDescriptor &descriptor) final
const GPURenderTargetPtr & getNextRenderTarget() const
Definition MTDevice.hpp:120
GPURenderingCapabilities mCapabilities
Definition MTDevice.hpp:53
GPURenderPassPtr mDefaultRenderPass
The default render pass.
Definition MTDevice.hpp:61
ThreadPool mTransferExecutor
The executor used to run the transfer operations on.
Definition MTDevice.hpp:47
GPUImagePtr createImage(const GPUImageDescriptor &descriptor) final
void * MTLDeviceType
Definition MTDevice.hpp:36
GPUCommandBufferPtr createCommandBuffer(const GPUCommandBufferDescriptor &descriptor) final
GPUShaderPtr createShader(const GPUShaderDescriptor &descriptor) final
MTDevice(MTRenderAPI &renderAPI)
GPURenderPassPtr createRenderPass(const GPURenderPassDescriptor &descriptor) final
MTRenderAPI & mRenderAPI
The owning MTRenderAPI instance.
Definition MTDevice.hpp:44
GPUComputePipelinePtr createComputePipeline(const GPUComputePipelineDescriptor &descriptor) final
GPUTimerQueryPtr createTimerQuery(const GPUTimerQueryDescriptor &descriptor) final
GPUSwapchainPtr createSwapchain(const GPUSwapchainDescriptor &descriptor) final
GPUShaderProgramPtr createShaderProgram(const GPUShaderProgramDescriptor &descriptor) final
GPUCommandQueuePtr getTransferQueue() final
MTLDeviceType mDevice
The Metal API device object.
Definition MTDevice.hpp:40
GPUFencePtr createFence(const GPUFenceDescriptor &descriptor) final
MTCommandQueuePtr mCommandQueue
The Metal graphics queue.
Definition MTDevice.hpp:57
GPUDeviceInfo mInformation
The The device information structure.
Definition MTDevice.hpp:50
MTRenderAPI & getRenderAPI()
Definition MTDevice.hpp:135
Definition Metal.hpp:39
Definition MTRenderAPI.hpp:20
The thread pool class is an execution context where functions are permitted to run on one of a fixed ...
Definition ThreadPool.hpp:40
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
Definition GPUQuery.hpp:171
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