11 #include <glm/glm.hpp>
12 #include <glad/glad.h>
14 #include <VrApi_Types.h>
20 void updateLayer(
int eye, ovrLayerProjection2& layer,
const ovrMatrix4f* projectionMatrix =
nullptr)
const;
21 void create(
const glm::uvec2& size);
24 void bind(GLenum target = GL_DRAW_FRAMEBUFFER);
25 void invalidate(GLenum target = GL_DRAW_FRAMEBUFFER);
26 void drawBuffers(ovrEye eye)
const;
28 const glm::uvec2& size()
const {
return _size; }
33 struct SwapChainInfo {
36 bool validTexture{
false };
37 ovrTextureSwapChain* swapChain{
nullptr };
39 void create(
const glm::uvec2& size);
42 void bind(GLenum target, GLenum attachment);
45 SwapChainInfo _swapChainInfos[VRAPI_FRAME_LAYER_EYE_MAX];