mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-07 07:38:04 -04:00
add some VideCore/R-pi support code
This commit is contained in:
parent
e54719efea
commit
0d645bc539
5 changed files with 153 additions and 7 deletions
11
gl.c
11
gl.c
|
@ -3,6 +3,7 @@
|
|||
|
||||
#include <EGL/egl.h>
|
||||
#include <GLES/gl.h>
|
||||
#include "gl_platform.h"
|
||||
#include "gl.h"
|
||||
|
||||
static EGLDisplay edpy;
|
||||
|
@ -29,7 +30,7 @@ static int gles_have_error(const char *name)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int gl_init(void *display, void *window)
|
||||
int gl_init(void *display, void *window, int *quirks)
|
||||
{
|
||||
EGLConfig ecfg = NULL;
|
||||
GLuint texture_name = 0;
|
||||
|
@ -42,6 +43,12 @@ int gl_init(void *display, void *window)
|
|||
EGL_NONE
|
||||
};
|
||||
|
||||
ret = gl_platform_init(&display, &window, quirks);
|
||||
if (ret != 0) {
|
||||
fprintf(stderr, "gl_platform_init failed with %d\n", ret);
|
||||
goto out;
|
||||
}
|
||||
|
||||
tmp_texture_mem = calloc(1, 1024 * 512 * 2);
|
||||
if (tmp_texture_mem == NULL) {
|
||||
fprintf(stderr, "OOM\n");
|
||||
|
@ -177,4 +184,6 @@ void gl_finish(void)
|
|||
esfc = EGL_NO_SURFACE;
|
||||
eglTerminate(edpy);
|
||||
edpy = EGL_NO_DISPLAY;
|
||||
|
||||
gl_platform_finish();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue