This flag disables GL, GLES, but also Glew and EGL libraries.legacy
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -102,25 +102,27 @@ AC_CHECK_LIB(log, __android_log_vprint, | |||
| AM_CONDITIONAL(LOL_USE_ANDROID, test "${ac_cv_my_have_android}" != "no") | |||
| dnl Use EGL? | |||
| dnl Use EGL? (autodetect unless GL is disabled) | |||
| ac_cv_my_have_egl="no" | |||
| PKG_CHECK_MODULES(EGL, egl, [ac_cv_my_have_egl="yes"], [:]) | |||
| if test "${ac_cv_my_have_egl}" != "no"; then | |||
| AC_DEFINE(LOL_USE_EGL, 1, Define to 1 to use libegl) | |||
| EGL_LIBS="${EGL_LIBS} -lX11" | |||
| if test "${enable_gl}" != "no"; then | |||
| PKG_CHECK_MODULES(EGL, egl, [ac_cv_my_have_egl="yes"], [:]) | |||
| if test "${ac_cv_my_have_egl}" != "no"; then | |||
| AC_DEFINE(LOL_USE_EGL, 1, Define to 1 to use libegl) | |||
| EGL_LIBS="${EGL_LIBS} -lX11" | |||
| fi | |||
| AC_CHECK_LIB(EGL, main, | |||
| [ac_cv_my_have_egl="yes" | |||
| AC_DEFINE(LOL_USE_EGL, 1, Define to 1 to use libegl) | |||
| EGL_LIBS="-lEGL"]) | |||
| dnl Raspberry Pi is different, check for it with extra libs; also we | |||
| dnl look for a different function to bypass autoconf caching | |||
| AC_CHECK_LIB(EGL, eglGetDisplay, | |||
| [ac_cv_my_have_egl="yes" | |||
| AC_DEFINE(LOL_USE_EGL, 1, Define to 1 to use libegl) | |||
| EGL_LIBS="-lEGL -lvcos -lvchiq_arm -lbcm_host -lGLESv2"], | |||
| [:], | |||
| [-lvcos -lvchiq_arm -lbcm_host -lGLESv2]) | |||
| fi | |||
| AC_CHECK_LIB(EGL, main, | |||
| [ac_cv_my_have_egl="yes" | |||
| AC_DEFINE(LOL_USE_EGL, 1, Define to 1 to use libegl) | |||
| EGL_LIBS="-lEGL"]) | |||
| dnl Raspberry Pi is different, check for it with extra libs; also we | |||
| dnl look for a different function to bypass autoconf caching | |||
| AC_CHECK_LIB(EGL, eglGetDisplay, | |||
| [ac_cv_my_have_egl="yes" | |||
| AC_DEFINE(LOL_USE_EGL, 1, Define to 1 to use libegl) | |||
| EGL_LIBS="-lEGL -lvcos -lvchiq_arm -lbcm_host -lGLESv2"], | |||
| [:], | |||
| [-lvcos -lvchiq_arm -lbcm_host -lGLESv2]) | |||
| AM_CONDITIONAL(LOL_USE_EGL, test "${ac_cv_my_have_egl}" != "no") | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -15,6 +15,7 @@ dnl | |||
| # --------------------- | |||
| AC_DEFUN([LOL_AC_CHECK_FFMPEG], | |||
| [ | |||
| ac_cv_my_have_ffmpeg="no" | |||
| if test "${enable_ffmpeg}" != "no"; then | |||
| LOL_AC_CHECK_FFMPEG_INNER() | |||
| fi | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -12,9 +12,20 @@ dnl | |||
| # LOL_AC_CHECK_OPENGL() | |||
| # ------------------ | |||
| # --------------------- | |||
| AC_DEFUN([LOL_AC_CHECK_OPENGL], | |||
| [ | |||
| ac_cv_my_have_glew="no" | |||
| if test "${enable_gl}" != "no"; then | |||
| LOL_AC_CHECK_OPENGL_INNER() | |||
| fi | |||
| AM_CONDITIONAL(LOL_USE_GLEW, test "${ac_cv_my_have_glew}" != "no") | |||
| ]) | |||
| # LOL_AC_CHECK_OPENGL_INNER() | |||
| # --------------------------- | |||
| AC_DEFUN([LOL_AC_CHECK_OPENGL_INNER], | |||
| [ | |||
| dnl Find which version of OpenGL to use | |||
| ac_cv_my_have_gl="no" | |||
| ac_cv_my_stop_looking_for_gl="no" | |||
| @@ -106,7 +117,6 @@ if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then | |||
| fi | |||
| dnl Use Glew? | |||
| ac_cv_my_have_glew="no" | |||
| PKG_CHECK_MODULES(GLEW, glew, | |||
| [ac_cv_my_have_glew="yes" | |||
| GL_CFLAGS="${GLEW_CFLAGS} ${GL_CFLAGS}" | |||
| @@ -128,7 +138,6 @@ if test "${ac_cv_my_have_glew}" != "no"; then | |||
| AC_DEFINE(HAVE_GLES_2X, 1, Define to 1 if GLES 2.x is available) | |||
| AC_DEFINE(LOL_USE_GLEW, 1, Define to 1 to use libglew) | |||
| fi | |||
| AM_CONDITIONAL(LOL_USE_GLEW, test "${ac_cv_my_have_glew}" != "no") | |||
| dnl Poor man's GL feature detection if all else failed. | |||
| save_LIBS="${LIBS}" | |||
| @@ -141,6 +150,5 @@ if test "${ac_cv_my_have_gl}" = "no"; then | |||
| AC_MSG_WARN([[No OpenGL or OpenGL ES implementation found]]) | |||
| fi | |||
| ]) # LOL_AC_CHECK_OPENGL | |||
| ]) # LOL_AC_CHECK_OPENGL_INNER | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -15,13 +15,17 @@ dnl | |||
| # ------------------ | |||
| AC_DEFUN([LOL_AC_CHECK_SDL], | |||
| [ | |||
| ac_cv_my_have_sdl="no" | |||
| ac_cv_my_have_old_sdl="no" | |||
| ac_cv_my_have_sdl_image="no" | |||
| ac_cv_my_have_sdl_mixer="no" | |||
| if test "${enable_sdl}" != "no"; then | |||
| LOL_AC_CHECK_SDL_INNER() | |||
| fi | |||
| AM_CONDITIONAL(LOL_USE_SDL, test "x${ac_cv_my_have_sdl}" = xyes) | |||
| AM_CONDITIONAL(LOL_USE_SDL_MIXER, test "x${ac_cv_my_have_sdl_mixer}" = xyes) | |||
| AM_CONDITIONAL(LOL_USE_SDL_IMAGE, test "x${ac_cv_my_have_sdl_image}" = xyes) | |||
| AM_CONDITIONAL(LOL_USE_OLD_SDL, test "x${ac_cv_my_have_old_sdl}" = xyes) | |||
| AM_CONDITIONAL(LOL_USE_SDL, test "${ac_cv_my_have_sdl}" != "no") | |||
| AM_CONDITIONAL(LOL_USE_SDL_MIXER, test "${ac_cv_my_have_sdl_mixer}" != "no") | |||
| AM_CONDITIONAL(LOL_USE_SDL_IMAGE, test "${ac_cv_my_have_sdl_image}" != "no") | |||
| AM_CONDITIONAL(LOL_USE_OLD_SDL, test "${ac_cv_my_have_old_sdl}" != "no") | |||
| ]) | |||
| # LOL_AC_CHECK_SDL_INNER() | |||
| @@ -47,11 +51,6 @@ dnl Generated shell variables: | |||
| dnl SDL_CFLAGS -- flags for SDL compilation | |||
| dnl SDL_LIBS -- flags for SDL linking | |||
| ac_cv_my_have_sdl="no" | |||
| ac_cv_my_have_old_sdl="no" | |||
| ac_cv_my_have_sdl_image="no" | |||
| ac_cv_my_have_sdl_mixer="no" | |||
| dnl First, try the proper pkg-config check for SDL2 | |||
| @@ -1,7 +1,7 @@ | |||
| dnl | |||
| dnl Lol Engine | |||
| dnl | |||
| dnl Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| dnl Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| dnl | |||
| dnl Lol Engine is free software. It comes without any warranty, to | |||
| dnl the extent permitted by applicable law. You can redistribute it | |||
| @@ -80,6 +80,8 @@ AC_ARG_ENABLE(experimental, | |||
| AC_ARG_ENABLE(subproject, | |||
| [ --enable-subproject build as a subproject (default no)]) | |||
| AC_ARG_ENABLE(gl, | |||
| [ --enable-gl build using OpenGL or OpenGL ES (default autodetected)]) | |||
| AC_ARG_ENABLE(ffmpeg, | |||
| [ --enable-ffmpeg build using FFmpeg (default autodetected)]) | |||
| AC_ARG_ENABLE(sdl, | |||
| @@ -12,6 +12,9 @@ | |||
| #include <lol/engine-internal.h> | |||
| // FIXME: fine-tune this define | |||
| #if defined LOL_USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLES_2X | |||
| #include "lolgl.h" | |||
| namespace lol | |||
| @@ -391,3 +394,5 @@ void Framebuffer::Unbind() | |||
| } /* namespace lol */ | |||
| #endif | |||
| @@ -1,15 +1,20 @@ | |||
| // | |||
| // Lol Engine | |||
| // Lol Engine | |||
| // | |||
| // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net> | |||
| // This program is free software; you can redistribute it and/or | |||
| // modify it under the terms of the Do What The Fuck You Want To | |||
| // Public License, Version 2, as published by Sam Hocevar. See | |||
| // http://www.wtfpl.net/ for more details. | |||
| // Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||
| // See http://www.wtfpl.net/ for more details. | |||
| // | |||
| #include <lol/engine-internal.h> | |||
| // FIXME: fine-tune this define | |||
| #if defined LOL_USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLES_2X | |||
| #include "lolgl.h" | |||
| namespace lol | |||
| @@ -99,3 +104,5 @@ void IndexBuffer::Unbind() | |||
| } /* namespace lol */ | |||
| #endif | |||
| @@ -1,7 +1,7 @@ | |||
| // | |||
| // Lol Engine | |||
| // | |||
| // Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| // Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| @@ -22,6 +22,9 @@ | |||
| # undef far /* Fuck Microsoft again */ | |||
| #endif | |||
| // FIXME: fine-tune this define | |||
| #if defined LOL_USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLES_2X | |||
| #include "lolgl.h" | |||
| namespace lol | |||
| @@ -592,3 +595,5 @@ vec4 Renderer::GetScissorRect() const | |||
| } /* namespace lol */ | |||
| #endif | |||
| @@ -1,7 +1,7 @@ | |||
| // | |||
| // Lol Engine | |||
| // | |||
| // Copyright © 2010—2015 Sam Hocevar <sam@hocevar.net> | |||
| // Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| @@ -25,6 +25,9 @@ | |||
| #include "lolgl.h" | |||
| // FIXME: fine-tune this define | |||
| #if defined LOL_USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLES_2X | |||
| namespace lol | |||
| { | |||
| @@ -1066,3 +1069,5 @@ void ShaderBuilder::Build(String& code) | |||
| } /* namespace lol */ | |||
| #endif | |||
| @@ -1,17 +1,22 @@ | |||
| // | |||
| // Lol Engine | |||
| // Lol Engine | |||
| // | |||
| // Copyright: (c) 2010-2013 Sam Hocevar <sam@hocevar.net> | |||
| // This program is free software; you can redistribute it and/or | |||
| // modify it under the terms of the Do What The Fuck You Want To | |||
| // Public License, Version 2, as published by Sam Hocevar. See | |||
| // http://www.wtfpl.net/ for more details. | |||
| // Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| // and/or modify it under the terms of the Do What the Fuck You Want | |||
| // to Public License, Version 2, as published by the WTFPL Task Force. | |||
| // See http://www.wtfpl.net/ for more details. | |||
| // | |||
| #include <lol/engine-internal.h> | |||
| #include "lolgl.h" | |||
| // FIXME: fine-tune this define | |||
| #if defined LOL_USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLES_2X | |||
| namespace lol | |||
| { | |||
| @@ -176,3 +181,5 @@ Texture::~Texture() | |||
| } /* namespace lol */ | |||
| #endif | |||
| @@ -1,7 +1,7 @@ | |||
| // | |||
| // Lol Engine | |||
| // | |||
| // Copyright © 2010—2016 Sam Hocevar <sam@hocevar.net> | |||
| // Copyright © 2010—2017 Sam Hocevar <sam@hocevar.net> | |||
| // | |||
| // Lol Engine is free software. It comes without any warranty, to | |||
| // the extent permitted by applicable law. You can redistribute it | |||
| @@ -14,6 +14,9 @@ | |||
| #include "lolgl.h" | |||
| // FIXME: fine-tune this define | |||
| #if defined LOL_USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLES_2X | |||
| namespace lol | |||
| { | |||
| @@ -389,3 +392,5 @@ void VertexBuffer::Unlock() | |||
| } /* namespace lol */ | |||
| #endif | |||