mirror of
https://github.com/gnif/LookingGlass.git
synced 2024-11-24 22:37:19 +00:00
[client] egl_dynprocs: use official prototypes from system headers
This commit is contained in:
parent
778d27f08a
commit
5c7f168370
@ -23,33 +23,21 @@
|
|||||||
#ifdef ENABLE_EGL
|
#ifdef ENABLE_EGL
|
||||||
|
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
|
#include <EGL/eglext.h>
|
||||||
|
#undef GL_KHR_debug
|
||||||
#include <GLES3/gl3.h>
|
#include <GLES3/gl3.h>
|
||||||
#include <GLES2/gl2ext.h>
|
#include <GLES2/gl2ext.h>
|
||||||
|
|
||||||
typedef EGLDisplay (*eglGetPlatformDisplayEXT_t)(EGLenum platform,
|
|
||||||
void *native_display, const EGLint *attrib_list);
|
|
||||||
typedef EGLBoolean (*eglSwapBuffersWithDamageKHR_t)(EGLDisplay dpy,
|
|
||||||
EGLSurface surface, const EGLint *rects, EGLint n_rects);
|
|
||||||
typedef void (*glEGLImageTargetTexture2DOES_t)(GLenum target,
|
|
||||||
GLeglImageOES image);
|
|
||||||
typedef void (*DEBUGPROC_t)(GLenum source,
|
|
||||||
GLenum type, GLuint id, GLenum severity, GLsizei length,
|
|
||||||
const GLchar *message, const void *userParam);
|
|
||||||
typedef void (*glDebugMessageCallback_t)(DEBUGPROC_t callback,
|
|
||||||
const void * userParam);
|
|
||||||
typedef void (*glBufferStorageEXT_t)(GLenum target, GLsizeiptr size,
|
|
||||||
const void * data, GLbitfield flags);
|
|
||||||
|
|
||||||
struct EGLDynProcs
|
struct EGLDynProcs
|
||||||
{
|
{
|
||||||
eglGetPlatformDisplayEXT_t eglGetPlatformDisplay;
|
PFNEGLGETPLATFORMDISPLAYPROC eglGetPlatformDisplay;
|
||||||
eglGetPlatformDisplayEXT_t eglGetPlatformDisplayEXT;
|
PFNEGLGETPLATFORMDISPLAYPROC eglGetPlatformDisplayEXT;
|
||||||
eglSwapBuffersWithDamageKHR_t eglSwapBuffersWithDamageKHR;
|
PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC eglSwapBuffersWithDamageKHR;
|
||||||
eglSwapBuffersWithDamageKHR_t eglSwapBuffersWithDamageEXT;
|
PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC eglSwapBuffersWithDamageEXT;
|
||||||
glEGLImageTargetTexture2DOES_t glEGLImageTargetTexture2DOES;
|
PFNGLEGLIMAGETARGETTEXTURE2DOESPROC glEGLImageTargetTexture2DOES;
|
||||||
glDebugMessageCallback_t glDebugMessageCallback;
|
PFNGLDEBUGMESSAGECALLBACKKHRPROC glDebugMessageCallback;
|
||||||
glDebugMessageCallback_t glDebugMessageCallbackKHR;
|
PFNGLDEBUGMESSAGECALLBACKKHRPROC glDebugMessageCallbackKHR;
|
||||||
glBufferStorageEXT_t glBufferStorageEXT;
|
PFNGLBUFFERSTORAGEEXTPROC glBufferStorageEXT;
|
||||||
};
|
};
|
||||||
|
|
||||||
extern struct EGLDynProcs g_egl_dynProcs;
|
extern struct EGLDynProcs g_egl_dynProcs;
|
||||||
|
@ -23,14 +23,14 @@
|
|||||||
|
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <EGL/egl.h>
|
#include <EGL/egl.h>
|
||||||
|
#include <EGL/eglext.h>
|
||||||
|
|
||||||
#include "common/types.h"
|
#include "common/types.h"
|
||||||
#include "egl_dynprocs.h"
|
|
||||||
|
|
||||||
struct SwapWithDamageData
|
struct SwapWithDamageData
|
||||||
{
|
{
|
||||||
bool init;
|
bool init;
|
||||||
eglSwapBuffersWithDamageKHR_t func;
|
PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC func;
|
||||||
};
|
};
|
||||||
|
|
||||||
void swapWithDamageInit(struct SwapWithDamageData * data, EGLDisplay display);
|
void swapWithDamageInit(struct SwapWithDamageData * data, EGLDisplay display);
|
||||||
|
@ -26,21 +26,21 @@ struct EGLDynProcs g_egl_dynProcs = {0};
|
|||||||
|
|
||||||
void egl_dynProcsInit(void)
|
void egl_dynProcsInit(void)
|
||||||
{
|
{
|
||||||
g_egl_dynProcs.eglGetPlatformDisplay = (eglGetPlatformDisplayEXT_t)
|
g_egl_dynProcs.eglGetPlatformDisplay = (PFNEGLGETPLATFORMDISPLAYPROC)
|
||||||
eglGetProcAddress("eglGetPlatformDisplay");
|
eglGetProcAddress("eglGetPlatformDisplay");
|
||||||
g_egl_dynProcs.eglGetPlatformDisplayEXT = (eglGetPlatformDisplayEXT_t)
|
g_egl_dynProcs.eglGetPlatformDisplayEXT = (PFNEGLGETPLATFORMDISPLAYPROC)
|
||||||
eglGetProcAddress("eglGetPlatformDisplayEXT");
|
eglGetProcAddress("eglGetPlatformDisplayEXT");
|
||||||
g_egl_dynProcs.glEGLImageTargetTexture2DOES = (glEGLImageTargetTexture2DOES_t)
|
g_egl_dynProcs.glEGLImageTargetTexture2DOES = (PFNGLEGLIMAGETARGETTEXTURE2DOESPROC)
|
||||||
eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
eglGetProcAddress("glEGLImageTargetTexture2DOES");
|
||||||
g_egl_dynProcs.eglSwapBuffersWithDamageKHR = (eglSwapBuffersWithDamageKHR_t)
|
g_egl_dynProcs.eglSwapBuffersWithDamageKHR = (PFNEGLSWAPBUFFERSWITHDAMAGEKHRPROC)
|
||||||
eglGetProcAddress("eglSwapBuffersWithDamageKHR");
|
eglGetProcAddress("eglSwapBuffersWithDamageKHR");
|
||||||
g_egl_dynProcs.eglSwapBuffersWithDamageEXT = (eglSwapBuffersWithDamageKHR_t)
|
g_egl_dynProcs.eglSwapBuffersWithDamageEXT = (PFNEGLSWAPBUFFERSWITHDAMAGEEXTPROC)
|
||||||
eglGetProcAddress("eglSwapBuffersWithDamageEXT");
|
eglGetProcAddress("eglSwapBuffersWithDamageEXT");
|
||||||
g_egl_dynProcs.glDebugMessageCallback = (glDebugMessageCallback_t)
|
g_egl_dynProcs.glDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKKHRPROC)
|
||||||
eglGetProcAddress("glDebugMessageCallback");
|
eglGetProcAddress("glDebugMessageCallback");
|
||||||
g_egl_dynProcs.glDebugMessageCallbackKHR = (glDebugMessageCallback_t)
|
g_egl_dynProcs.glDebugMessageCallbackKHR = (PFNGLDEBUGMESSAGECALLBACKKHRPROC)
|
||||||
eglGetProcAddress("glDebugMessageCallbackKHR");
|
eglGetProcAddress("glDebugMessageCallbackKHR");
|
||||||
g_egl_dynProcs.glBufferStorageEXT = (glBufferStorageEXT_t)
|
g_egl_dynProcs.glBufferStorageEXT = (PFNGLBUFFERSTORAGEEXTPROC)
|
||||||
eglGetProcAddress("glBufferStorageEXT");
|
eglGetProcAddress("glBufferStorageEXT");
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user