Android support, attempt-1 #8

Open
kornerr wants to merge 62 commits from and1 into master
pull from: and1
4 changed files with 25 additions and 19 deletions
Showing only changes of commit 48f7d37c78 - Show all commits

No files matched your search

+1
View File
@@ -1,4 +1,5 @@
#include "raybri.h"
#define RAYBRI_EGL_IMPLEMENTATION
#include "raybriEGL.h"
#define RLGL_IMPLEMENTATION
-18
View File
@@ -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;
}
+24
View File
@@ -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
View File
@@ -1 +0,0 @@
../../../../components/raybri/ios/raybriEGL.c