[core] custom layer - add contextLost callback
- optional callback method that can be used to do cleanup when the context has been lost before re-initialisation
This commit is contained in:
committed by
Ivo van Dongen
parent
b0c06c764b
commit
97a010cc9b
@@ -6,12 +6,14 @@ namespace style {
|
||||
CustomLayer::Impl::Impl(const std::string& id_,
|
||||
CustomLayerInitializeFunction initializeFn_,
|
||||
CustomLayerRenderFunction renderFn_,
|
||||
CustomLayerContextLostFunction contextLostFn_,
|
||||
CustomLayerDeinitializeFunction deinitializeFn_,
|
||||
void* context_)
|
||||
: Layer::Impl(LayerType::Custom, id_, std::string()) {
|
||||
initializeFn = initializeFn_;
|
||||
renderFn = renderFn_;
|
||||
deinitializeFn = deinitializeFn_;
|
||||
contextLostFn = contextLostFn_;
|
||||
context = context_;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user