Rearrange GLInterface interface generation.
This will be important when we enable headless on Android
This commit is contained in:
parent
38cb6ba6dc
commit
018625e54f
|
@ -6,9 +6,7 @@
|
|||
|
||||
#include "Common/GL/GLInterfaceBase.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#include "Common/GL/GLInterface/EGLAndroid.h"
|
||||
#elif defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
#include "Common/GL/GLInterface/AGL.h"
|
||||
#elif defined(_WIN32)
|
||||
#include "Common/GL/GLInterface/WGL.h"
|
||||
|
@ -20,15 +18,15 @@
|
|||
#endif
|
||||
#elif defined(USE_EGL) && USE_EGL && defined(USE_HEADLESS)
|
||||
#include "Common/GL/GLInterface/EGL.h"
|
||||
#elif ANDROID
|
||||
#include "Common/GL/GLInterface/EGLAndroid.h"
|
||||
#else
|
||||
#error Platform doesnt have a GLInterface
|
||||
#endif
|
||||
|
||||
std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
||||
{
|
||||
#ifdef ANDROID
|
||||
return std::make_unique<cInterfaceEGLAndroid>();
|
||||
#elif defined(__APPLE__)
|
||||
#if defined(__APPLE__)
|
||||
return std::make_unique<cInterfaceAGL>();
|
||||
#elif defined(_WIN32)
|
||||
return std::make_unique<cInterfaceWGL>();
|
||||
|
@ -40,6 +38,8 @@ std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
|||
#else
|
||||
return std::make_unique<cInterfaceGLX>();
|
||||
#endif
|
||||
#elif ANDROID
|
||||
return std::make_unique<cInterfaceEGLAndroid>();
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue