Callback for adding custom text to text overlay

This commit is contained in:
saschawillems 2016-05-18 19:33:15 +02:00
parent c86d929354
commit 05b920cf01
2 changed files with 10 additions and 1 deletions

View file

@ -659,11 +659,16 @@ void VulkanExampleBase::updateTextOverlay()
textOverlay->addText(deviceProperties.deviceName, 5.0f, 45.0f, VulkanTextOverlay::alignLeft); textOverlay->addText(deviceProperties.deviceName, 5.0f, 45.0f, VulkanTextOverlay::alignLeft);
// todo : callback for adding text from derived classes getOverlayText(textOverlay);
textOverlay->endTextUpdate(); textOverlay->endTextUpdate();
} }
void VulkanExampleBase::getOverlayText(VulkanTextOverlay *textOverlay)
{
// Can be overriden in derived class
}
void VulkanExampleBase::prepareFrame() void VulkanExampleBase::prepareFrame()
{ {
// Acquire the next image from the swap chaing // Acquire the next image from the swap chaing

View file

@ -341,6 +341,10 @@ public:
void updateTextOverlay(); 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 // Prepare the frame for workload submission
// - Acquires the next image from the swap chain // - Acquires the next image from the swap chain
// - Submits a post present barrier // - Submits a post present barrier