mirror of
https://github.com/RaySollium99/libpicofe.git
synced 2025-09-07 07:38:04 -04:00
gl: make surface and context readable by users
used by PCSX gles plugin
This commit is contained in:
parent
e288d77607
commit
6fd09356f0
2 changed files with 16 additions and 0 deletions
9
gl.c
9
gl.c
|
@ -10,6 +10,10 @@ static EGLDisplay edpy;
|
|||
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();
|
||||
|
@ -119,6 +123,8 @@ int gl_init(void *display, void *window, int *quirks)
|
|||
if (gl_have_error("init"))
|
||||
goto out;
|
||||
|
||||
gl_es_display = (void *)edpy;
|
||||
gl_es_surface = (void *)esfc;
|
||||
retval = 0;
|
||||
out:
|
||||
free(tmp_texture_mem);
|
||||
|
@ -185,5 +191,8 @@ void gl_finish(void)
|
|||
eglTerminate(edpy);
|
||||
edpy = EGL_NO_DISPLAY;
|
||||
|
||||
gl_es_display = (void *)edpy;
|
||||
gl_es_surface = (void *)esfc;
|
||||
|
||||
gl_platform_finish();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue