Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
i_material_render_resources.hpp
Go to the documentation of this file.
1// This file is part of the Rendering Engine project.
2// Author: Alexander Obzherin <alexanderobzherin@gmail.com>
3// Copyright (c) 2025 Alexander Obzherin
4// Distributed under the terms of the zlib License. See LICENSE.md for details.
5
6#pragma once
7
8#include <string>
9
10namespace rendering_engine
11{
12
13class Material;
14
15/**
16 * @brief Interface for backend-specific material GPU resources.
17 *
18 * This abstract interface allows `Material` instances to delegate the creation and
19 * destruction of rendering resources to the graphics backend.
20 *
21 * Concrete implementations should inherit from this and implement the resource
22 * lifecycle methods.
23 */
25{
26public:
27 virtual ~IMaterialRenderResources() = default;
28
29 /**
30 * @brief Initializes the GPU-side representation of a material.
31 *
32 * Called by the `Material` class after parameters and textures are set.
33 *
34 * @param material Pointer to the owning Material instance.
35 */
36 virtual void Initialize(Material* material) = 0;
37
38 /**
39 * @brief Releases all GPU resources associated with this material.
40 *
41 * Called during cleanup or when the renderer rebuilds resources.
42 */
43 virtual void Shutdown() = 0;
44};
45
46} // namespace rendering_engine
Interface for backend-specific material GPU resources.
virtual void Initialize(Material *material)=0
Initializes the GPU-side representation of a material.
virtual void Shutdown()=0
Releases all GPU resources associated with this material.
Represents a material instance with parameter values, texture bindings, and rendering configuration.
Definition material.hpp:30