cesium-native 0.43.0
|
An interface between Cesium Native and the application using it, allowing Cesium Native to pass loaded raster overlay data to the implementing application in order for the application to prepare it to be used in its renderer of choice. This could involve creating a texture asset, uploading the texture data to the GPU, or any other similar tasks required. More...
#include <CesiumRasterOverlays/IPrepareRasterOverlayRendererResources.h>
Public Member Functions | |
virtual void * | prepareRasterInLoadThread (CesiumGltf::ImageAsset &image, const std::any &rendererOptions)=0 |
Prepares a raster overlay tile. | |
virtual void * | prepareRasterInMainThread (RasterOverlayTile &rasterTile, void *pLoadThreadResult)=0 |
Further preprares a raster overlay tile. | |
virtual void | freeRaster (const RasterOverlayTile &rasterTile, void *pLoadThreadResult, void *pMainThreadResult) noexcept=0 |
Frees previously-prepared renderer resources for a raster tile. | |
An interface between Cesium Native and the application using it, allowing Cesium Native to pass loaded raster overlay data to the implementing application in order for the application to prepare it to be used in its renderer of choice. This could involve creating a texture asset, uploading the texture data to the GPU, or any other similar tasks required.
Definition at line 24 of file IPrepareRasterOverlayRendererResources.h.
|
pure virtualnoexcept |
Frees previously-prepared renderer resources for a raster tile.
This method is always called from the thread that destroyed the RasterOverlayTile
. When raster overlays are used with tilesets, this is the thread that called Cesium3DTilesSelection::Tileset::updateView
or deleted the tileset.
rasterTile | The tile for which to free renderer resources. |
pLoadThreadResult | The result returned by prepareRasterInLoadThread . If prepareRasterInMainThread has already been called, this parameter will be nullptr . |
pMainThreadResult | The result returned by prepareRasterInMainThread . If prepareRasterInMainThread has not yet been called, this parameter will be nullptr . |
|
pure virtual |
Prepares a raster overlay tile.
This method is invoked in the load thread and may modify the image.
image | The raster tile image to prepare. |
rendererOptions | Renderer options associated with the raster overlay tile from RasterOverlayOptions::rendererOptions . |
prepareRasterInMainThread
as the pLoadThreadResult
parameter.
|
pure virtual |
Further preprares a raster overlay tile.
This is called after prepareRasterInLoadThread
, and unlike that method, this one is called from the same thread that called Cesium3DTilesSelection::Tileset::updateView
.
rasterTile | The raster tile to prepare. |
pLoadThreadResult | The value returned from prepareRasterInLoadThread . |
prepareRasterInLoadThread
will not be automatically preserved and passed to freeRaster
. 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.