single raybriEGL
This commit is contained in:
1 parent
ac649266ac
commit
48f7d37c78
4 files changed
+25
-19
No files matched your search
@@ -1,4 +1,5 @@
|
||||
#include "raybri.h"
|
||||
#define RAYBRI_EGL_IMPLEMENTATION
|
||||
#include "raybriEGL.h"
|
||||
|
||||
#define RLGL_IMPLEMENTATION
|
||||
|
||||
@@ -1,18 +0,0 @@
|
||||
#include "raybriEGL.h"
|
||||
|
||||
bool raybriEGLInit(void) {
|
||||
EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
if (display == EGL_NO_DISPLAY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (eglInitialize(display, NULL, NULL) == EGL_FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (eglBindAPI(EGL_OPENGL_ES_API) == EGL_FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -5,6 +5,30 @@
|
||||
#include <libGLESv2/GLES/gl.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
// Header
|
||||
|
||||
bool raybriEGLInit(void);
|
||||
|
||||
// Source
|
||||
|
||||
#if defined(RAYBRI_EGL_IMPLEMENTATION)
|
||||
|
||||
bool raybriEGLInit(void) {
|
||||
EGLDisplay display = eglGetDisplay(EGL_DEFAULT_DISPLAY);
|
||||
if (display == EGL_NO_DISPLAY) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (eglInitialize(display, NULL, NULL) == EGL_FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (eglBindAPI(EGL_OPENGL_ES_API) == EGL_FALSE) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif // RAYBRI_EGL_IMPLEMENTATION
|
||||
|
||||
#endif // RAYBRI_EGL_H
|
||||
@@ -1 +0,0 @@
|
||||
../../../../components/raybri/ios/raybriEGL.c
|
||||
Reference in new issue
Block a user