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

Function ovr_CreateTextureSwapChainGL

Revive/REV_CAPI_GL.cpp:7–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5#include "TextureGL.h"
6
7OVR_PUBLIC_FUNCTION(ovrResult) ovr_CreateTextureSwapChainGL(ovrSession session,
8 const ovrTextureSwapChainDesc* desc,
9 ovrTextureSwapChain* out_TextureSwapChain)
10{
11 REV_TRACE(ovr_CreateTextureSwapChainGL);
12
13 if (!desc || !out_TextureSwapChain || desc->Type != ovrTexture_2D)
14 return ovrError_InvalidParameter;
15
16 if (!session->Compositor)
17 {
18 session->Compositor.reset(CompositorGL::Create());
19 if (!session->Compositor)
20 return ovrError_RuntimeException;
21 }
22
23 if (session->Compositor->GetAPI() != vr::TextureType_OpenGL)
24 return ovrError_RuntimeException;
25
26 return session->Compositor->CreateTextureSwapChain(desc, out_TextureSwapChain);
27}
28
29OVR_PUBLIC_FUNCTION(ovrResult) ovr_GetTextureSwapChainBufferGL(ovrSession session,
30 ovrTextureSwapChain chain,

Callers

nothing calls this directly

Calls 2

GetAPIMethod · 0.45

Tested by

no test coverage detected