34 changed files with 85881 additions and 193 deletions
-
173d-viewer/3d_canvas/eda_3d_canvas.cpp
-
223d-viewer/3d_model_viewer/eda_3d_model_viewer.cpp
-
23d-viewer/3d_rendering/opengl/3d_model.cpp
-
23d-viewer/3d_rendering/opengl/render_3d_opengl.cpp
-
73d-viewer/3d_rendering/raytracing/render_3d_raytrace_gl.cpp
-
23d-viewer/common_ogl/ogl_utils.cpp
-
106CMakeLists.txt
-
2LICENSE.README
-
69cmake/FindGLEW.cmake
-
106cmake/Findepoxy.cmake
-
8cmake/FindwxWidgets.cmake
-
3common/CMakeLists.txt
-
4common/gal/CMakeLists.txt
-
2common/gal/opengl/cached_container_gpu.cpp
-
25common/gal/opengl/opengl_gal.cpp
-
2common/gal/opengl/utils.cpp
-
2include/gal/opengl/gl_utils.h
-
17include/gal/opengl/kiglew.h
-
2include/gal/opengl/opengl_compositor.h
-
2include/gal/opengl/shader.h
-
2include/gal/opengl/vertex_common.h
-
2thirdparty/CMakeLists.txt
-
21thirdparty/glew/CMakeLists.txt
-
73thirdparty/glew/LICENSE.txt
-
14thirdparty/glew/README.md
-
3093thirdparty/glew/include/GL/eglew.h
-
26554thirdparty/glew/include/GL/glew.h
-
1831thirdparty/glew/include/GL/glxew.h
-
1468thirdparty/glew/include/GL/wglew.h
-
32167thirdparty/glew/src/glew.c
-
19147thirdparty/glew/src/glewinfo.c
-
1297thirdparty/glew/src/visualinfo.c
-
1vcpkg-configuration.json
-
2vcpkg.json
@ -0,0 +1,69 @@ |
|||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying |
|||
# file Copyright.txt or https://cmake.org/licensing for details. |
|||
|
|||
#.rst: |
|||
# FindGLEW |
|||
# -------- |
|||
# |
|||
# Find the OpenGL Extension Wrangler Library (GLEW) |
|||
# |
|||
# IMPORTED Targets |
|||
# ^^^^^^^^^^^^^^^^ |
|||
# |
|||
# This module defines the :prop_tgt:`IMPORTED` target ``GLEW::GLEW``, |
|||
# if GLEW has been found. |
|||
# |
|||
# Result Variables |
|||
# ^^^^^^^^^^^^^^^^ |
|||
# |
|||
# This module defines the following variables: |
|||
# |
|||
# :: |
|||
# |
|||
# GLEW_INCLUDE_DIRS - include directories for GLEW |
|||
# GLEW_LIBRARIES - libraries to link against GLEW |
|||
# GLEW_FOUND - true if GLEW has been found and can be used |
|||
|
|||
find_path(GLEW_INCLUDE_DIR GL/glew.h) |
|||
|
|||
if(NOT GLEW_LIBRARY) |
|||
find_library(GLEW_LIBRARY_RELEASE NAMES GLEW glew32 glew glew32s PATH_SUFFIXES lib64) |
|||
find_library(GLEW_LIBRARY_DEBUG NAMES GLEWd glew32d glewd PATH_SUFFIXES lib64) |
|||
|
|||
include(SelectLibraryConfigurations) |
|||
select_library_configurations(GLEW) |
|||
endif () |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(GLEW |
|||
REQUIRED_VARS GLEW_INCLUDE_DIR GLEW_LIBRARY) |
|||
|
|||
if(GLEW_FOUND) |
|||
set(GLEW_INCLUDE_DIRS ${GLEW_INCLUDE_DIR}) |
|||
|
|||
if(NOT GLEW_LIBRARIES) |
|||
set(GLEW_LIBRARIES ${GLEW_LIBRARY}) |
|||
endif() |
|||
|
|||
if (NOT TARGET GLEW::GLEW) |
|||
add_library(GLEW::GLEW UNKNOWN IMPORTED) |
|||
set_target_properties(GLEW::GLEW PROPERTIES |
|||
INTERFACE_INCLUDE_DIRECTORIES "${GLEW_INCLUDE_DIRS}") |
|||
|
|||
if(GLEW_LIBRARY_RELEASE) |
|||
set_property(TARGET GLEW::GLEW APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE) |
|||
set_target_properties(GLEW::GLEW PROPERTIES IMPORTED_LOCATION_RELEASE "${GLEW_LIBRARY_RELEASE}") |
|||
endif() |
|||
|
|||
if(GLEW_LIBRARY_DEBUG) |
|||
set_property(TARGET GLEW::GLEW APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG) |
|||
set_target_properties(GLEW::GLEW PROPERTIES IMPORTED_LOCATION_DEBUG "${GLEW_LIBRARY_DEBUG}") |
|||
endif() |
|||
|
|||
if(NOT GLEW_LIBRARY_RELEASE AND NOT GLEW_LIBRARY_DEBUG) |
|||
set_property(TARGET GLEW::GLEW APPEND PROPERTY IMPORTED_LOCATION "${GLEW_LIBRARY}") |
|||
endif() |
|||
endif() |
|||
endif() |
|||
|
|||
mark_as_advanced(GLEW_INCLUDE_DIR) |
@ -1,106 +0,0 @@ |
|||
# SPDX-FileCopyrightText: 2014 Fredrik Höglund <fredrik@kde.org> |
|||
# SPDX-FileCopyrightText: 2020 Vlad Zahorodnii <vlad.zahorodnii@kde.org> |
|||
# |
|||
# SPDX-License-Identifier: BSD-3-Clause |
|||
|
|||
#[=======================================================================[.rst: |
|||
Findepoxy |
|||
--------- |
|||
|
|||
Try to find libepoxy on a Unix system. |
|||
|
|||
This will define the following variables: |
|||
|
|||
``epoxy_FOUND`` |
|||
True if (the requested version of) libepoxy is available |
|||
``epoxy_VERSION`` |
|||
The version of libepoxy |
|||
``epoxy_LIBRARIES`` |
|||
This should be passed to target_link_libraries() if the target is not |
|||
used for linking |
|||
``epoxy_INCLUDE_DIRS`` |
|||
This should be passed to target_include_directories() if the target is not |
|||
used for linking |
|||
``epoxy_DEFINITIONS`` |
|||
This should be passed to target_compile_options() if the target is not |
|||
used for linking |
|||
``epoxy_HAS_GLX`` |
|||
True if GLX support is available |
|||
``epoxy_HAS_EGL`` |
|||
True if EGL support is available |
|||
``epoxy_HAS_WGL`` |
|||
True if WGL support is available |
|||
|
|||
If ``epoxy_FOUND`` is TRUE, it will also define the following imported target: |
|||
|
|||
``epoxy::epoxy`` |
|||
The epoxy library |
|||
|
|||
In general we recommend using the imported target, as it is easier to use. |
|||
Bear in mind, however, that if the target is in the link interface of an |
|||
exported library, it must be made available by the package config file. |
|||
#]=======================================================================] |
|||
|
|||
find_package(PkgConfig QUIET) |
|||
pkg_check_modules(PKG_epoxy QUIET epoxy) |
|||
|
|||
set(epoxy_VERSION ${PKG_epoxy_VERSION}) |
|||
set(epoxy_DEFINITIONS ${PKG_epoxy_CFLAGS}) |
|||
|
|||
find_path(epoxy_INCLUDE_DIRS |
|||
NAMES epoxy/gl.h |
|||
HINTS ${PKG_epoxy_INCLUDEDIR} ${PKG_epoxy_INCLUDE_DIRS} |
|||
) |
|||
find_library(epoxy_LIBRARIES |
|||
NAMES epoxy |
|||
HINTS ${PKG_epoxy_LIBDIR} ${PKG_epoxy_LIBRARY_DIRS} |
|||
) |
|||
find_file(epoxy_GLX_HEADER NAMES epoxy/glx.h HINTS ${epoxy_INCLUDE_DIR}) |
|||
|
|||
if (epoxy_GLX_HEADER STREQUAL "epoxy_GLX_HEADER-NOTFOUND") |
|||
set(epoxy_HAS_GLX FALSE CACHE BOOL "whether glx is available") |
|||
else () |
|||
set(epoxy_HAS_GLX TRUE CACHE BOOL "whether glx is available") |
|||
endif() |
|||
|
|||
find_file(epoxy_EGL_HEADER NAMES epoxy/egl.h HINTS ${epoxy_INCLUDE_DIR}) |
|||
|
|||
if (epoxy_EGL_HEADER STREQUAL "epoxy_EGL_HEADER-NOTFOUND") |
|||
set(epoxy_HAS_EGL FALSE CACHE BOOL "whether egl is available") |
|||
else () |
|||
set(epoxy_HAS_EGL TRUE CACHE BOOL "whether egl is available") |
|||
endif() |
|||
|
|||
find_file(epoxy_WGL_HEADER NAMES epoxy/wgl.h HINTS ${epoxy_INCLUDE_DIR}) |
|||
|
|||
if (epoxy_WGL_HEADER STREQUAL "epoxy_WGL_HEADER-NOTFOUND") |
|||
set(epoxy_HAS_WGL FALSE CACHE BOOL "whether wgl is available") |
|||
else () |
|||
set(epoxy_HAS_WGL TRUE CACHE BOOL "whether wgl is available") |
|||
endif() |
|||
|
|||
include(FindPackageHandleStandardArgs) |
|||
find_package_handle_standard_args(epoxy |
|||
FOUND_VAR epoxy_FOUND |
|||
REQUIRED_VARS epoxy_LIBRARIES epoxy_INCLUDE_DIRS |
|||
VERSION_VAR epoxy_VERSION |
|||
) |
|||
|
|||
if (epoxy_FOUND AND NOT TARGET epoxy::epoxy) |
|||
add_library(epoxy::epoxy UNKNOWN IMPORTED) |
|||
set_target_properties(epoxy::epoxy PROPERTIES |
|||
IMPORTED_LOCATION "${epoxy_LIBRARIES}" |
|||
INTERFACE_COMPILE_OPTIONS "${epoxy_DEFINITIONS}" |
|||
INTERFACE_INCLUDE_DIRECTORIES "${epoxy_INCLUDE_DIRS}" |
|||
) |
|||
endif() |
|||
|
|||
mark_as_advanced( |
|||
epoxy_DEFINITIONS |
|||
epoxy_HAS_GLX |
|||
epoxy_HAS_EGL |
|||
epoxy_HAS_WGL |
|||
epoxy_INCLUDE_DIRS |
|||
epoxy_LIBRARIES |
|||
epoxy_VERSION |
|||
) |
@ -0,0 +1,21 @@ |
|||
add_library( glew STATIC ) |
|||
|
|||
# Mark the include directory as private so that it doesn't get used by other targets |
|||
# and is only used when building the actual library. |
|||
# The actual include directories will be added to the global include paths as |
|||
# system headers |
|||
target_include_directories( glew PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" ) |
|||
|
|||
# Definitions for compiling GLEW staticly for EGL (extracted from the main GLEW CMakeLists.txt file) |
|||
add_compile_definitions( GLEW_STATIC ) |
|||
add_compile_definitions( GLEW_EGL ) |
|||
add_compile_definitions( GLEW_NO_GLU ) |
|||
|
|||
target_sources( glew PRIVATE |
|||
${CMAKE_CURRENT_SOURCE_DIR}/src/glew.c |
|||
) |
|||
|
|||
target_link_libraries( glew PUBLIC |
|||
${OPENGL_LIBRARIES} |
|||
${OPENGL_egl_LIBRARY} |
|||
) |
@ -0,0 +1,73 @@ |
|||
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. |
@ -0,0 +1,14 @@ |
|||
This directory contains the source code and includes for the GLEW library |
|||
(https://github.com/nigels-com/glew). This library is normally dynamically |
|||
linked to KiCad on all platforms, but wxWidgets 3.1.5+ on Linux requires |
|||
GLEW compiled with EGL support and most distributions do not supply this |
|||
(since compiling GLEW for EGL is mutually exclusive with GLEW for X11). |
|||
|
|||
The source files are generated from the GLEW repo, or can be pulled from |
|||
a recent GLEW release. |
|||
|
|||
As of November 10, 2020 this GLEW version was pulled from its GitHub |
|||
repository and is what should be version upstream version 2.2.0. |
|||
|
|||
This library is licensed under BSD and MIT licenses, with the actual |
|||
license text given in the LICENSE file in this directory. |
3093
thirdparty/glew/include/GL/eglew.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
26554
thirdparty/glew/include/GL/glew.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1831
thirdparty/glew/include/GL/glxew.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1468
thirdparty/glew/include/GL/wglew.h
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
32167
thirdparty/glew/src/glew.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
19147
thirdparty/glew/src/glewinfo.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1297
thirdparty/glew/src/visualinfo.c
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
Write
Preview
Loading…
Cancel
Save
Reference in new issue