When implemented for a rendering engine, allows renderer resources to be created and destroyed under the control of a Tileset.
More...
#include <Cesium3DTilesSelection/IPrepareRendererResources.h>
|
virtual CesiumAsync::Future< TileLoadResultAndRenderResources > | prepareInLoadThread (const CesiumAsync::AsyncSystem &asyncSystem, TileLoadResult &&tileLoadResult, const glm::dmat4 &transform, const std::any &rendererOptions)=0 |
| Prepares renderer resources for the given tile. This method is invoked in the load thread. More...
|
|
virtual void * | prepareInMainThread (Tile &tile, void *pLoadThreadResult)=0 |
| Further prepares renderer resources. More...
|
|
virtual void | free (Tile &tile, void *pLoadThreadResult, void *pMainThreadResult) noexcept=0 |
| Frees previously-prepared renderer resources. More...
|
|
virtual void | attachRasterInMainThread (const Tile &tile, int32_t overlayTextureCoordinateID, const CesiumRasterOverlays::RasterOverlayTile &rasterTile, void *pMainThreadRendererResources, const glm::dvec2 &translation, const glm::dvec2 &scale)=0 |
| Attaches a raster overlay tile to a geometry tile. More...
|
|
virtual void | detachRasterInMainThread (const Tile &tile, int32_t overlayTextureCoordinateID, const CesiumRasterOverlays::RasterOverlayTile &rasterTile, void *pMainThreadRendererResources) noexcept=0 |
| Detaches a raster overlay tile from a geometry tile. More...
|
|
virtual void * | prepareRasterInLoadThread (CesiumGltf::ImageAsset &image, const std::any &rendererOptions)=0 |
| Prepares a raster overlay tile. More...
|
|
virtual void * | prepareRasterInMainThread (RasterOverlayTile &rasterTile, void *pLoadThreadResult)=0 |
| Further preprares a raster overlay tile. More...
|
|
virtual void | freeRaster (const RasterOverlayTile &rasterTile, void *pLoadThreadResult, void *pMainThreadResult) noexcept=0 |
| Frees previously-prepared renderer resources for a raster tile. More...
|
|
When implemented for a rendering engine, allows renderer resources to be created and destroyed under the control of a Tileset.
It is not supposed to be used directly by clients. It is implemented for specific rendering engines to provide an infrastructure for preparing the data of a Tile so that it can be used for rendering.
Instances of this class are associated with a Tileset, in the TilesetExternals structure that can be obtained via Tileset::getExternals.
Definition at line 51 of file IPrepareRendererResources.h.
◆ attachRasterInMainThread()
virtual void Cesium3DTilesSelection::IPrepareRendererResources::attachRasterInMainThread |
( |
const Tile & |
tile, |
|
|
int32_t |
overlayTextureCoordinateID, |
|
|
const CesiumRasterOverlays::RasterOverlayTile & |
rasterTile, |
|
|
void * |
pMainThreadRendererResources, |
|
|
const glm::dvec2 & |
translation, |
|
|
const glm::dvec2 & |
scale |
|
) |
| |
|
pure virtual |
Attaches a raster overlay tile to a geometry tile.
- Parameters
-
tile | The geometry tile. |
overlayTextureCoordinateID | The ID of the overlay texture coordinate set to use. |
rasterTile | The raster overlay tile to add. The raster tile will have been previously prepared with a call to prepareRasterInLoadThread followed by prepareRasterInMainThread. |
pMainThreadRendererResources | The renderer resources for this raster tile, as created and returned by prepareRasterInMainThread. |
translation | The translation to apply to the texture coordinates identified by overlayTextureCoordinateID . The texture coordinates to use to sample the raster image are computed as overlayTextureCoordinates * scale + translation . |
scale | The scale to apply to the texture coordinates identified by overlayTextureCoordinateID . The texture coordinates to use to sample the raster image are computed as overlayTextureCoordinates * scale + translation . |
◆ detachRasterInMainThread()
virtual void Cesium3DTilesSelection::IPrepareRendererResources::detachRasterInMainThread |
( |
const Tile & |
tile, |
|
|
int32_t |
overlayTextureCoordinateID, |
|
|
const CesiumRasterOverlays::RasterOverlayTile & |
rasterTile, |
|
|
void * |
pMainThreadRendererResources |
|
) |
| |
|
pure virtualnoexcept |
Detaches a raster overlay tile from a geometry tile.
- Parameters
-
tile | The geometry tile. |
overlayTextureCoordinateID | The ID of the overlay texture coordinate set to which the raster tile was previously attached. |
rasterTile | The raster overlay tile to remove. |
pMainThreadRendererResources | The renderer resources for this raster tile, as created and returned by prepareRasterInMainThread. |
◆ free()
virtual void Cesium3DTilesSelection::IPrepareRendererResources::free |
( |
Tile & |
tile, |
|
|
void * |
pLoadThreadResult, |
|
|
void * |
pMainThreadResult |
|
) |
| |
|
pure virtualnoexcept |
Frees previously-prepared renderer resources.
This method is always called from the thread that called Tileset::updateView or deleted the tileset.
- Parameters
-
◆ prepareInLoadThread()
Prepares renderer resources for the given tile. This method is invoked in the load thread.
- Parameters
-
asyncSystem | The AsyncSystem used to do work in threads. |
tileLoadResult | The tile data loaded so far. |
transform | The tile's transformation. |
rendererOptions | Renderer options associated with the tile from TilesetOptions::rendererOptions. |
- Returns
- A future that resolves to the loaded tile data along with arbitrary "render resources" data representing the result of the load process. The loaded data may be the same as was originally given to this method, or it may be modified. The render resources are passed to prepareInMainThread as the
pLoadThreadResult
parameter.
◆ prepareInMainThread()
virtual void* Cesium3DTilesSelection::IPrepareRendererResources::prepareInMainThread |
( |
Tile & |
tile, |
|
|
void * |
pLoadThreadResult |
|
) |
| |
|
pure virtual |
Further prepares renderer resources.
This is called after prepareInLoadThread, and unlike that method, this one is called from the same thread that called Tileset::updateView.
- Parameters
-
- Returns
- Arbitrary data representing the result of the load process. Note that the value returned by prepareInLoadThread will not be automatically preserved and passed to free. If you need to free that value, do it in this method before returning. If you need that value later, add it to the object returned from this method.
The documentation for this class was generated from the following file: