Android support, attempt-1 #8
No files matched your search
@@ -1,4 +1,5 @@
|
|||||||
#include "raybri.h"
|
#include "raybri.h"
|
||||||
|
#define RAYBRI_EGL_IMPLEMENTATION
|
||||||
#include "raybriEGL.h"
|
#include "raybriEGL.h"
|
||||||
|
|
||||||
#define RLGL_IMPLEMENTATION
|
#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 <libGLESv2/GLES/gl.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
// Header
|
||||||
|
|
||||||
bool raybriEGLInit(void);
|
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
|
#endif // RAYBRI_EGL_H
|
||||||
@@ -1 +0,0 @@
|
|||||||
../../../../components/raybri/ios/raybriEGL.c
|
|
||||||
Reference in new issue
Block a user