21 #include "../../SDL_internal.h" 23 #if SDL_VIDEO_DRIVER_EMSCRIPTEN && SDL_VIDEO_OPENGL_EGL 25 #include <emscripten/emscripten.h> 31 #define LOAD_FUNC(NAME) _this->egl_data->NAME = NAME; 36 Emscripten_GLES_LoadLibrary(
_THIS,
const char *
path) {
38 _this->egl_data = (
struct SDL_EGL_VideoData *)
SDL_calloc(1,
sizeof(SDL_EGL_VideoData));
39 if (!
_this->egl_data) {
65 if (!
_this->egl_data->egl_display) {
92 SDL_EGL_DeleteContext(
_this, context);
95 SDL_EGL_CreateContext_impl(Emscripten)
96 SDL_EGL_SwapWindow_impl(Emscripten)
97 SDL_EGL_MakeCurrent_impl(Emscripten)
EGLAPI EGLBoolean EGLAPIENTRY eglTerminate(EGLDisplay dpy)
EGLAPI EGLBoolean EGLAPIENTRY eglDestroySurface(EGLDisplay dpy, EGLSurface surface)
EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config, EGLNativeWindowType win, const EGLint *attrib_list)
#define GL_STENCIL_BUFFER_BIT
EGLAPI EGLBoolean EGLAPIENTRY eglMakeCurrent(EGLDisplay dpy, EGLSurface draw, EGLSurface read, EGLContext ctx)
GLfloat GLfloat GLfloat GLfloat h
static screen_context_t context
#define GL_DEPTH_BUFFER_BIT
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
EGLAPI __eglMustCastToProperFunctionPointerType EGLAPIENTRY eglGetProcAddress(const char *procname)
EGLAPI EGLBoolean EGLAPIENTRY eglGetConfigAttrib(EGLDisplay dpy, EGLConfig config, EGLint attribute, EGLint *value)
EGLAPI EGLBoolean EGLAPIENTRY eglBindAPI(EGLenum api)
#define EGL_DEFAULT_DISPLAY
EGLAPI EGLBoolean EGLAPIENTRY eglChooseConfig(EGLDisplay dpy, const EGLint *attrib_list, EGLConfig *configs, EGLint config_size, EGLint *num_config)
static SDL_VideoDevice * _this
EGLAPI EGLBoolean EGLAPIENTRY eglDestroyContext(EGLDisplay dpy, EGLContext ctx)
void * SDL_GLContext
An opaque handle to an OpenGL context.
GLubyte GLubyte GLubyte GLubyte w
GLAPI void GLAPIENTRY glClear(GLbitfield mask)
#define GL_COLOR_BUFFER_BIT
#define SDL_OutOfMemory()
EGLAPI EGLDisplay EGLAPIENTRY eglGetDisplay(EGLNativeDisplayType display_id)
EGLAPI EGLBoolean EGLAPIENTRY eglSwapBuffers(EGLDisplay dpy, EGLSurface surface)
EGLSurface EGLNativeWindowType * window
The type used to identify a window.
EGLAPI EGLBoolean EGLAPIENTRY eglWaitGL(void)
EGLAPI EGLBoolean EGLAPIENTRY eglSwapInterval(EGLDisplay dpy, EGLint interval)
EGLAPI EGLBoolean EGLAPIENTRY eglWaitNative(EGLint engine)
GLsizei const GLchar *const * path
struct SDL_VideoDevice::@34 gl_config
EGLAPI EGLContext EGLAPIENTRY eglCreateContext(EGLDisplay dpy, EGLConfig config, EGLContext share_context, const EGLint *attrib_list)
EGLAPI EGLBoolean EGLAPIENTRY eglInitialize(EGLDisplay dpy, EGLint *major, EGLint *minor)