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:
parent
9756ad8c23
commit
3a941167d1
1 changed files with 7 additions and 5 deletions
|
|
@ -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)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue