Skip to content

Commit

Permalink
TextureBase: Keep submitting the last comitted swapchain image.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Dec 11, 2019
1 parent 28de1c7 commit cee27ab
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions Revive/TextureBase.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,8 @@ struct ovrTextureSwapChainData
std::unique_ptr<TextureBase> Textures[REV_SWAPCHAIN_MAX_LENGTH];

bool Full() { return (CurrentIndex + 1) % Length == SubmitIndex; }
void Commit() { CurrentIndex++; CurrentIndex %= Length; };
TextureBase* Submit()
{
TextureBase* tex = Textures[SubmitIndex].get();
SubmitIndex = CurrentIndex;
return tex;
};
void Commit() { SubmitIndex = CurrentIndex; CurrentIndex = (CurrentIndex + 1) % Length; };
TextureBase* Submit() { return Textures[SubmitIndex].get(); };

ovrTextureSwapChainData(ovrTextureSwapChainDesc desc);
~ovrTextureSwapChainData();
Expand Down

0 comments on commit cee27ab

Please sign in to comment.