vo_opengl/angle_dynamic: simplify symbol renaming to make it more straightforward

This commit is contained in:
Kacper Michajłow 2023-01-19 17:03:17 +01:00 committed by Dudemanguy
parent 75e41478cc
commit af537eff06
3 changed files with 5 additions and 10 deletions

View File

@ -1,13 +1,8 @@
#include <pthread.h>
#include <windows.h>
#ifndef ANGLE_NO_ALIASES
#define ANGLE_NO_ALIASES
#endif
#include "angle_dynamic.h"
#include "config.h"
#include "common/common.h"
#if HAVE_EGL_ANGLE_LIB
@ -30,8 +25,8 @@ static void angle_do_load(void)
if (!angle_dll)
return;
#define ANGLE_LOAD_ENTRY(NAME, VAR) \
MP_CONCAT(PFN_, NAME) = (void *)GetProcAddress(angle_dll, #NAME); \
if (!MP_CONCAT(PFN_, NAME)) return;
NAME = (void *)GetProcAddress(angle_dll, #NAME); \
if (!NAME) return;
ANGLE_FNS(ANGLE_LOAD_ENTRY)
angle_loaded = true;
}

View File

@ -8,6 +8,8 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include "config.h"
#define ANGLE_FNS(FN) \
FN(eglBindAPI, EGLBoolean (*EGLAPIENTRY PFN_eglBindAPI)(EGLenum)) \
FN(eglBindTexImage, EGLBoolean (*EGLAPIENTRY PFN_eglBindTexImage) \
@ -59,7 +61,7 @@ ANGLE_FNS(ANGLE_EXT_DECL)
bool angle_load(void);
// Source compatibility to statically linked ANGLE.
#ifndef ANGLE_NO_ALIASES
#if !HAVE_EGL_ANGLE_LIB
#define eglBindAPI PFN_eglBindAPI
#define eglBindTexImage PFN_eglBindTexImage
#define eglChooseConfig PFN_eglChooseConfig

View File

@ -647,8 +647,6 @@ video_output_features = [
'groups': [ 'gl' ],
'func': check_statement(['EGL/egl.h'],
'eglCreateWindowSurface(0, 0, 0, 0)',
cflags=['-DGL_APICALL=', '-DEGLAPI=',
'-DANGLE_NO_ALIASES', '-DANGLE_EXPORT='],
lib=['EGL', 'GLESv2', 'dxguid', 'd3d9',
'gdi32', 'stdc++'])
}, {