diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ca5338bf..951e3cec 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,6 +6,7 @@ endif() option(EGL "Set to ON if targeting an EGL device" ${EGL}) option(PANDORA "Set to ON if targeting an OpenPandora" ${PANDORA}) +option(ODROID "Set to ON if targeting an Odroid" ${ODROID}) option(MUPENPLUSAPI "Set to ON for Mupen64Plus plugin" ${MUPENPLUSAPI}) option(MESA "Set to ON to disable Raspberry Pi autodetection" ${MESA}) @@ -224,6 +225,12 @@ if(PANDORA) ) endif(PANDORA) +if(ODROID) + add_definitions( + -DODROID + ) +endif(ODROID) + if(UNIX OR BCMHOST) SET( FREETYPE_INCLUDE_DIRS "/usr/include/freetype2/" ) else(UNIX OR BCMHOST) diff --git a/src/Graphics/OpenGLContext/GLFunctions.cpp b/src/Graphics/OpenGLContext/GLFunctions.cpp index 0bb73906..076e4529 100644 --- a/src/Graphics/OpenGLContext/GLFunctions.cpp +++ b/src/Graphics/OpenGLContext/GLFunctions.cpp @@ -5,7 +5,7 @@ #define glGetProcAddress wglGetProcAddress #define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) glGetProcAddress(#proc_name) -#elif defined(VC) +#elif defined(ODROID) || defined(VC) #define GL_GET_PROC_ADR(proc_type, proc_name) g_##proc_name = (proc_type) dlsym(gles2so, #proc_name); @@ -184,6 +184,8 @@ void initGLFunctions() { #ifdef VC void *gles2so = dlopen("/opt/vc/lib/libbrcmGLESv2.so", RTLD_NOW); +#elif defined(ODROID) + void *gles2so = dlopen("/usr/lib/arm-linux-gnueabihf/libGLESv2.so", RTLD_NOW); #endif #ifdef OS_WINDOWS GL_GET_PROC_ADR(PFNGLACTIVETEXTUREPROC, glActiveTexture);