Skip to main content

IsRenderBackendLike.ixx File

Concept constraining render backend interfaces. More...

Included Headers

Namespaces Index

namespacehelios
namespaceengine
namespacerendering
namespacecommon
namespaceconcepts

Description

Concept constraining render backend interfaces.

File Listing

The file content with the documentation metadata removed is:

1
5module;
6
7#include <concepts>
8#include <span>
9
10export module helios.engine.rendering.common.concepts.IsRenderBackendLike;
11
12import helios.math.types;
13
14import helios.engine.rendering.common.types.RenderPassContext;
15import helios.engine.util.Colors;
16
17import helios.engine.scene.types.SceneMemberRenderContext;
18
19import helios.engine.rendering.renderTarget.types;
20import helios.engine.rendering.viewport.types;
21import helios.engine.rendering.shader.types;
22import helios.engine.rendering.material.types;
23import helios.engine.rendering.mesh.types;
24
25using namespace helios::math;
29using namespace helios::engine::scene::types;
30
36
37export namespace helios::engine::rendering::common::concepts {
38
45 template<typename T, typename THandle>
46 concept IsRenderBackendLike = requires(
47 T& t,
48 const T& ct,
49 const RenderTargetHandle renderTargetHandle,
50 const ViewportHandle viewportHandle,
51 const ShaderHandle shaderHandle,
52 const MaterialHandle materialHandle,
53 const MeshHandle meshHandle,
54 std::span<SceneMemberRenderContext<THandle>> sceneMemberRenderContexts
55 )
56 {
57 {t.beginRenderTargetBatch(renderTargetHandle)}->std::same_as<void>;
58 {t.endRenderTargetBatch(renderTargetHandle)}->std::same_as<void>;
59 {t.beginViewportBatch(viewportHandle)}->std::same_as<void>;
60 {t.endViewportBatch(viewportHandle)}->std::same_as<void>;
61 {t.beginShaderBatch(shaderHandle)}->std::same_as<void>;
62 {t.endShaderBatch(shaderHandle)}->std::same_as<void>;
63 {t.beginMaterialBatch(materialHandle)}->std::same_as<void>;
64 {t.endMaterialBatch(materialHandle)}->std::same_as<void>;
65 {t.beginMeshBatch(meshHandle)}->std::same_as<void>;
66 {t.endMeshBatch(meshHandle)}->std::same_as<void>;
67 {t.renderBatch(sceneMemberRenderContexts)}->std::same_as<void>;
68 };
69
70
71
72
73}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.9.8.