A texture of the renderer for flat pictures and text.
More...
#include <scenerenderer.h>
A texture of the renderer for flat pictures and text.
◆ ~RenderTexture()
| coastline::RenderTexture::~RenderTexture |
( |
| ) |
|
Release the texture, sampler, and upload storage before GPU device destruction.
◆ RenderTexture()
| coastline::RenderTexture::RenderTexture |
( |
const RenderTexture & | | ) |
|
|
delete |
Prevent copying texture allocation and upload resources.
◆ Load()
Read a PNG image.
- Parameters
-
| renderer | The renderer that draws with the texture. |
| path | The image. |
| linear | Whether the texture filters linearly, or takes the nearest texel. |
| repeat | Whether the texture repeats past its edges, or clamps to them. |
- Returns
- The texture, or nothing with the reason logged.
◆ FromTexels()
Upload texels the game has in memory, such as a texture of the race built into the engine.
- Parameters
-
| renderer | The renderer that draws with the texture. |
| width | The width in texels. |
| height | The height in texels. |
| rgba | The texels as 8-bit RGBA, row by row from the top. |
| linear | Whether the texture filters linearly, or takes the nearest texel. |
| repeat | Whether the texture repeats past its edges, or clamps to them. |
- Returns
- The texture, or nothing when the upload failed.
◆ operator=()
Prevent assignment of texture allocation and upload resources.
◆ Width()
| int coastline::RenderTexture::Width |
( |
| ) |
const |
- Returns
- The width in texels.
◆ Height()
| int coastline::RenderTexture::Height |
( |
| ) |
const |
- Returns
- The height in texels.
◆ Update()
Replace the texels in place, through an upload the texture keeps.
A frame that still draws the old texels keeps them.
- Parameters
-
| rgba | The texels as 8-bit RGBA, row by row from the top, the size of the texture. |
- Returns
- Whether the upload was submitted.
◆ SceneRenderer
| friend class SceneRenderer |
|
friend |
The documentation for this class was generated from the following file: