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

Method ToVRTexture

Revive/TextureD3D.cpp:31–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29}
30
31void TextureD3D::ToVRTexture(vr::Texture_t& texture)
32{
33 texture.eColorSpace = vr::ColorSpace_Auto; // TODO: Set this from the texture format
34
35 if (m_pDevice12)
36 {
37 if (m_pResolveList)
38 m_pQueue->ExecuteCommandLists(1, (ID3D12CommandList**)m_pResolveList.GetAddressOf());
39
40 texture.eType = vr::TextureType_DirectX12;
41 texture.handle = &m_data;
42 }
43 else
44 {
45 texture.eType = vr::TextureType_DirectX;
46 texture.handle = m_pTexture.Get();
47 }
48}
49
50DXGI_FORMAT TextureD3D::TextureFormatToDXGIFormat(ovrTextureFormat format, bool typeless)
51{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected