VisuTwin Canvas
C++ 3D Engine — Metal Backend
Loading...
Searching...
No Matches
visutwin::canvas::DeviceCache Class Reference

#include <platform/graphics/deviceCache.h>

Public Member Functions

template<class T>
std::shared_ptr< T > get (const std::shared_ptr< GraphicsDevice > &device, std::function< std::shared_ptr< T >()> onCreate)
void remove (const std::shared_ptr< GraphicsDevice > &_graphicsDevice)

Detailed Description

A cache storing shared resources associated with a device. The resources are removed from the cache when the device is destroyed.

Definition at line 19 of file deviceCache.h.

Member Function Documentation

◆ get()

template<typename T>
std::shared_ptr< T > visutwin::canvas::DeviceCache::get ( const std::shared_ptr< GraphicsDevice > & device,
std::function< std::shared_ptr< T >()> onCreate )

Definition at line 35 of file deviceCache.h.

References remove().

◆ remove()

void visutwin::canvas::DeviceCache::remove ( const std::shared_ptr< GraphicsDevice > & _graphicsDevice)

Definition at line 10 of file deviceCache.cpp.

Referenced by get().


The documentation for this class was generated from the following files: