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"
|
#include "Common/GL/GLInterfaceBase.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#if defined(__APPLE__)
|
||||||
#include "Common/GL/GLInterface/EGLAndroid.h"
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
#include "Common/GL/GLInterface/AGL.h"
|
#include "Common/GL/GLInterface/AGL.h"
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
#include "Common/GL/GLInterface/WGL.h"
|
#include "Common/GL/GLInterface/WGL.h"
|
||||||
|
@ -20,15 +18,15 @@
|
||||||
#endif
|
#endif
|
||||||
#elif defined(USE_EGL) && USE_EGL && defined(USE_HEADLESS)
|
#elif defined(USE_EGL) && USE_EGL && defined(USE_HEADLESS)
|
||||||
#include "Common/GL/GLInterface/EGL.h"
|
#include "Common/GL/GLInterface/EGL.h"
|
||||||
|
#elif ANDROID
|
||||||
|
#include "Common/GL/GLInterface/EGLAndroid.h"
|
||||||
#else
|
#else
|
||||||
#error Platform doesnt have a GLInterface
|
#error Platform doesnt have a GLInterface
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
||||||
{
|
{
|
||||||
#ifdef ANDROID
|
#if defined(__APPLE__)
|
||||||
return std::make_unique<cInterfaceEGLAndroid>();
|
|
||||||
#elif defined(__APPLE__)
|
|
||||||
return std::make_unique<cInterfaceAGL>();
|
return std::make_unique<cInterfaceAGL>();
|
||||||
#elif defined(_WIN32)
|
#elif defined(_WIN32)
|
||||||
return std::make_unique<cInterfaceWGL>();
|
return std::make_unique<cInterfaceWGL>();
|
||||||
|
@ -40,6 +38,8 @@ std::unique_ptr<cInterfaceBase> HostGL_CreateGLInterface()
|
||||||
#else
|
#else
|
||||||
return std::make_unique<cInterfaceGLX>();
|
return std::make_unique<cInterfaceGLX>();
|
||||||
#endif
|
#endif
|
||||||
|
#elif ANDROID
|
||||||
|
return std::make_unique<cInterfaceEGLAndroid>();
|
||||||
#else
|
#else
|
||||||
return nullptr;
|
return nullptr;
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue