Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removed glutapplication class and references #195

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ endif()
# Platform-independent (almost) application libraries
if(NOT CORRADE_TARGET_NACL AND NOT CORRADE_TARGET_ANDROID)
option(WITH_GLFWAPPLICATION "Build GlfwApplication library")
cmake_dependent_option(WITH_GLUTAPPLICATION "Build GlutApplication library" OFF "NOT TARGET_GLES" OFF)
option(WITH_SDL2APPLICATION "Build Sdl2Application library" OFF)
endif()

Expand Down
2 changes: 0 additions & 2 deletions CREDITS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Not mentioning OpenGL API and platform-specific toolkits.
Weber, licensed under [MIT license](https://raw.githubusercontent.com/ginkgo/flextGL/master/COPYING)
* The `Audio` namespace depends on the **OpenAL** API --
http://www.openal.org.
* The `Platform::GlutApplication` class uses **freeGLUT** library --
http://freeglut.sourceforge.net/, licensed under MIT license.
* The `Platform::Sdl2Application` class uses **SDL2** library --
https://www.libsdl.org/, licensed under [ZLIB license](http://www.gzip.org/zlib/zlib_license.html)

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ Graphics APIs:
Platforms:

* **Linux** and embedded Linux (natively using GLX/EGL and Xlib or through
SDL2, GLFW or GLUT toolkit) [![Build Status](https://travis-ci.org/mosra/magnum.svg?branch=master)](https://travis-ci.org/mosra/magnum) [![Coverage Status](https://coveralls.io/repos/github/mosra/magnum/badge.svg?branch=master)](https://coveralls.io/github/mosra/magnum?branch=master)
* **Windows** on both MSVC and MinGW, natively or using ANGLE (through SDL2, GLFW or GLUT toolkit) [![Build Status](https://ci.appveyor.com/api/projects/status/5b477m034cfaskse/branch/master?svg=true)](https://ci.appveyor.com/project/mosra/magnum/branch/master)
SDL2 or GLFW toolkit) [![Build Status](https://travis-ci.org/mosra/magnum.svg?branch=master)](https://travis-ci.org/mosra/magnum) [![Coverage Status](https://coveralls.io/repos/github/mosra/magnum/badge.svg?branch=master)](https://coveralls.io/github/mosra/magnum?branch=master)
* **Windows** on both MSVC and MinGW, natively or using ANGLE (through SDL2 or GLFW toolkit) [![Build Status](https://ci.appveyor.com/api/projects/status/5b477m034cfaskse/branch/master?svg=true)](https://ci.appveyor.com/project/mosra/magnum/branch/master)
* **OS X** (through SDL2 or GLFW toolkit) [![Build Status](https://travis-ci.org/mosra/magnum.svg?branch=master)](https://travis-ci.org/mosra/magnum)
* **iOS** (through SDL2 toolkit) [![Build Status](https://travis-ci.org/mosra/magnum.svg?branch=master)](https://travis-ci.org/mosra/magnum)
* **Android** 2.3 (API Level 9) and higher [![Build Status](https://travis-ci.org/mosra/magnum.svg?branch=master)](https://travis-ci.org/mosra/magnum)
Expand Down
3 changes: 1 addition & 2 deletions doc/building.dox
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ platform best:

- `WITH_ANDROIDAPPLICATION` - @ref Platform::AndroidApplication "AndroidApplication"
- `WITH_GLFWAPPLICATION` - @ref Platform::GlfwApplication "GlfwApplication"
- `WITH_GLUTAPPLICATION` - @ref Platform::GlutApplication "GlutApplication"
- `WITH_GLXAPPLICATION` - @ref Platform::GlxApplication "GlxApplication"
- `WITH_NACLAPPLICATION` - @ref Platform::NaClApplication "NaClApplication"
- `WITH_SDL2APPLICATION` - @ref Platform::Sdl2Application "Sdl2Application"
Expand Down Expand Up @@ -687,7 +686,7 @@ replace `localhost:8080` with your server name, replace `update-job` with
java -jar ~/jenkins-cli.jar -s http://localhost:8080 update-job Magnum-GLTests < package/ci/jenkins-gltests.xml

Build is done using **Ninja** build system and everything possible is enabled,
thus you need also **SDL2**, **GLFW**, **GLUT** and **OpenAL** libraries. It
thus you need also **SDL2**, **GLFW** and **OpenAL** libraries. It
expects that **GCC** >= 4.9, 4.8, 4.7 and **Clang** are installed and there
are **OpenGL**, **OpenGL ES 2.0** and **OpenGL ES 3.0** librares as it tries to
compile the library with every combination of them. You can add/remove the axes
Expand Down
1 change: 0 additions & 1 deletion doc/cmake.dox
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,6 @@ The optional components are:
Platform namespace is split into more components:

- `GlfwApplication` -- @ref Platform::GlfwApplication "GlfwApplication"
- `GlutApplication` -- @ref Platform::GlutApplication "GlutApplication"
- `GlxApplication` -- @ref Platform::GlxApplication "GlxApplication"
- `NaClApplication` -- @ref Platform::NaClApplication "NaClApplication"
- `Sdl2Application` -- @ref Platform::Sdl2Application "Sdl2Application"
Expand Down
11 changes: 2 additions & 9 deletions doc/getting-started.dox
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,6 @@ contains only the essential files. Download the branch [as an archive](https://g
and extract it somewhere. Do it rather than cloning the full repository, as
it's better to init your own repository from scratch with clean history.

If you want to (or have to) use GLUT instead of SDL2, download the `base-glut`
branch [archive](https://github.com/mosra/magnum-bootstrap/archive/base-glut.zip)
instead of `base` branch. The code will be slightly different from what is
presented below, but the changes are only minor (two modified lines) and the
main principles are the same.

@section getting-started-download Download, build and install Corrade and Magnum

Magnum libraries support both separate compilation/installation and CMake
Expand Down Expand Up @@ -76,9 +70,8 @@ add_subdirectory(src)

If you want to install Corrade and Magnum separately instead of cloning them
into your project tree, just follow @ref building "the full installation guide".
Don't forget to enable `WITH_SDL2APPLICATION` (or `WITH_GLUTAPPLICATION`, if
you are using GLUT) when building Magnum so the bootstrap project can use it
later.
Don't forget to enable `WITH_SDL2APPLICATION` when building Magnum so the bootstrap
project can use it later.

@section getting-started-review Review project structure

Expand Down
4 changes: 2 additions & 2 deletions doc/mainpage.dox
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ Graphics APIs:
Platforms:

- **Linux** and embedded Linux (natively using GLX/EGL and Xlib or through
SDL2, GLFW or GLUT toolkit)
- **Windows** using both MSVC and MinGW, natively or using ANGLE (through SDL2, GLFW or GLUT toolkit)
SDL2 or GLFW toolkit)
- **Windows** using both MSVC and MinGW, natively or using ANGLE (through SDL2 or GLFW toolkit)
- **OS X**, **iOS** (through SDL2 or GLFW toolkit)
- **Android** 2.3 (API Level 9) and higher
- **Windows RT** (Store/Phone) using ANGLE (through SDL2 toolkit)
Expand Down
13 changes: 2 additions & 11 deletions modules/FindMagnum.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
# Text - Text library
# TextureTools - TextureTools library
# GlfwApplication - GLFW application
# GlutApplication - GLUT application
# GlxApplication - GLX application
# NaClApplication - NaCl application
# Sdl2Application - SDL2 application
Expand Down Expand Up @@ -79,7 +78,7 @@
#
# Example usage with specifying additional components is::
#
# find_package(Magnum REQUIRED MeshTools Primitives GlutApplication)
# find_package(Magnum REQUIRED MeshTools Primitives GlxApplication)
#
# For each component is then defined:
#
Expand Down Expand Up @@ -385,7 +384,7 @@ endif()

# Component distinction (listing them explicitly to avoid mistakes with finding
# components from other repositories)
set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|AndroidApplication|GlfwApplication|GlutApplication|GlxApplication|NaClApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessEglApplication|WindowlessGlxApplication|WindowlessIosApplication|WindowlessNaClApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext|OpenGLTester)$")
set(_MAGNUM_LIBRARY_COMPONENTS "^(Audio|DebugTools|MeshTools|Primitives|SceneGraph|Shaders|Shapes|Text|TextureTools|AndroidApplication|GlfwApplication|GlxApplication|NaClApplication|Sdl2Application|XEglApplication|WindowlessCglApplication|WindowlessEglApplication|WindowlessGlxApplication|WindowlessIosApplication|WindowlessNaClApplication|WindowlessWglApplication|WindowlessWindowsEglApplication|CglContext|EglContext|GlxContext|WglContext|OpenGLTester)$")
set(_MAGNUM_PLUGIN_COMPONENTS "^(MagnumFont|MagnumFontConverter|ObjImporter|TgaImageConverter|TgaImporter|WavAudioImporter)$")
set(_MAGNUM_EXECUTABLE_COMPONENTS "^(distancefieldconverter|fontconverter|imageconverter|info|al-info)$")

Expand Down Expand Up @@ -519,14 +518,6 @@ foreach(_component ${Magnum_FIND_COMPONENTS})
set_property(TARGET Magnum::${_component} APPEND PROPERTY
INTERFACE_LINK_LIBRARIES GLFW::GLFW)

# GLUT application dependencies
elseif(_component STREQUAL GlutApplication)
find_package(GLUT)
set_property(TARGET Magnum::${_component} APPEND PROPERTY
INTERFACE_INCLUDE_DIRECTORIES ${GLUT_INCLUDE_DIR})
set_property(TARGET Magnum::${_component} APPEND PROPERTY
INTERFACE_LINK_LIBRARIES ${GLUT_glut_LIBRARY})

# SDL2 application dependencies
elseif(_component STREQUAL Sdl2Application)
find_package(SDL2)
Expand Down
3 changes: 1 addition & 2 deletions package/archlinux/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgdesc="C++11/C++14 and OpenGL 2D/3D graphics engine"
arch=('i686' 'x86_64')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('corrade' 'openal' 'freeglut' 'sdl2' 'glfw')
depends=('corrade' 'openal' 'sdl2' 'glfw')
makedepends=('cmake' 'ninja')
options=('!strip')
provides=('magnum-git')
Expand All @@ -26,7 +26,6 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
3 changes: 1 addition & 2 deletions package/archlinux/PKGBUILD-clang
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgdesc="C++11/C++14 and OpenGL 2D/3D graphics engine (built with clang)"
arch=('i686' 'x86_64')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('corrade' 'openal' 'freeglut' 'sdl2' 'glfw')
depends=('corrade' 'openal' 'sdl2' 'glfw')
makedepends=('cmake' 'clang' 'ninja')
options=('!strip')
provides=('magnum-git')
Expand All @@ -29,7 +29,6 @@ build() {
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
Expand Down
3 changes: 1 addition & 2 deletions package/archlinux/PKGBUILD-clang-libc++
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgdesc="C++11/C++14 and OpenGL 2D/3D graphics engine (built with clang and libc
arch=('i686' 'x86_64')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('corrade' 'openal' 'freeglut' 'sdl2' 'glfw' 'libc++')
depends=('corrade' 'openal' 'sdl2' 'glfw' 'libc++')
makedepends=('cmake' 'clang' 'ninja')
options=('!strip')
provides=('magnum-git')
Expand All @@ -32,7 +32,6 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
3 changes: 1 addition & 2 deletions package/archlinux/PKGBUILD-gcc47
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgdesc="C++11/C++14 and OpenGL 2D/3D graphics engine (built with GCC 4.7)"
arch=('i686' 'x86_64')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('corrade' 'openal' 'freeglut' 'sdl2' 'glfw')
depends=('corrade' 'openal' 'sdl2' 'glfw')
makedepends=('cmake' 'ninja' 'gcc47')
options=('!strip')
provides=('magnum-git')
Expand Down Expand Up @@ -34,7 +34,6 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
4 changes: 1 addition & 3 deletions package/archlinux/PKGBUILD-mingw-w64
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgdesc="C++11/C++14 and OpenGL 2D/3D graphics engine (mingw-w64)"
arch=('any')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('mingw-w64-crt' 'mingw-w64-corrade' 'mingw-w64-freeglut' 'mingw-w64-sdl2' 'mingw-w64-openal')
depends=('mingw-w64-crt' 'mingw-w64-corrade' 'mingw-w64-sdl2' 'mingw-w64-openal')
makedepends=('mingw-w64-gcc' 'cmake' 'ninja' 'corrade')
options=('!buildflags' '!strip')

Expand All @@ -21,7 +21,6 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/i686-w64-mingw32 \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_WINDOWLESSWGLAPPLICATION=ON \
-DWITH_WGLCONTEXT=ON \
Expand Down Expand Up @@ -50,7 +49,6 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32 \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_WINDOWLESSWGLAPPLICATION=ON \
-DWITH_WGLCONTEXT=ON \
Expand Down
4 changes: 1 addition & 3 deletions package/archlinux/PKGBUILD-release
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ pkgdesc="C++11/C++14 and OpenGL 2D/3D graphics engine (debug+release libs)"
arch=('i686' 'x86_64')
url="http://mosra.cz/blog/magnum.php"
license=('MIT')
depends=('corrade' 'openal' 'freeglut' 'sdl2' 'glfw')
depends=('corrade' 'openal' 'sdl2' 'glfw')
makedepends=('cmake' 'ninja')
options=('!strip')
provides=('magnum-git')
Expand All @@ -22,7 +22,6 @@ build() {
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down Expand Up @@ -53,7 +52,6 @@ build() {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
1 change: 0 additions & 1 deletion package/ci/jenkins-clang-analyzer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ scan-build --use-c++=$(which clang++) cmake .. \
${gl_flags} \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
1 change: 0 additions & 1 deletion package/ci/jenkins-clang-sanitizer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ cmake .. \
${gl_flags} \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
1 change: 0 additions & 1 deletion package/ci/jenkins-mingw-w64.xml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ cmake .. \
-DBUILD_DEPRECATED=${deprecated_build_flag} \
${static_build_flag} \
-DWITH_AUDIO=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_WINDOWLESSWGLAPPLICATION=ON \
-DWITH_WGLCONTEXT=ON \
Expand Down
1 change: 0 additions & 1 deletion package/ci/jenkins.xml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ cmake .. \
${gl_flags} \
-DWITH_AUDIO=ON \
-DWITH_GLFWAPPLICATION=ON \
-DWITH_GLUTAPPLICATION=ON \
-DWITH_GLXAPPLICATION=ON \
-DWITH_SDL2APPLICATION=ON \
-DWITH_XEGLAPPLICATION=ON \
Expand Down
33 changes: 1 addition & 32 deletions src/Magnum/Platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ set(MagnumPlatform_FILES )
install(FILES ${MagnumPlatform_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform)

# Decide about platform-specific context for cross-platform toolkits
if(WITH_GLFWAPPLICATION OR WITH_GLUTAPPLICATION OR WITH_SDL2APPLICATION)
if(WITH_GLFWAPPLICATION OR WITH_SDL2APPLICATION)
if(CORRADE_TARGET_APPLE AND NOT MAGNUM_TARGET_GLES)
set(NEED_CGLCONTEXT 1)
set(MagnumSomeContext_OBJECTS $<TARGET_OBJECTS:MagnumCglContextObjects>)
Expand Down Expand Up @@ -129,37 +129,6 @@ if(WITH_GLFWAPPLICATION)
add_library(Magnum::GlfwApplication ALIAS MagnumGlfwApplication)
endif()

# GLUT application
if(WITH_GLUTAPPLICATION)
find_package(GLUT)
if(NOT GLUT_FOUND)
message(FATAL_ERROR "GLUT library, required by GlutApplication, was not found. Set WITH_GLUTAPPLICATION to OFF to skip building it.")
endif()

set(MagnumGlutApplication_SRCS
GlutApplication.cpp
${MagnumSomeContext_OBJECTS})
set(MagnumGlutApplication_HEADERS GlutApplication.h)

add_library(MagnumGlutApplication STATIC
${MagnumGlutApplication_SRCS}
${MagnumGlutApplication_HEADERS})
set_target_properties(MagnumGlutApplication PROPERTIES DEBUG_POSTFIX "-d")
# Assuming that PIC is not needed because the Application lib is always
# linked to the executable and not to any intermediate shared lib
target_include_directories(MagnumGlutApplication PUBLIC ${GLUT_INCLUDE_DIR})
target_link_libraries(MagnumGlutApplication Magnum ${GLUT_glut_LIBRARY})

install(FILES ${MagnumGlutApplication_HEADERS} DESTINATION ${MAGNUM_INCLUDE_INSTALL_DIR}/Platform)
install(TARGETS MagnumGlutApplication
RUNTIME DESTINATION ${MAGNUM_BINARY_INSTALL_DIR}
LIBRARY DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR}
ARCHIVE DESTINATION ${MAGNUM_LIBRARY_INSTALL_DIR})

# Magnum GlutApplication target alias for superprojects
add_library(Magnum::GlutApplication ALIAS MagnumGlutApplication)
endif()

# SDL2 application
if(WITH_SDL2APPLICATION)
find_package(SDL2)
Expand Down
Loading