mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
OpenXR - Hookup VR API into Vulkan
This commit is contained in:
1 parent
43f848a2aa
commit
ade606bc3c
11 files changed
+45
-52
No files matched your search
@@ -217,29 +217,12 @@ void ovrFramebuffer_Destroy(ovrFramebuffer* frameBuffer) {
|
||||
ovrFramebuffer_Clear(frameBuffer);
|
||||
}
|
||||
|
||||
void ovrFramebuffer_SetCurrent(ovrFramebuffer* frameBuffer) {
|
||||
void* ovrFramebuffer_SetCurrent(ovrFramebuffer* frameBuffer) {
|
||||
if (frameBuffer->UseVulkan) {
|
||||
//TODO:bind framebuffer
|
||||
return frameBuffer->VKFrameBuffers[frameBuffer->TextureSwapChainIndex];
|
||||
} else {
|
||||
GL(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, frameBuffer->GLFrameBuffers[frameBuffer->TextureSwapChainIndex]));
|
||||
}
|
||||
}
|
||||
|
||||
void ovrFramebuffer_SetNone(ovrFramebuffer* frameBuffer) {
|
||||
if (frameBuffer->UseVulkan) {
|
||||
//TODO:unbind framebuffer
|
||||
} else {
|
||||
GL(glBindFramebuffer(GL_DRAW_FRAMEBUFFER, 0));
|
||||
}
|
||||
}
|
||||
|
||||
void ovrFramebuffer_Resolve(ovrFramebuffer* frameBuffer) {
|
||||
// Discard the depth buffer, so the tiler won't need to write it back out to memory.
|
||||
if (frameBuffer->UseVulkan) {
|
||||
//TODO:implement
|
||||
} else {
|
||||
const GLenum depthAttachment[1] = {GL_DEPTH_ATTACHMENT};
|
||||
glInvalidateFramebuffer(GL_DRAW_FRAMEBUFFER, 1, depthAttachment);
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user