Update API + example
This commit is contained in:
@@ -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
|
||||
|
||||
14
include/lvrc_EGL.h
Normal file
14
include/lvrc_EGL.h
Normal file
@@ -0,0 +1,14 @@
|
||||
#ifndef LINUX_VR_COMPOSITOR_EGL_H
|
||||
#define LINUX_VR_COMPOSITOR_EGL_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
LVRC_API bool lvrcInitRenderingEGL(struct lvrcInstance * state, EGLDisplay display, EGLContext context, EGLSurface surface);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // LINUX_VR_COMPOSITOR_EGL_H
|
||||
Reference in New Issue
Block a user