[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
@@ -8,9 +8,18 @@ namespace style {
|
||||
CustomLayer::CustomLayer(const std::string& layerID,
|
||||
CustomLayerInitializeFunction init,
|
||||
CustomLayerRenderFunction render,
|
||||
CustomLayerContextLostFunction contextLost,
|
||||
CustomLayerDeinitializeFunction deinit,
|
||||
void* context)
|
||||
: Layer(makeMutable<Impl>(layerID, init, render, deinit, context)) {
|
||||
: Layer(makeMutable<Impl>(layerID, init, render, contextLost, deinit, context)) {
|
||||
}
|
||||
|
||||
CustomLayer::CustomLayer(const std::string& layerID,
|
||||
CustomLayerInitializeFunction init,
|
||||
CustomLayerRenderFunction render,
|
||||
CustomLayerDeinitializeFunction deinit,
|
||||
void* context)
|
||||
: Layer(makeMutable<Impl>(layerID, init, render, nullptr, deinit, context)) {
|
||||
}
|
||||
|
||||
CustomLayer::~CustomLayer() = default;
|
||||
|
||||
Reference in New Issue
Block a user