diff --git a/CMakeLists.txt b/CMakeLists.txt index 719df3e34..67a225153 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -190,10 +190,6 @@ if (WIN32) add_definitions(-DNOMINMAX -DWIN32_LEAN_AND_MEAN) endif() -if (ANDROID) - set(OPENGL_ES TRUE CACHE BOOL "enable opengl es support for android" FORCE) -endif (ANDROID) - option(OPENGL_ES "enable opengl es support" FALSE ) if (OPENGL_ES) @@ -566,7 +562,9 @@ endif(WIN32) # Extern add_subdirectory (extern/osg-ffmpeg-videoplayer) add_subdirectory (extern/oics) -add_subdirectory (extern/osgQt) +if (USE_QT) + add_subdirectory (extern/osgQt) +endif() # Components add_subdirectory (components) diff --git a/components/sdlutil/sdlgraphicswindow.cpp b/components/sdlutil/sdlgraphicswindow.cpp index 66d53b096..c2cf2536e 100644 --- a/components/sdlutil/sdlgraphicswindow.cpp +++ b/components/sdlutil/sdlgraphicswindow.cpp @@ -91,7 +91,7 @@ void GraphicsWindowSDL2::init() SDL_Window *oldWin = SDL_GL_GetCurrentWindow(); SDL_GLContext oldCtx = SDL_GL_GetCurrentContext(); -#ifdef OPENGL_ES +#if defined(OPENGL_ES) || defined(ANDROID) SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 1); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 1);