notaz.gp2x.de
/
libpicofe.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sdl: don't try gl on remote displays
[libpicofe.git]
/
gl.c
diff --git
a/gl.c
b/gl.c
index
44e0dd5
..
0e18c45
100644
(file)
--- a/
gl.c
+++ b/
gl.c
@@
-10,6
+10,10
@@
static EGLDisplay edpy;
static EGLSurface esfc;
static EGLContext ectxt;
static EGLSurface esfc;
static EGLContext ectxt;
+/* for external flips */
+void *gl_es_display;
+void *gl_es_surface;
+
static int gl_have_error(const char *name)
{
GLenum e = glGetError();
static int gl_have_error(const char *name)
{
GLenum e = glGetError();
@@
-119,12
+123,19
@@
int gl_init(void *display, void *window, int *quirks)
if (gl_have_error("init"))
goto out;
if (gl_have_error("init"))
goto out;
+ gl_es_display = (void *)edpy;
+ gl_es_surface = (void *)esfc;
retval = 0;
out:
free(tmp_texture_mem);
return retval;
}
retval = 0;
out:
free(tmp_texture_mem);
return retval;
}
+void gl_announce(void)
+{
+ printf("GL_RENDERER: %s\n", (char *)glGetString(GL_RENDERER));
+}
+
static float vertices[] = {
-1.0f, 1.0f, 0.0f, // 0 0 1
1.0f, 1.0f, 0.0f, // 1 ^
static float vertices[] = {
-1.0f, 1.0f, 0.0f, // 0 0 1
1.0f, 1.0f, 0.0f, // 1 ^
@@
-185,5
+196,8
@@
void gl_finish(void)
eglTerminate(edpy);
edpy = EGL_NO_DISPLAY;
eglTerminate(edpy);
edpy = EGL_NO_DISPLAY;
+ gl_es_display = (void *)edpy;
+ gl_es_surface = (void *)esfc;
+
gl_platform_finish();
}
gl_platform_finish();
}