1
0
mirror of https://github.com/blawar/GLideN64.git synced 2024-07-04 10:03:36 +00:00

Fix function loading on Raspberry Pi

This commit is contained in:
Logan McNaughton 2017-02-07 08:24:48 -07:00 committed by GitHub
parent 8004dc200d
commit a7ecc8534b

View File

@ -5,6 +5,10 @@
#define glGetProcAddress wglGetProcAddress
#define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) glGetProcAddress(#proc_name)
#elif defined(VC)
#define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) dlsym(gles2so, #proc_name);
#elif defined(EGL)
#include <EGL/egl.h>
@ -162,6 +166,9 @@ PFNGLDRAWELEMENTSBASEVERTEXPROC g_glDrawElementsBaseVertex;
void initGLFunctions()
{
#ifdef VC
void *gles2so = dlopen("/opt/vc/lib/libGLESv2.so", RTLD_NOW);
#endif
#ifdef OS_WINDOWS
GL_GET_PROC_ADR(PFNGLACTIVETEXTUREPROC, glActiveTexture);
GL_GET_PROC_ADR(PFNGLBLENDCOLORPROC, glBlendColor);