Fix computeshader sample first frame being rendered with bogus UBOs (#1125)

After this change, the sample's render() method would first update its UBO and then start drawing stuff so as to have valid frame output from frame 0, similarly to other samples.
This commit is contained in:
takayhan-AMD 2024-05-15 18:32:32 +02:00 committed by GitHub
parent 9756ad8c23
commit 3a941167d1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -562,9 +562,11 @@ public:
virtual void render() virtual void render()
{ {
if (!prepared) if (!prepared)
{
return; return;
draw(); }
updateUniformBuffers(); updateUniformBuffers();
draw();
} }
virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay) virtual void OnUpdateUIOverlay(vks::UIOverlay *overlay)