Skip to main content

MeshRenderer.ixx File

Included Headers

Namespaces Index

namespacehelios
namespacerendering

Graphics rendering infrastructure. More...

namespacemesh

Mesh rendering abstractions and command types. More...

Classes Index

classMeshRenderer

Abstract base class for mesh rendering operations. More...

File Listing

The file content with the documentation metadata removed is:

1module;
2
3export module helios.rendering.mesh.MeshRenderer;
4
5import helios.rendering.mesh.MeshRenderCommand;
6
7
8import helios.rendering.shader.UniformValueMap;
9
10export namespace helios::rendering::mesh {
11
12
13 /**
14 * @brief Abstract base class for mesh rendering operations.
15 *
16 * MeshRenderer defines the interface for rendering mesh geometry using a specific
17 * graphics API. Implementations of this class are responsible for translating
18 * abstract render commands into API-specific draw calls.
19 *
20 * This class follows the Strategy pattern, allowing the rendering backend to be
21 * swapped without affecting higher-level rendering logic.
22 *
23 * Example usage:
24 * ```cpp
25 * // Typically used polymorphically through a concrete implementation
26 * std::unique_ptr<MeshRenderer> renderer = std::make_unique<OpenGLMeshRenderer>();
27 * renderer->render(command, frameUniforms);
28 * ```
29 *
30 * @see helios::ext::opengl::rendering::OpenGLMeshRenderer
31 */
33 public:
34
35 /**
36 * @brief Virtual destructor for proper cleanup in derived classes.
37 */
38 virtual ~MeshRenderer() = default;
39
40
41 /**
42 * @brief Renders a mesh using the provided render command and frame-level uniforms.
43 *
44 * Implementations should apply the shader, bind the mesh geometry, set uniform values,
45 * and issue the appropriate draw call for the target graphics API.
46 *
47 * @param command The render command containing mesh, material, and per-object uniform data.
48 * @param frameUniformValues Frame-level uniform values (e.g., view/projection matrices).
49 */
50 virtual void render(
52 const helios::rendering::shader::UniformValueMap& frameUniformValues
53 ) noexcept = 0;
54 };
55}

Generated via doxygen2docusaurus 2.0.0 by Doxygen 1.15.0.