diff --git a/base/vulkanexamplebase.cpp b/base/vulkanexamplebase.cpp index abf07cd4..dd79267d 100644 --- a/base/vulkanexamplebase.cpp +++ b/base/vulkanexamplebase.cpp @@ -659,11 +659,16 @@ void VulkanExampleBase::updateTextOverlay() textOverlay->addText(deviceProperties.deviceName, 5.0f, 45.0f, VulkanTextOverlay::alignLeft); - // todo : callback for adding text from derived classes + getOverlayText(textOverlay); textOverlay->endTextUpdate(); } +void VulkanExampleBase::getOverlayText(VulkanTextOverlay *textOverlay) +{ + // Can be overriden in derived class +} + void VulkanExampleBase::prepareFrame() { // Acquire the next image from the swap chaing diff --git a/base/vulkanexamplebase.h b/base/vulkanexamplebase.h index 27d37618..885161c9 100644 --- a/base/vulkanexamplebase.h +++ b/base/vulkanexamplebase.h @@ -341,6 +341,10 @@ public: void updateTextOverlay(); + // Called when the text overlay is updating + // Can be overriden in derived class to add custom text to the overlay + virtual void getOverlayText(VulkanTextOverlay * textOverlay); + // Prepare the frame for workload submission // - Acquires the next image from the swap chain // - Submits a post present barrier