Use upstream GLEW, remove duplication in deps and src
Also update glew to 2.2 where NOGDI is properly unset before windows.h is included. This was a patch in our copy of GLEW 1.13
This commit is contained in:
parent
e50a408e2e
commit
41397f90a4
@ -482,16 +482,7 @@ if (SLIC3R_STATIC AND NOT SLIC3R_STATIC_EXCLUDE_GLEW)
|
|||||||
set(GLEW_VERBOSE ON)
|
set(GLEW_VERBOSE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(GLEW)
|
find_package(GLEW REQUIRED)
|
||||||
if (NOT TARGET GLEW::GLEW)
|
|
||||||
message(STATUS "GLEW not found, using bundled version.")
|
|
||||||
add_library(glew STATIC ${LIBDIR}/glew/src/glew.c)
|
|
||||||
set(GLEW_FOUND TRUE)
|
|
||||||
set(GLEW_INCLUDE_DIRS ${LIBDIR}/glew/include/)
|
|
||||||
target_compile_definitions(glew PUBLIC GLEW_STATIC)
|
|
||||||
target_include_directories(glew PUBLIC ${GLEW_INCLUDE_DIRS})
|
|
||||||
add_library(GLEW::GLEW ALIAS glew)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# Find the Cereal serialization library
|
# Find the Cereal serialization library
|
||||||
find_package(cereal REQUIRED)
|
find_package(cereal REQUIRED)
|
||||||
|
@ -1,351 +1,20 @@
|
|||||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
set(_q "")
|
||||||
# file Copyright.txt or https://cmake.org/licensing for details.
|
if(GLEW_FIND_QUIETLY)
|
||||||
|
set(_q QUIET)
|
||||||
# PrusaSlicer specifics:
|
|
||||||
# This file is backported from CMake 3.15 distribution to behave uniformly
|
|
||||||
# across all versions of CMake. It explicitly adds GLEW_STATIC complile
|
|
||||||
# definition to static targets which is needed to prevent link errors.
|
|
||||||
|
|
||||||
#[=======================================================================[.rst:
|
|
||||||
FindGLEW
|
|
||||||
--------
|
|
||||||
|
|
||||||
Find the OpenGL Extension Wrangler Library (GLEW)
|
|
||||||
|
|
||||||
Input Variables
|
|
||||||
^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
The following variables may be set to influence this module’s behavior:
|
|
||||||
|
|
||||||
``GLEW_USE_STATIC_LIBS``
|
|
||||||
to find and create :prop_tgt:`IMPORTED` target for static linkage.
|
|
||||||
|
|
||||||
``GLEW_VERBOSE``
|
|
||||||
to output a detailed log of this module.
|
|
||||||
|
|
||||||
Imported Targets
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
This module defines the following :ref:`Imported Targets <Imported Targets>`:
|
|
||||||
|
|
||||||
|
|
||||||
``GLEW::glew``
|
|
||||||
The GLEW shared library.
|
|
||||||
``GLEW::glew_s``
|
|
||||||
The GLEW static library, if ``GLEW_USE_STATIC_LIBS`` is set to ``TRUE``.
|
|
||||||
``GLEW::GLEW``
|
|
||||||
Duplicates either ``GLEW::glew`` or ``GLEW::glew_s`` based on availability.
|
|
||||||
|
|
||||||
Result Variables
|
|
||||||
^^^^^^^^^^^^^^^^
|
|
||||||
|
|
||||||
This module defines the following variables:
|
|
||||||
|
|
||||||
``GLEW_INCLUDE_DIRS``
|
|
||||||
include directories for GLEW
|
|
||||||
``GLEW_LIBRARIES``
|
|
||||||
libraries to link against GLEW
|
|
||||||
``GLEW_SHARED_LIBRARIES``
|
|
||||||
libraries to link against shared GLEW
|
|
||||||
``GLEW_STATIC_LIBRARIES``
|
|
||||||
libraries to link against static GLEW
|
|
||||||
``GLEW_FOUND``
|
|
||||||
true if GLEW has been found and can be used
|
|
||||||
``GLEW_VERSION``
|
|
||||||
GLEW version
|
|
||||||
``GLEW_VERSION_MAJOR``
|
|
||||||
GLEW major version
|
|
||||||
``GLEW_VERSION_MINOR``
|
|
||||||
GLEW minor version
|
|
||||||
``GLEW_VERSION_MICRO``
|
|
||||||
GLEW micro version
|
|
||||||
|
|
||||||
#]=======================================================================]
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
|
|
||||||
find_package(GLEW CONFIG QUIET)
|
|
||||||
|
|
||||||
if(GLEW_FOUND)
|
|
||||||
find_package_handle_standard_args(GLEW DEFAULT_MSG GLEW_CONFIG)
|
|
||||||
return()
|
|
||||||
endif()
|
endif()
|
||||||
|
find_package(GLEW ${GLEW_FIND_VERSION} CONFIG ${_q})
|
||||||
|
|
||||||
if(GLEW_VERBOSE)
|
if(NOT GLEW_FIND_QUIETLY)
|
||||||
message(STATUS "FindGLEW: did not find GLEW CMake config file. Searching for libraries.")
|
if (NOT GLEW_FOUND)
|
||||||
endif()
|
message(STATUS "Falling back to MODULE search for GLEW...")
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
find_package(OpenGL QUIET)
|
|
||||||
|
|
||||||
if(OpenGL_FOUND)
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: Found OpenGL Framework.")
|
|
||||||
message(STATUS "FindGLEW: OPENGL_LIBRARIES: ${OPENGL_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
else()
|
else()
|
||||||
if(GLEW_VERBOSE)
|
message(STATUS "GLEW found in ${GLEW_DIR}")
|
||||||
message(STATUS "FindGLEW: could not find GLEW library.")
|
|
||||||
endif()
|
|
||||||
return()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
function(__glew_set_find_library_suffix shared_or_static)
|
|
||||||
if((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "SHARED")
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".so" PARENT_SCOPE)
|
|
||||||
elseif((UNIX AND NOT APPLE) AND "${shared_or_static}" MATCHES "STATIC")
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
|
|
||||||
elseif(APPLE AND "${shared_or_static}" MATCHES "SHARED")
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".dylib;.so" PARENT_SCOPE)
|
|
||||||
elseif(APPLE AND "${shared_or_static}" MATCHES "STATIC")
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE)
|
|
||||||
elseif(WIN32 AND "${shared_or_static}" MATCHES "SHARED")
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" PARENT_SCOPE)
|
|
||||||
elseif(WIN32 AND "${shared_or_static}" MATCHES "STATIC")
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib;.a;.dll.a" PARENT_SCOPE)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: CMAKE_FIND_LIBRARY_SUFFIXES for ${shared_or_static}: ${CMAKE_FIND_LIBRARY_SUFFIXES}")
|
|
||||||
endif()
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
if(DEFINED GLEW_USE_STATIC_LIBS)
|
|
||||||
message(STATUS "FindGLEW: GLEW_USE_STATIC_LIBS: ${GLEW_USE_STATIC_LIBS}.")
|
|
||||||
else()
|
|
||||||
message(STATUS "FindGLEW: GLEW_USE_STATIC_LIBS is undefined. Treated as FALSE.")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_path(GLEW_INCLUDE_DIR GL/glew.h)
|
|
||||||
mark_as_advanced(GLEW_INCLUDE_DIR)
|
|
||||||
|
|
||||||
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR})
|
|
||||||
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: GLEW_INCLUDE_DIR: ${GLEW_INCLUDE_DIR}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_INCLUDE_DIRS: ${GLEW_INCLUDE_DIRS}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if("${CMAKE_GENERATOR_PLATFORM}" MATCHES "x64" OR "${CMAKE_GENERATOR}" MATCHES "Win64")
|
|
||||||
set(_arch "x64")
|
|
||||||
else()
|
|
||||||
set(_arch "Win32")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
set(__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
|
||||||
|
|
||||||
__glew_set_find_library_suffix(SHARED)
|
|
||||||
|
|
||||||
find_library(GLEW_SHARED_LIBRARY_RELEASE
|
|
||||||
NAMES GLEW glew glew32
|
|
||||||
PATH_SUFFIXES lib lib64 libx32 lib/Release/${_arch}
|
|
||||||
PATHS ENV GLEW_ROOT)
|
|
||||||
|
|
||||||
find_library(GLEW_SHARED_LIBRARY_DEBUG
|
|
||||||
NAMES GLEWd glewd glew32d
|
|
||||||
PATH_SUFFIXES lib lib64
|
|
||||||
PATHS ENV GLEW_ROOT)
|
|
||||||
|
|
||||||
|
|
||||||
__glew_set_find_library_suffix(STATIC)
|
|
||||||
|
|
||||||
find_library(GLEW_STATIC_LIBRARY_RELEASE
|
|
||||||
NAMES GLEW glew glew32s
|
|
||||||
PATH_SUFFIXES lib lib64 libx32 lib/Release/${_arch}
|
|
||||||
PATHS ENV GLEW_ROOT)
|
|
||||||
|
|
||||||
find_library(GLEW_STATIC_LIBRARY_DEBUG
|
|
||||||
NAMES GLEWds glewd glewds glew32ds
|
|
||||||
PATH_SUFFIXES lib lib64
|
|
||||||
PATHS ENV GLEW_ROOT)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ${__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES})
|
|
||||||
unset(__GLEW_CURRENT_FIND_LIBRARY_SUFFIXES)
|
|
||||||
|
|
||||||
include(SelectLibraryConfigurations)
|
|
||||||
|
|
||||||
select_library_configurations(GLEW_SHARED)
|
|
||||||
select_library_configurations(GLEW_STATIC)
|
|
||||||
|
|
||||||
if(NOT GLEW_USE_STATIC_LIBS)
|
|
||||||
set(GLEW_LIBRARIES ${GLEW_SHARED_LIBRARY})
|
|
||||||
else()
|
|
||||||
set(GLEW_LIBRARIES ${GLEW_STATIC_LIBRARY})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: GLEW_SHARED_LIBRARY_RELEASE: ${GLEW_SHARED_LIBRARY_RELEASE}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_STATIC_LIBRARY_RELEASE: ${GLEW_STATIC_LIBRARY_RELEASE}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_SHARED_LIBRARY_DEBUG: ${GLEW_SHARED_LIBRARY_DEBUG}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_STATIC_LIBRARY_DEBUG: ${GLEW_STATIC_LIBRARY_DEBUG}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_SHARED_LIBRARY: ${GLEW_SHARED_LIBRARY}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_STATIC_LIBRARY: ${GLEW_STATIC_LIBRARY}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_LIBRARIES: ${GLEW_LIBRARIES}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
# Read version from GL/glew.h file
|
|
||||||
if(EXISTS "${GLEW_INCLUDE_DIR}/GL/glew.h")
|
|
||||||
file(STRINGS "${GLEW_INCLUDE_DIR}/GL/glew.h" _contents REGEX "^VERSION_.+ [0-9]+")
|
|
||||||
if(_contents)
|
|
||||||
string(REGEX REPLACE ".*VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" GLEW_VERSION_MAJOR "${_contents}")
|
|
||||||
string(REGEX REPLACE ".*VERSION_MINOR[ \t]+([0-9]+).*" "\\1" GLEW_VERSION_MINOR "${_contents}")
|
|
||||||
string(REGEX REPLACE ".*VERSION_MICRO[ \t]+([0-9]+).*" "\\1" GLEW_VERSION_MICRO "${_contents}")
|
|
||||||
set(GLEW_VERSION "${GLEW_VERSION_MAJOR}.${GLEW_VERSION_MINOR}.${GLEW_VERSION_MICRO}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: GLEW_VERSION_MAJOR: ${GLEW_VERSION_MAJOR}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_VERSION_MINOR: ${GLEW_VERSION_MINOR}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_VERSION_MICRO: ${GLEW_VERSION_MICRO}")
|
|
||||||
message(STATUS "FindGLEW: GLEW_VERSION: ${GLEW_VERSION}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
find_package_handle_standard_args(GLEW
|
|
||||||
REQUIRED_VARS GLEW_INCLUDE_DIRS GLEW_LIBRARIES
|
|
||||||
VERSION_VAR GLEW_VERSION)
|
|
||||||
|
|
||||||
if (NOT GLEW_FOUND)
|
if (NOT GLEW_FOUND)
|
||||||
if(GLEW_VERBOSE)
|
set(_modpath ${CMAKE_MODULE_PATH})
|
||||||
message(STATUS "FindGLEW: could not find GLEW library.")
|
set(CMAKE_MODULE_PATH "")
|
||||||
endif()
|
include(FindGLEW)
|
||||||
return()
|
set(CMAKE_MODULE_PATH ${_modpath})
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
if(NOT TARGET GLEW::glew AND NOT GLEW_USE_STATIC_LIBS)
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: Creating GLEW::glew imported target.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(GLEW::glew UNKNOWN IMPORTED)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew
|
|
||||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
|
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
set_target_properties(GLEW::glew
|
|
||||||
PROPERTIES INTERFACE_LINK_LIBRARIES OpenGL::GL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_SHARED_LIBRARY_RELEASE)
|
|
||||||
set_property(TARGET GLEW::glew
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew
|
|
||||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_SHARED_LIBRARY_RELEASE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_SHARED_LIBRARY_DEBUG)
|
|
||||||
set_property(TARGET GLEW::glew
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew
|
|
||||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_SHARED_LIBRARY_DEBUG}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
elseif(NOT TARGET GLEW::glew_s AND GLEW_USE_STATIC_LIBS)
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: Creating GLEW::glew_s imported target.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(GLEW::glew_s UNKNOWN IMPORTED)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew_s
|
|
||||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew_s PROPERTIES INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC)
|
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
set_target_properties(GLEW::glew_s
|
|
||||||
PROPERTIES INTERFACE_LINK_LIBRARIES OpenGL::GL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_STATIC_LIBRARY_RELEASE)
|
|
||||||
set_property(TARGET GLEW::glew_s
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew_s
|
|
||||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_STATIC_LIBRARY_RELEASE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_STATIC_LIBRARY_DEBUG)
|
|
||||||
set_property(TARGET GLEW::glew_s
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::glew_s
|
|
||||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_STATIC_LIBRARY_DEBUG}")
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(NOT TARGET GLEW::GLEW)
|
|
||||||
if(GLEW_VERBOSE)
|
|
||||||
message(STATUS "FindGLEW: Creating GLEW::GLEW imported target.")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(GLEW::GLEW UNKNOWN IMPORTED)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::GLEW
|
|
||||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}")
|
|
||||||
|
|
||||||
if(APPLE)
|
|
||||||
set_target_properties(GLEW::GLEW
|
|
||||||
PROPERTIES INTERFACE_LINK_LIBRARIES OpenGL::GL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(TARGET GLEW::glew)
|
|
||||||
if(GLEW_SHARED_LIBRARY_RELEASE)
|
|
||||||
set_property(TARGET GLEW::GLEW
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::GLEW
|
|
||||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_SHARED_LIBRARY_RELEASE}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_SHARED_LIBRARY_DEBUG)
|
|
||||||
set_property(TARGET GLEW::GLEW
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::GLEW
|
|
||||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_SHARED_LIBRARY_DEBUG}")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
elseif(TARGET GLEW::glew_s)
|
|
||||||
if(GLEW_STATIC_LIBRARY_RELEASE)
|
|
||||||
set_property(TARGET GLEW::GLEW
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::GLEW
|
|
||||||
PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_STATIC_LIBRARY_RELEASE}"
|
|
||||||
INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(GLEW_STATIC_LIBRARY_DEBUG AND GLEW_USE_STATIC_LIBS)
|
|
||||||
set_property(TARGET GLEW::GLEW
|
|
||||||
APPEND
|
|
||||||
PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
|
|
||||||
|
|
||||||
set_target_properties(GLEW::GLEW
|
|
||||||
PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_STATIC_LIBRARY_DEBUG}"
|
|
||||||
INTERFACE_COMPILE_DEFINITIONS GLEW_STATIC)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
elseif(GLEW_VERBOSE)
|
|
||||||
message(WARNING "FindGLEW: no `GLEW::glew` or `GLEW::glew_s` target was created. Something went wrong in FindGLEW target creation.")
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
6
deps/GLEW/GLEW.cmake
vendored
6
deps/GLEW/GLEW.cmake
vendored
@ -4,7 +4,11 @@ find_package(OpenGL QUIET REQUIRED)
|
|||||||
|
|
||||||
prusaslicer_add_cmake_project(
|
prusaslicer_add_cmake_project(
|
||||||
GLEW
|
GLEW
|
||||||
SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/glew
|
URL https://sourceforge.net/projects/glew/files/glew/2.2.0/glew-2.2.0.zip
|
||||||
|
URL_HASH SHA256=a9046a913774395a095edcc0b0ac2d81c3aacca61787b39839b941e9be14e0d4
|
||||||
|
SOURCE_SUBDIR build/cmake
|
||||||
|
CMAKE_ARGS
|
||||||
|
-DBUILD_UTILS=OFF
|
||||||
)
|
)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
33
deps/GLEW/glew/CMakeLists.txt
vendored
33
deps/GLEW/glew/CMakeLists.txt
vendored
@ -1,33 +0,0 @@
|
|||||||
cmake_minimum_required(VERSION 3.0)
|
|
||||||
project(GLEW)
|
|
||||||
|
|
||||||
find_package(OpenGL REQUIRED)
|
|
||||||
|
|
||||||
add_library(glew src/glew.c)
|
|
||||||
target_include_directories(glew PRIVATE include/)
|
|
||||||
target_link_libraries(glew PUBLIC OpenGL::GL)
|
|
||||||
|
|
||||||
if (NOT BUILD_SHARED_LIBS)
|
|
||||||
target_compile_definitions(glew PUBLIC GLEW_STATIC)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
|
||||||
|
|
||||||
install(
|
|
||||||
FILES
|
|
||||||
${PROJECT_SOURCE_DIR}/include/GL/glew.h
|
|
||||||
${PROJECT_SOURCE_DIR}/include/GL/wglew.h
|
|
||||||
${PROJECT_SOURCE_DIR}/include/GL/glxew.h
|
|
||||||
DESTINATION
|
|
||||||
${CMAKE_INSTALL_INCLUDEDIR}/GL
|
|
||||||
)
|
|
||||||
|
|
||||||
add_library(GLEW INTERFACE)
|
|
||||||
target_link_libraries(GLEW INTERFACE glew)
|
|
||||||
|
|
||||||
install(TARGETS glew GLEW
|
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
|
||||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
|
||||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
|
||||||
)
|
|
73
deps/GLEW/glew/LICENSE.txt
vendored
73
deps/GLEW/glew/LICENSE.txt
vendored
@ -1,73 +0,0 @@
|
|||||||
The OpenGL Extension Wrangler Library
|
|
||||||
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
|
|
||||||
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
|
|
||||||
Copyright (C) 2002, Lev Povalahev
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* The name of the author may be used to endorse or promote products
|
|
||||||
derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
||||||
THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
Mesa 3-D graphics library
|
|
||||||
Version: 7.0
|
|
||||||
|
|
||||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2007 The Khronos Group Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and/or associated documentation files (the
|
|
||||||
"Materials"), to deal in the Materials without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
|
||||||
permit persons to whom the Materials are furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Materials.
|
|
||||||
|
|
||||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
|
196
deps/GLEW/glew/README.md
vendored
196
deps/GLEW/glew/README.md
vendored
@ -1,196 +0,0 @@
|
|||||||
THIS IS NOT THE COMPLETE GLEW DISTRIBUTION. ONLY FILES NEEDED FOR COMPILING GLEW INTO SLIC3R WERE PUT INTO THE SLIC3R SOURCE DISTRIBUTION.
|
|
||||||
|
|
||||||
A CMAKE CONFIG EXPORT IS ADDED TO ENABLE FIND PACKAGE TO FIND DEBUG BUILD ON MSVC
|
|
||||||
|
|
||||||
# GLEW - The OpenGL Extension Wrangler Library
|
|
||||||
|
|
||||||
![](http://glew.sourceforge.net/glew.png)
|
|
||||||
|
|
||||||
http://glew.sourceforge.net/
|
|
||||||
|
|
||||||
https://github.com/nigels-com/glew
|
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
|
|
||||||
[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
|
||||||
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
|
|
||||||
|
|
||||||
## Downloads
|
|
||||||
|
|
||||||
Current release is [2.0.0](https://sourceforge.net/projects/glew/files/glew/2.0.0/).
|
|
||||||
[(Change Log)](http://glew.sourceforge.net/log.html)
|
|
||||||
|
|
||||||
Sources available as
|
|
||||||
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.zip/download) or
|
|
||||||
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0.tgz/download).
|
|
||||||
|
|
||||||
Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.0.0/glew-2.0.0-win32.zip/download).
|
|
||||||
|
|
||||||
### Recent snapshots
|
|
||||||
|
|
||||||
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
|
|
||||||
|
|
||||||
[glew-20160708.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160708.tgz/download)
|
|
||||||
*GLEW 2.0.0 RC: Core context, EGL support, no MX*
|
|
||||||
|
|
||||||
[glew-20160402.tgz](http://sourceforge.net/projects/glew/files/glew/snapshots/glew-20160402.tgz/download)
|
|
||||||
*GLEW 2.0.0 RC: Core context, EGL support, no MX*
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
From a downloaded tarball or zip archive:
|
|
||||||
|
|
||||||
### Linux and Mac
|
|
||||||
|
|
||||||
#### Using GNU Make
|
|
||||||
|
|
||||||
##### Install build tools
|
|
||||||
|
|
||||||
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev libosmesa-dev git`
|
|
||||||
|
|
||||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git`
|
|
||||||
|
|
||||||
##### Build
|
|
||||||
|
|
||||||
$ make
|
|
||||||
$ sudo make install
|
|
||||||
$ make clean
|
|
||||||
|
|
||||||
Targets: `all, glew.lib, glew.bin, clean, install, uninstall`
|
|
||||||
|
|
||||||
Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
|
|
||||||
|
|
||||||
#### Using cmake
|
|
||||||
|
|
||||||
*CMake 2.8.12 or higher is required.*
|
|
||||||
|
|
||||||
##### Install build tools
|
|
||||||
|
|
||||||
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libXmu-dev libXi-dev libgl-dev git cmake`
|
|
||||||
|
|
||||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel git cmake`
|
|
||||||
|
|
||||||
##### Build
|
|
||||||
|
|
||||||
$ cd build
|
|
||||||
$ cmake ./cmake
|
|
||||||
$ make -j4
|
|
||||||
|
|
||||||
| Target | Description |
|
|
||||||
| ---------- | ----------- |
|
|
||||||
| glew | Build the glew shared library. |
|
|
||||||
| glew_s | Build the glew static library. |
|
|
||||||
| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
|
|
||||||
| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
|
|
||||||
| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
|
|
||||||
| clean | Clean up build artifacts. |
|
|
||||||
| all | Build all enabled targets (default target). |
|
|
||||||
|
|
||||||
| Variables | Description |
|
|
||||||
| --------------- | ----------- |
|
|
||||||
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
|
|
||||||
| GLEW_REGAL | Build in Regal mode. |
|
|
||||||
| GLEW_OSMESA | Build in off-screen Mesa mode. |
|
|
||||||
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
#### Visual Studio
|
|
||||||
|
|
||||||
Use the provided Visual Studio project file in build/vc12/
|
|
||||||
|
|
||||||
Projects for vc6 and vc10 are also provided
|
|
||||||
|
|
||||||
#### MSYS/Mingw
|
|
||||||
|
|
||||||
Available from [Mingw](http://www.mingw.org/)
|
|
||||||
|
|
||||||
Requirements: bash, make, gcc
|
|
||||||
|
|
||||||
$ mingw32-make
|
|
||||||
$ mingw32-make install
|
|
||||||
$ mingw32-make install.all
|
|
||||||
|
|
||||||
Alternative toolchain: `SYSTEM=mingw-win32`
|
|
||||||
|
|
||||||
#### MSYS2/Mingw-w64
|
|
||||||
|
|
||||||
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
|
|
||||||
|
|
||||||
Requirements: bash, make, gcc
|
|
||||||
|
|
||||||
$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
|
|
||||||
$ make
|
|
||||||
$ make install
|
|
||||||
$ make install.all
|
|
||||||
|
|
||||||
Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
|
|
||||||
|
|
||||||
## glewinfo
|
|
||||||
|
|
||||||
`glewinfo` is a command-line tool useful for inspecting the capabilities of an
|
|
||||||
OpenGL implementation and GLEW support for that. Please include the output of
|
|
||||||
`glewinfo` with bug reports, as appropriate.
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
GLEW Extension Info
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
GLEW version 2.0.0
|
|
||||||
Reporting capabilities of pixelformat 3
|
|
||||||
Running on a Intel(R) HD Graphics 3000 from Intel
|
|
||||||
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
|
|
||||||
|
|
||||||
GL_VERSION_1_1: OK
|
|
||||||
---------------
|
|
||||||
|
|
||||||
GL_VERSION_1_2: OK
|
|
||||||
---------------
|
|
||||||
glCopyTexSubImage3D: OK
|
|
||||||
glDrawRangeElements: OK
|
|
||||||
glTexImage3D: OK
|
|
||||||
glTexSubImage3D: OK
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Code Generation
|
|
||||||
|
|
||||||
A Unix or Mac environment is neded for building GLEW from scratch to
|
|
||||||
include new extensions, or customize the code generation. The extension
|
|
||||||
data is regenerated from the top level source directory with:
|
|
||||||
|
|
||||||
make extensions
|
|
||||||
|
|
||||||
An alternative to generating the GLEW sources from scratch is to
|
|
||||||
download a pre-generated (unsupported) snapshot:
|
|
||||||
|
|
||||||
https://sourceforge.net/projects/glew/files/glew/snapshots/
|
|
||||||
|
|
||||||
Travis-built snapshots are also available:
|
|
||||||
|
|
||||||
https://glew.s3.amazonaws.com/index.html
|
|
||||||
|
|
||||||
## Authors
|
|
||||||
|
|
||||||
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
|
|
||||||
with bug fixes, new OpenGL extension support and new releases.
|
|
||||||
|
|
||||||
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
|
|
||||||
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
|
|
||||||
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
|
|
||||||
assisted with the design and debugging process.
|
|
||||||
|
|
||||||
The acronym GLEW originates from Aaron Lefohn.
|
|
||||||
Pasi Kärkkäinen identified and fixed several problems with
|
|
||||||
GLX and SDL. Nate Robins created the `wglinfo` utility, to
|
|
||||||
which modifications were made by Michael Wimmer.
|
|
||||||
|
|
||||||
## Copyright and Licensing
|
|
||||||
|
|
||||||
GLEW is originally derived from the EXTGL project by Lev Povalahev.
|
|
||||||
The source code is licensed under the
|
|
||||||
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
|
|
||||||
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
|
|
||||||
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
|
|
||||||
|
|
||||||
The automatic code generation scripts are released under the
|
|
||||||
[GNU GPL](http://glew.sourceforge.net/gpl.txt).
|
|
1
deps/GLEW/glew/VERSION
vendored
1
deps/GLEW/glew/VERSION
vendored
@ -1 +0,0 @@
|
|||||||
1.13.0
|
|
19753
deps/GLEW/glew/include/GL/glew.h
vendored
19753
deps/GLEW/glew/include/GL/glew.h
vendored
File diff suppressed because it is too large
Load Diff
1772
deps/GLEW/glew/include/GL/glxew.h
vendored
1772
deps/GLEW/glew/include/GL/glxew.h
vendored
File diff suppressed because it is too large
Load Diff
1456
deps/GLEW/glew/include/GL/wglew.h
vendored
1456
deps/GLEW/glew/include/GL/wglew.h
vendored
File diff suppressed because it is too large
Load Diff
18614
deps/GLEW/glew/src/glew.c
vendored
18614
deps/GLEW/glew/src/glew.c
vendored
File diff suppressed because it is too large
Load Diff
@ -1,73 +0,0 @@
|
|||||||
The OpenGL Extension Wrangler Library
|
|
||||||
Copyright (C) 2002-2007, Milan Ikits <milan ikits[]ieee org>
|
|
||||||
Copyright (C) 2002-2007, Marcelo E. Magallon <mmagallo[]debian org>
|
|
||||||
Copyright (C) 2002, Lev Povalahev
|
|
||||||
All rights reserved.
|
|
||||||
|
|
||||||
Redistribution and use in source and binary forms, with or without
|
|
||||||
modification, are permitted provided that the following conditions are met:
|
|
||||||
|
|
||||||
* Redistributions of source code must retain the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer.
|
|
||||||
* Redistributions in binary form must reproduce the above copyright notice,
|
|
||||||
this list of conditions and the following disclaimer in the documentation
|
|
||||||
and/or other materials provided with the distribution.
|
|
||||||
* The name of the author may be used to endorse or promote products
|
|
||||||
derived from this software without specific prior written permission.
|
|
||||||
|
|
||||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
||||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
||||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
||||||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
|
|
||||||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
||||||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
||||||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
||||||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
||||||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
||||||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
|
||||||
THE POSSIBILITY OF SUCH DAMAGE.
|
|
||||||
|
|
||||||
|
|
||||||
Mesa 3-D graphics library
|
|
||||||
Version: 7.0
|
|
||||||
|
|
||||||
Copyright (C) 1999-2007 Brian Paul All Rights Reserved.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and associated documentation files (the "Software"),
|
|
||||||
to deal in the Software without restriction, including without limitation
|
|
||||||
the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
|
||||||
and/or sell copies of the Software, and to permit persons to whom the
|
|
||||||
Software is furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
|
||||||
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
|
||||||
BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
||||||
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
||||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
Copyright (c) 2007 The Khronos Group Inc.
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a
|
|
||||||
copy of this software and/or associated documentation files (the
|
|
||||||
"Materials"), to deal in the Materials without restriction, including
|
|
||||||
without limitation the rights to use, copy, modify, merge, publish,
|
|
||||||
distribute, sublicense, and/or sell copies of the Materials, and to
|
|
||||||
permit persons to whom the Materials are furnished to do so, subject to
|
|
||||||
the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included
|
|
||||||
in all copies or substantial portions of the Materials.
|
|
||||||
|
|
||||||
THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
||||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
||||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
||||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
||||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
||||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
||||||
MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
|
@ -1,260 +0,0 @@
|
|||||||
THIS IS NOT THE COMPLETE GLEW DISTRIBUTION. ONLY FILES NEEDED FOR COMPILING GLEW INTO SLIC3R WERE PUT INTO THE SLIC3R SOURCE DISTRIBUTION.
|
|
||||||
|
|
||||||
# GLEW - The OpenGL Extension Wrangler Library
|
|
||||||
|
|
||||||
The OpenGL Extension Wrangler Library (GLEW) is a cross-platform open-source C/C++ extension loading library. GLEW provides efficient run-time mechanisms for determining which OpenGL extensions are supported on the target platform. OpenGL core and extension functionality is exposed in a single header file. GLEW has been tested on a variety of operating systems, including Windows, Linux, Mac OS X, FreeBSD, Irix, and Solaris.
|
|
||||||
|
|
||||||
![](http://glew.sourceforge.net/glew.png)
|
|
||||||
|
|
||||||
http://glew.sourceforge.net/
|
|
||||||
|
|
||||||
https://github.com/nigels-com/glew
|
|
||||||
|
|
||||||
[![Build Status](https://travis-ci.org/nigels-com/glew.svg?branch=master)](https://travis-ci.org/nigels-com/glew)
|
|
||||||
[![Gitter](https://badges.gitter.im/nigels-com/glew.svg)](https://gitter.im/nigels-com/glew?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)
|
|
||||||
[![Download](https://img.shields.io/sourceforge/dm/glew.svg)](https://sourceforge.net/projects/glew/files/latest/download)
|
|
||||||
|
|
||||||
## Table of Contents
|
|
||||||
|
|
||||||
* [Downloads](#downloads)
|
|
||||||
* [Recent snapshots](#recent-snapshots)
|
|
||||||
* [Build](#build)
|
|
||||||
* [Linux and Mac](#linux-and-mac)
|
|
||||||
* [Using GNU Make](#using-gnu-make)
|
|
||||||
* [Install build tools](#install-build-tools)
|
|
||||||
* [Build](#build-1)
|
|
||||||
* [Linux EGL](#linux-egl)
|
|
||||||
* [Linux OSMesa](#linux-osmesa)
|
|
||||||
* [Linux mingw-w64](#linux-mingw-w64)
|
|
||||||
* [Using cmake](#using-cmake)
|
|
||||||
* [Install build tools](#install-build-tools-1)
|
|
||||||
* [Build](#build-2)
|
|
||||||
* [Windows](#windows)
|
|
||||||
* [Visual Studio](#visual-studio)
|
|
||||||
* [MSYS/Mingw](#msysmingw)
|
|
||||||
* [MSYS2/Mingw-w64](#msys2mingw-w64)
|
|
||||||
* [glewinfo](#glewinfo)
|
|
||||||
* [Code Generation](#code-generation)
|
|
||||||
* [Authors](#authors)
|
|
||||||
* [Contributions](#contributions)
|
|
||||||
* [Copyright and Licensing](#copyright-and-licensing)
|
|
||||||
|
|
||||||
## Downloads
|
|
||||||
|
|
||||||
Current release is [2.1.0](https://sourceforge.net/projects/glew/files/glew/2.1.0/).
|
|
||||||
[(Change Log)](http://glew.sourceforge.net/log.html)
|
|
||||||
|
|
||||||
Sources available as
|
|
||||||
[ZIP](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.zip/download) or
|
|
||||||
[TGZ](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0.tgz/download).
|
|
||||||
|
|
||||||
Windows binaries for [32-bit and 64-bit](https://sourceforge.net/projects/glew/files/glew/2.1.0/glew-2.1.0-win32.zip/download).
|
|
||||||
|
|
||||||
### Recent snapshots
|
|
||||||
|
|
||||||
Snapshots may contain new features, bug-fixes or new OpenGL extensions ahead of tested, official releases.
|
|
||||||
|
|
||||||
[glew-20200115.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20200115.tgz/download) *GLEW 2.2.0 RC3: fixes*
|
|
||||||
|
|
||||||
[glew-20190928.tgz](https://sourceforge.net/projects/glew/files/glew/snapshots/glew-20190928.tgz/download) *GLEW 2.2.0 RC2: New extensions, bug fixes*
|
|
||||||
|
|
||||||
## Build
|
|
||||||
|
|
||||||
It is highly recommended to build from a tgz or zip release snapshot.
|
|
||||||
The code generation workflow is a complex brew of gnu make, perl and python, that works best on Linux or Mac.
|
|
||||||
The code generation is known to work on Windows using [MSYS2](https://www.msys2.org/).
|
|
||||||
For most end-users of GLEW the official releases are the best choice, with first class support.
|
|
||||||
|
|
||||||
### Linux and Mac
|
|
||||||
|
|
||||||
#### Using GNU Make
|
|
||||||
|
|
||||||
GNU make is the primary build system for GLEW, historically.
|
|
||||||
It includes targets for building the sources and headers, for maintenance purposes.
|
|
||||||
|
|
||||||
##### Install build tools
|
|
||||||
|
|
||||||
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev`
|
|
||||||
|
|
||||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel`
|
|
||||||
|
|
||||||
FreeBSD: `# pkg install xorg lang/gcc git cmake gmake bash python perl5`
|
|
||||||
|
|
||||||
##### Build
|
|
||||||
|
|
||||||
$ make
|
|
||||||
$ sudo make install
|
|
||||||
$ make clean
|
|
||||||
|
|
||||||
Targets: `all, glew.lib (sub-targets: glew.lib.shared, glew.lib.static), glew.bin, clean, install, uninstall`
|
|
||||||
|
|
||||||
Variables: `SYSTEM=linux-clang, GLEW_DEST=/usr/local, STRIP=`
|
|
||||||
|
|
||||||
_Note: you may need to call `make` in the **auto** folder first_
|
|
||||||
|
|
||||||
##### Linux EGL
|
|
||||||
|
|
||||||
$ sudo apt install libegl1-mesa-dev
|
|
||||||
$ make SYSTEM=linux-egl
|
|
||||||
|
|
||||||
##### Linux OSMesa
|
|
||||||
|
|
||||||
$ sudo apt install libosmesa-dev
|
|
||||||
$ make SYSTEM=linux-osmesa
|
|
||||||
|
|
||||||
##### Linux mingw-w64
|
|
||||||
|
|
||||||
$ sudo apt install mingw-w64
|
|
||||||
$ make SYSTEM=linux-mingw32
|
|
||||||
$ make SYSTEM=linux-mingw64
|
|
||||||
|
|
||||||
#### Using cmake
|
|
||||||
|
|
||||||
The cmake build is mostly contributer maintained.
|
|
||||||
Due to the multitude of use cases this is maintained on a _best effort_ basis.
|
|
||||||
Pull requests are welcome.
|
|
||||||
|
|
||||||
*CMake 2.8.12 or higher is required.*
|
|
||||||
|
|
||||||
##### Install build tools
|
|
||||||
|
|
||||||
Debian/Ubuntu/Mint: `$ sudo apt-get install build-essential libxmu-dev libxi-dev libgl-dev cmake git`
|
|
||||||
|
|
||||||
RedHat/CentOS/Fedora: `$ sudo yum install libXmu-devel libXi-devel libGL-devel cmake git`
|
|
||||||
|
|
||||||
##### Build
|
|
||||||
|
|
||||||
$ cd build
|
|
||||||
$ cmake ./cmake
|
|
||||||
$ make -j4
|
|
||||||
|
|
||||||
| Target | Description |
|
|
||||||
| ---------- | ----------- |
|
|
||||||
| glew | Build the glew shared library. |
|
|
||||||
| glew_s | Build the glew static library. |
|
|
||||||
| glewinfo | Build the `glewinfo` executable (requires `BUILD_UTILS` to be `ON`). |
|
|
||||||
| visualinfo | Build the `visualinfo` executable (requires `BUILD_UTILS` to be `ON`). |
|
|
||||||
| install | Install all enabled targets into `CMAKE_INSTALL_PREFIX`. |
|
|
||||||
| clean | Clean up build artifacts. |
|
|
||||||
| all | Build all enabled targets (default target). |
|
|
||||||
|
|
||||||
| Variables | Description |
|
|
||||||
| --------------- | ----------- |
|
|
||||||
| BUILD_UTILS | Build the `glewinfo` and `visualinfo` executables. |
|
|
||||||
| GLEW_REGAL | Build in Regal mode. |
|
|
||||||
| GLEW_OSMESA | Build in off-screen Mesa mode. |
|
|
||||||
| BUILD_FRAMEWORK | Build as MacOSX Framework. Setting `CMAKE_INSTALL_PREFIX` to `/Library/Frameworks` is recommended. |
|
|
||||||
|
|
||||||
### Windows
|
|
||||||
|
|
||||||
#### Visual Studio
|
|
||||||
|
|
||||||
Use the provided Visual Studio project file in build/vc15/
|
|
||||||
|
|
||||||
Projects for vc6, vc10, vc12 and vc14 are also provided
|
|
||||||
|
|
||||||
#### MSYS/Mingw
|
|
||||||
|
|
||||||
Available from [Mingw](http://www.mingw.org/)
|
|
||||||
|
|
||||||
Requirements: bash, make, gcc
|
|
||||||
|
|
||||||
$ mingw32-make
|
|
||||||
$ mingw32-make install
|
|
||||||
$ mingw32-make install.all
|
|
||||||
|
|
||||||
Alternative toolchain: `SYSTEM=mingw-win32`
|
|
||||||
|
|
||||||
#### MSYS2/Mingw-w64
|
|
||||||
|
|
||||||
Available from [Msys2](http://msys2.github.io/) and/or [Mingw-w64](http://mingw-w64.org/)
|
|
||||||
|
|
||||||
Requirements: bash, make, gcc
|
|
||||||
|
|
||||||
$ pacman -S gcc make mingw-w64-i686-gcc mingw-w64-x86_64-gcc
|
|
||||||
$ make
|
|
||||||
$ make install
|
|
||||||
$ make install.all
|
|
||||||
|
|
||||||
Alternative toolchain: `SYSTEM=msys, SYSTEM=msys-win32, SYSTEM=msys-win64`
|
|
||||||
|
|
||||||
## glewinfo
|
|
||||||
|
|
||||||
`glewinfo` is a command-line tool useful for inspecting the capabilities of an
|
|
||||||
OpenGL implementation and GLEW support for that. Please include `glewinfo.txt`
|
|
||||||
with bug reports, as appropriate.
|
|
||||||
|
|
||||||
---------------------------
|
|
||||||
GLEW Extension Info
|
|
||||||
---------------------------
|
|
||||||
|
|
||||||
GLEW version 2.0.0
|
|
||||||
Reporting capabilities of pixelformat 3
|
|
||||||
Running on a Intel(R) HD Graphics 3000 from Intel
|
|
||||||
OpenGL version 3.1.0 - Build 9.17.10.4229 is supported
|
|
||||||
|
|
||||||
GL_VERSION_1_1: OK
|
|
||||||
---------------
|
|
||||||
|
|
||||||
GL_VERSION_1_2: OK
|
|
||||||
---------------
|
|
||||||
glCopyTexSubImage3D: OK
|
|
||||||
glDrawRangeElements: OK
|
|
||||||
glTexImage3D: OK
|
|
||||||
glTexSubImage3D: OK
|
|
||||||
|
|
||||||
...
|
|
||||||
|
|
||||||
## Code Generation
|
|
||||||
|
|
||||||
A Unix or Mac environment is needed for building GLEW from scratch to
|
|
||||||
include new extensions, or customize the code generation. The extension
|
|
||||||
data is regenerated from the top level source directory with:
|
|
||||||
|
|
||||||
make extensions
|
|
||||||
|
|
||||||
An alternative to generating the GLEW sources from scratch is to
|
|
||||||
download a pre-generated (unsupported) snapshot:
|
|
||||||
|
|
||||||
https://sourceforge.net/projects/glew/files/glew/snapshots/
|
|
||||||
|
|
||||||
## Authors
|
|
||||||
|
|
||||||
GLEW is currently maintained by [Nigel Stewart](https://github.com/nigels-com)
|
|
||||||
with bug fixes, new OpenGL extension support and new releases.
|
|
||||||
|
|
||||||
GLEW was developed by [Milan Ikits](http://www.cs.utah.edu/~ikits/)
|
|
||||||
and [Marcelo Magallon](http://wwwvis.informatik.uni-stuttgart.de/~magallon/).
|
|
||||||
Aaron Lefohn, Joe Kniss, and Chris Wyman were the first users and also
|
|
||||||
assisted with the design and debugging process.
|
|
||||||
|
|
||||||
The acronym GLEW originates from Aaron Lefohn.
|
|
||||||
Pasi Kärkkäinen identified and fixed several problems with
|
|
||||||
GLX and SDL. Nate Robins created the `wglinfo` utility, to
|
|
||||||
which modifications were made by Michael Wimmer.
|
|
||||||
|
|
||||||
## Contributions
|
|
||||||
|
|
||||||
GLEW welcomes community contributions. Typically these are co-ordinated
|
|
||||||
via [Issues](https://github.com/nigels-com/glew/issues) or
|
|
||||||
[Pull Requests](https://github.com/nigels-com/glew/pulls) in the
|
|
||||||
GitHub web interface.
|
|
||||||
|
|
||||||
Be sure to mention platform and compiler toolchain details when filing
|
|
||||||
a bug report. The output of `glewinfo` can be quite useful for discussion
|
|
||||||
also.
|
|
||||||
|
|
||||||
Generally GLEW is usually released once a year, around the time of the Siggraph
|
|
||||||
computer graphics conference. If you're not using the current release
|
|
||||||
version of GLEW, be sure to check if the issue or bug is fixed there.
|
|
||||||
|
|
||||||
## Copyright and Licensing
|
|
||||||
|
|
||||||
GLEW is originally derived from the EXTGL project by Lev Povalahev.
|
|
||||||
The source code is licensed under the
|
|
||||||
[Modified BSD License](http://glew.sourceforge.net/glew.txt), the
|
|
||||||
[Mesa 3-D License](http://glew.sourceforge.net/mesa.txt) (MIT) and the
|
|
||||||
[Khronos License](http://glew.sourceforge.net/khronos.txt) (MIT).
|
|
||||||
|
|
||||||
The automatic code generation scripts are released under the
|
|
||||||
[GNU GPL](http://glew.sourceforge.net/gpl.txt).
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
31949
src/glew/src/glew.c
31949
src/glew/src/glew.c
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user