if (CAN_USE_GLES2)
if (USE_GLES2)
add_definitions (-DHAVE_GLES2_EXT)
- OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
- OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
+ if (NOT IOS)
+ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/egl")
+ OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gles2")
+ endif()
else()
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_EGL")
OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GLES2")
#include <GL/glx.h>
#endif
-#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
+#if !defined(HAVE_EGL)
+#if defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__) || defined(HAVE_GLES2) || defined(OCCT_UWP)
+ #if !defined(__APPLE__)
+ #define HAVE_EGL // EAGL is used instead of EGL
+ #endif
+#elif !defined(_WIN32) && !defined(__APPLE__) && !defined(HAVE_XLIB)
+ #define HAVE_EGL
+#endif
+#endif
+
+#if defined(HAVE_EGL)
#include <EGL/egl.h>
#ifndef EGL_OPENGL_ES3_BIT
#define EGL_OPENGL_ES3_BIT 0x00000040
{
static const Handle(OpenGl_Context) TheNullGlCtx;
-#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
+#if defined(HAVE_EGL)
//! Wrapper over eglChooseConfig() called with preferred defaults.
static EGLConfig chooseEglSurfConfig (EGLDisplay theDisplay)
{
myMapOfView (1, NCollection_BaseAllocator::CommonBaseAllocator()),
myMapOfStructure (1, NCollection_BaseAllocator::CommonBaseAllocator())
{
-#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
+#if defined(HAVE_EGL)
myEglDisplay = (Aspect_Display )EGL_NO_DISPLAY;
myEglContext = (Aspect_RenderingContext )EGL_NO_CONTEXT;
#endif
aWindow->GetGlContext()->forcedRelease();
}
-#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
+#if defined(HAVE_EGL)
if (myIsOwnContext)
{
if (myEglContext != (Aspect_RenderingContext )EGL_NO_CONTEXT)
Standard_Boolean OpenGl_GraphicDriver::InitContext()
{
ReleaseContext();
-#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
+#if defined(HAVE_EGL)
#if defined(HAVE_XLIB)
if (myDisplayConnection.IsNull())
void* theEglConfig)
{
ReleaseContext();
-#if defined(HAVE_EGL) || defined(HAVE_GLES2) || defined(OCCT_UWP) || defined(__ANDROID__) || defined(__QNX__) || defined(__EMSCRIPTEN__)
+#if defined(HAVE_EGL)
#if defined(HAVE_XLIB)
if (myDisplayConnection.IsNull())
{
XVisualInfo* aVisInfo = NULL;
Aspect_FBConfig anFBConfig = NULL;
-#if defined(HAVE_EGL) || defined(HAVE_GLES2)
+#if defined(HAVE_EGL)
XVisualInfo aVisInfoTmp;
memset (&aVisInfoTmp, 0, sizeof(aVisInfoTmp));
aVisInfoTmp.screen = DefaultScreen (aDisp);