Update API + example

This commit is contained in:
2018-09-22 18:16:48 +02:00
parent b1febba24e
commit bdb827e07e
15 changed files with 680 additions and 722 deletions

View File

@@ -3,12 +3,6 @@
#include <openhmd.h>
#ifndef __GBM__
#define __GBM__
#endif // __GBM__
#include <EGL/egl.h>
#include <stdbool.h>
#define LVRC_API __attribute__ ((visibility ("default")))
@@ -30,31 +24,23 @@ LVRC_API void lvrcDestroyInstance(struct lvrcInstance * state);
// Swap Chain
//
LVRC_API bool lvrcInitSwapChain(struct lvrcInstance * state);
LVRC_API bool lvrcInitSwapChain(struct lvrcInstance * state, unsigned int width, unsigned int height, GLuint * textures);
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
#ifdef __egl_h_
# include "lvrc_EGL.h"
#endif // __egl_h_
#endif // LINUX_VR_COMPOSITOR_H