MCPcopy Create free account
hub / github.com/LibreVR/Revive / ovr_CommitTextureSwapChain

Function ovr_CommitTextureSwapChain

Revive/REV_CAPI.cpp:783–808  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783OVR_PUBLIC_FUNCTION(ovrResult) ovr_CommitTextureSwapChain(ovrSession session, ovrTextureSwapChain chain)
784{
785 REV_TRACE(ovr_CommitTextureSwapChain);
786
787 if (!chain)
788 return ovrError_InvalidParameter;
789
790 MICROPROFILE_META_CPU("Identifier", chain->Identifier);
791 MICROPROFILE_META_CPU("CurrentIndex", chain->CurrentIndex);
792 MICROPROFILE_META_CPU("SubmitIndex", chain->SubmitIndex);
793
794 if (chain->Length > 1 && chain->Full())
795 return ovrError_TextureSwapChainFull;
796
797 chain->Commit();
798
799 if (chain->Overlay != vr::k_ulOverlayHandleInvalid)
800 {
801 // Submit overlays on commit so we don't upload textures every frame
802 vr::Texture_t texture;
803 chain->Submit()->ToVRTexture(texture);
804 vr::VROverlay()->SetOverlayTexture(chain->Overlay, &texture);
805 }
806
807 return ovrSuccess;
808}
809
810OVR_PUBLIC_FUNCTION(void) ovr_DestroyTextureSwapChain(ovrSession session, ovrTextureSwapChain chain)
811{

Callers

nothing calls this directly

Calls 4

FullMethod · 0.80
SubmitMethod · 0.80
CommitMethod · 0.45
ToVRTextureMethod · 0.45

Tested by

no test coverage detected