VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
graphicsDeviceCreate.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: Apache-2.0
2
// Copyright 2025-2026 Arnis Lektauers
3
//
4
// Created by Arnis Lektauers on 05.09.2025.
5
//
6
#pragma once
7
8
#include <memory>
9
10
#include "
graphicsDevice.h
"
11
#include "SDL3/SDL_video.h"
12
13
namespace
visutwin::canvas
14
{
15
enum class
Backend
16
{
17
Metal
,
18
Vulkan
,
19
WebGPU
20
};
21
22
struct
GraphicsDeviceOptions
23
{
24
Backend
backend
{
Backend::Metal
};
25
26
void
*
swapChain
{
nullptr
};
27
28
SDL_Window*
window
{
nullptr
};
29
};
30
31
std::unique_ptr<GraphicsDevice>
createGraphicsDevice
(
const
GraphicsDeviceOptions& options);
32
}
graphicsDevice.h
visutwin::canvas
Definition
eventHandler.cpp:9
visutwin::canvas::Backend
Backend
Definition
graphicsDeviceCreate.h:16
visutwin::canvas::Backend::Vulkan
@ Vulkan
Definition
graphicsDeviceCreate.h:18
visutwin::canvas::Backend::WebGPU
@ WebGPU
Definition
graphicsDeviceCreate.h:19
visutwin::canvas::Backend::Metal
@ Metal
Definition
graphicsDeviceCreate.h:17
visutwin::canvas::createGraphicsDevice
std::unique_ptr< GraphicsDevice > createGraphicsDevice(const GraphicsDeviceOptions &options)
Definition
graphicsDeviceCreate.cpp:20
visutwin::canvas::GraphicsDeviceOptions
Definition
graphicsDeviceCreate.h:23
visutwin::canvas::GraphicsDeviceOptions::swapChain
void * swapChain
Definition
graphicsDeviceCreate.h:26
visutwin::canvas::GraphicsDeviceOptions::backend
Backend backend
Definition
graphicsDeviceCreate.h:24
visutwin::canvas::GraphicsDeviceOptions::window
SDL_Window * window
Definition
graphicsDeviceCreate.h:28
platform
graphics
graphicsDeviceCreate.h
Generated by
1.16.1