|
1 | | -// Copyright 2015-2024 the openage authors. See copying.md for legal info. |
| 1 | +// Copyright 2015-2025 the openage authors. See copying.md for legal info. |
2 | 2 |
|
3 | 3 | #pragma once |
4 | 4 |
|
|
8 | 8 | namespace openage { |
9 | 9 | namespace renderer { |
10 | 10 |
|
11 | | -/// An abstract base for a handle to a texture buffer allocated in graphics hardware. |
12 | | -/// Can be obtained by passing texture data to the renderer. |
| 11 | +/** |
| 12 | + * An abstract base for a handle to a texture buffer allocated in graphics hardware. |
| 13 | + * Can be obtained by passing texture data to the renderer. |
| 14 | + */ |
13 | 15 | class Texture2d { |
14 | 16 | public: |
15 | 17 | virtual ~Texture2d(); |
16 | 18 |
|
17 | | - /// Returns the texture information. |
| 19 | + /** |
| 20 | + * Get the texture information. |
| 21 | + * |
| 22 | + * @return Information about the texture, such as size and format. |
| 23 | + */ |
18 | 24 | const resources::Texture2dInfo &get_info() const; |
19 | 25 |
|
20 | | - /// Copies this texture's data from graphics hardware into a CPU-accessible |
21 | | - /// Texture2dData buffer. |
| 26 | + /** |
| 27 | + * Copies this texture's data from graphics hardware into a CPU-accessible |
| 28 | + * Texture2dData buffer. |
| 29 | + * |
| 30 | + * @return A Texture2dData object containing the texture data. |
| 31 | + */ |
22 | 32 | virtual resources::Texture2dData into_data() = 0; |
23 | 33 |
|
24 | | - /// Uploads the provided data into the GPU texture storage. The format has |
25 | | - /// to match the format this Texture was originally created with. |
| 34 | + /** |
| 35 | + * Uploads the provided data into the GPU texture storage. The format has |
| 36 | + * to match the format this Texture was originally created with. |
| 37 | + * |
| 38 | + * @param data The texture data to upload. |
| 39 | + */ |
26 | 40 | virtual void upload(resources::Texture2dData const &) = 0; |
27 | 41 |
|
28 | 42 | protected: |
29 | | - /// Constructs the base with the given information. |
| 43 | + /** |
| 44 | + * Constructs the base with the given information. |
| 45 | + * |
| 46 | + * @param info Information about the texture, such as size and format. |
| 47 | + */ |
30 | 48 | Texture2d(const resources::Texture2dInfo &); |
31 | 49 |
|
32 | | - /// Information about the size, format, etc. of this texture. |
| 50 | + /** |
| 51 | + * Information about the size, format, etc. of this texture. |
| 52 | + */ |
33 | 53 | resources::Texture2dInfo info; |
34 | 54 | }; |
35 | 55 |
|
|
0 commit comments