61 lines
1.4 KiB
C
61 lines
1.4 KiB
C
#ifndef LINUX_VR_COMPOSITOR_H
|
|
#define LINUX_VR_COMPOSITOR_H
|
|
|
|
#include <openhmd.h>
|
|
|
|
#ifndef __GBM__
|
|
#define __GBM__
|
|
#endif // __GBM__
|
|
|
|
#include <EGL/egl.h>
|
|
|
|
#include <stdbool.h>
|
|
|
|
#define LVRC_API __attribute__ ((visibility ("default")))
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
//
|
|
// Instance
|
|
//
|
|
|
|
struct lvrcInstance;
|
|
|
|
LVRC_API struct lvrcInstance * lvrcCreateInstance(ohmd_device * hmd);
|
|
LVRC_API void lvrcDestroyInstance(struct lvrcInstance * state);
|
|
|
|
//
|
|
// Swap Chain
|
|
//
|
|
|
|
LVRC_API bool lvrcInitSwapChain(struct lvrcInstance * state);
|
|
LVRC_API bool lvrcReleaseSwapChain(struct lvrcInstance * state);
|
|
|
|
LVRC_API EGLNativeDisplayType lvrcSwapChainGetNativeDisplay(struct lvrcInstance * state);
|
|
LVRC_API EGLNativeWindowType lvrcSwapChainGetNativeWindow(struct lvrcInstance * state);
|
|
|
|
LVRC_API unsigned int lvrcSwapChainGetWidth(struct lvrcInstance * state);
|
|
LVRC_API unsigned int lvrcSwapChainGetHeight(struct lvrcInstance * state);
|
|
|
|
//
|
|
// Frame
|
|
//
|
|
|
|
LVRC_API bool lvrcInitFrameResources(struct lvrcInstance * state);
|
|
LVRC_API bool lvrcReleaseFrameResources(struct lvrcInstance * state);
|
|
|
|
LVRC_API bool lvrcBeginFrame(struct lvrcInstance * state);
|
|
|
|
LVRC_API bool lvrcSubmitFrameLeft(struct lvrcInstance * state, GLuint texture);
|
|
LVRC_API bool lvrcSubmitFrameRight(struct lvrcInstance * state, GLuint texture);
|
|
|
|
LVRC_API bool lvrcEndFrame(struct lvrcInstance * state);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif // LINUX_VR_COMPOSITOR_H
|