Files
tiny_computer/android/app/src/main/cpp/xrio/framebuffer.h
2024-09-20 21:39:48 +08:00

29 lines
793 B
C

#pragma once
#include "engine.h"
struct XrFramebuffer {
int Width;
int Height;
bool Acquired;
XrSwapchain Handle;
uint32_t SwapchainIndex;
uint32_t SwapchainLength;
void* SwapchainImage;
unsigned int* GLDepthBuffers;
unsigned int* GLFrameBuffers;
};
bool XrFramebufferCreate(struct XrFramebuffer *framebuffer, XrSession session, int width, int height);
void XrFramebufferDestroy(struct XrFramebuffer *framebuffer);
void XrFramebufferAcquire(struct XrFramebuffer *framebuffer);
void XrFramebufferRelease(struct XrFramebuffer *framebuffer);
void XrFramebufferSetCurrent(struct XrFramebuffer *framebuffer);
#if XR_USE_GRAPHICS_API_OPENGL_ES
bool XrFramebufferCreateGL(struct XrFramebuffer *framebuffer, XrSession session, int width, int height);
#endif