Skip to content

Commit

Permalink
Merge pull request #97 from adam-ce/main
Browse files Browse the repository at this point in the history
instanced drawing + some gui improvements
  • Loading branch information
adam-ce authored Mar 16, 2024
2 parents 8e8cdc0 + 8926e70 commit 1cc8b69
Show file tree
Hide file tree
Showing 91 changed files with 1,636 additions and 933 deletions.
1 change: 0 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,5 +70,4 @@ jobs:
run: |
./build/alp_external/radix/unittests/unittests_radix.exe
./build/unittests/unittests_nucleus.exe
./build/unittests/unittests_gl_engine.exe
Empty file removed .gitmodules
Empty file.
5 changes: 3 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ option(ALP_ENABLE_THREAD_SANITIZER "compiles atb with thread sanitizer enabled (
option(ALP_ENABLE_ASSERTS "enable asserts (do not define NDEBUG)" ON)
option(ALP_ENABLE_TRACK_OBJECT_LIFECYCLE "enables debug cmd printout of constructors & deconstructors if implemented" OFF)
option(ALP_ENABLE_APP_SHUTDOWN_AFTER_60S "Shuts down the app after 60S, used for CI testing with asan." OFF)
option(ALP_ENABLE_LTO "Enable link time optimisation." OFF)

set(ALP_EXTERN_DIR "extern" CACHE STRING "name of the directory to store external libraries, fonts etc..")

Expand Down Expand Up @@ -75,7 +76,7 @@ if (ALP_USE_LLVM_LINKER)
endif()

########################################### dependencies #################################################
find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Network Quick QuickControls2 LinguistTools Svg)
find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL Network Quick QuickControls2 LinguistTools)
if (ALP_ENABLE_DEBUG_GUI)
find_package(Qt6 REQUIRED COMPONENTS Widgets Charts)
endif()
Expand All @@ -88,7 +89,7 @@ endif()

include(cmake/alp_add_git_repository.cmake)
alp_add_git_repository(renderer_static_data URL https://github.com/AlpineMapsOrg/renderer_static_data.git COMMITISH v23.11 DO_NOT_ADD_SUBPROJECT)
alp_add_git_repository(alpineapp_fonts URL https://github.com/AlpineMapsOrg/fonts.git COMMITISH v23.11 DO_NOT_ADD_SUBPROJECT)
alp_add_git_repository(alpineapp_fonts URL https://github.com/AlpineMapsOrg/fonts.git COMMITISH v24.02 DO_NOT_ADD_SUBPROJECT)
alp_add_git_repository(doc URL https://github.com/AlpineMapsOrg/documentation.git COMMITISH origin/main DO_NOT_ADD_SUBPROJECT DESTINATION_PATH doc)


Expand Down
114 changes: 2 additions & 112 deletions COPYRIGHT_NOTICES
Original file line number Diff line number Diff line change
@@ -1,118 +1,12 @@
This software includes code from:
- https://github.com/adobe-fonts/source-sans
- https://github.com/nocnokneo/cmake-git-versioning-example
- https://github.com/mourner/suncalc
- https://github.com/frankencode/FluxColor

Following are the corresponding licenses:

###############################################################################


https://github.com/adobe-fonts/source-sans

###############################################################################

Copyright 2010-2022 Adobe (http://www.adobe.com/), with Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of Adobe in the United States and/or other countries.

This Font Software is licensed under the SIL Open Font License, Version 1.1.

This license is copied below, and is also available with a FAQ at: http://scripts.sil.org/OFL


-----------------------------------------------------------
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
-----------------------------------------------------------

PREAMBLE
The goals of the Open Font License (OFL) are to stimulate worldwide
development of collaborative font projects, to support the font creation
efforts of academic and linguistic communities, and to provide a free and
open framework in which fonts may be shared and improved in partnership
with others.

The OFL allows the licensed fonts to be used, studied, modified and
redistributed freely as long as they are not sold by themselves. The
fonts, including any derivative works, can be bundled, embedded,
redistributed and/or sold with any software provided that any reserved
names are not used by derivative works. The fonts and derivatives,
however, cannot be released under any other type of license. The
requirement for fonts to remain under this license does not apply
to any document created using the fonts or their derivatives.

DEFINITIONS
"Font Software" refers to the set of files released by the Copyright
Holder(s) under this license and clearly marked as such. This may
include source files, build scripts and documentation.

"Reserved Font Name" refers to any names specified as such after the
copyright statement(s).

"Original Version" refers to the collection of Font Software components as
distributed by the Copyright Holder(s).

"Modified Version" refers to any derivative made by adding to, deleting,
or substituting -- in part or in whole -- any of the components of the
Original Version, by changing formats or by porting the Font Software to a
new environment.

"Author" refers to any designer, engineer, programmer, technical
writer or other person who contributed to the Font Software.

PERMISSION & CONDITIONS
Permission is hereby granted, free of charge, to any person obtaining
a copy of the Font Software, to use, study, copy, merge, embed, modify,
redistribute, and sell modified and unmodified copies of the Font
Software, subject to the following conditions:

1) Neither the Font Software nor any of its individual components,
in Original or Modified Versions, may be sold by itself.

2) Original or Modified Versions of the Font Software may be bundled,
redistributed and/or sold with any software, provided that each copy
contains the above copyright notice and this license. These can be
included either as stand-alone text files, human-readable headers or
in the appropriate machine-readable metadata fields within text or
binary files as long as those fields can be easily viewed by the user.

3) No Modified Version of the Font Software may use the Reserved Font
Name(s) unless explicit written permission is granted by the corresponding
Copyright Holder. This restriction only applies to the primary font name as
presented to the users.

4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
Software shall not be used to promote, endorse or advertise any
Modified Version, except to acknowledge the contribution(s) of the
Copyright Holder(s) and the Author(s) or with their explicit written
permission.

5) The Font Software, modified or unmodified, in part or in whole,
must be distributed entirely under this license, and must not be
distributed under any other license. The requirement for fonts to
remain under this license does not apply to any document created
using the Font Software.

TERMINATION
This license becomes null and void if any of the above conditions are
not met.

DISCLAIMER
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
OTHER DEALINGS IN THE FONT SOFTWARE.

###############################################################################
###############################################################################


https://github.com/nocnokneo/cmake-git-versioning-example

###############################################################################

MIT License
Expand All @@ -138,11 +32,9 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

###############################################################################
###############################################################################


###############################################################################
https://github.com/mourner/suncalc

###############################################################################

Copyright (c) 2014, Vladimir Agafonkin
Expand All @@ -169,11 +61,9 @@ TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF TH
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

###############################################################################
###############################################################################


###############################################################################
https://github.com/frankencode/FluxColor

###############################################################################

Copyright (C) 2020-2021 Frank Mertens
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://discord.gg/p8T9XzVwRa
`git clone [email protected]:AlpineMapsOrg/renderer.git`

After that it should be a normal cmake project. That is, you run cmake to generate a project or build file and then run your favourite tool. All dependencies should be pulled automatically while you run CMake.
We use Qt Creator (with mingw on Windows), which is the only tested setup atm and makes setup of Android and WebAssembly builds reasonably easy. If you have questions, please go to discord.
We use Qt Creator (with mingw on Windows), which is the only tested setup atm and makes setup of Android and WebAssembly builds reasonably easy. If you have questions, please go to Discord.

## Dependencies
* Qt 6.6.0, or greater
Expand Down
29 changes: 19 additions & 10 deletions app/About.qml
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,12 @@ Rectangle {

Rectangle {
id: about_content
width: logo.width + Math.max(alpine_text.width, maps_text.width) + 20
width: logo.width + logo_type.width + 20
color: "#00FFFFFF"
height: about_text.implicitHeight + logo.height + 20
Image { id: logo; width: 120; height: 120; source: "icons/mascot.jpg" }
Image { id: logo; width: 120; height: 120; source: _r + "icons/mascot.jpg" }
Image {
id: logo_type
anchors {
left: logo.right
top: logo.top
Expand All @@ -51,11 +52,11 @@ Rectangle {
fillMode: Image.PreserveAspectFit
width: 180
height: 120
source: "icons/logo_type_vertical.svg"
source: _r + "icons/logo_type_vertical.png"
}


Label {
Text {
id: about_text
anchors {
left: logo.left
Expand All @@ -65,13 +66,21 @@ Rectangle {
width: about_root.width - 20
wrapMode: Text.Wrap
onLinkActivated: Qt.openUrlExternally(link)
textFormat: Text.MarkdownText
text: qsTr("
This is an open source application. It is **released** under the GNU General Public License (version 3 or any later version). The source code is available on [github.com/AlpineMapsOrg/renderer](https://github.com/AlpineMapsOrg/renderer).
text: qsTr("<p>This is an open source application. It is released under the GNU General Public License (version 3 or any later version). "
+ "The source code is available on <a href=\"https://github.com/AlpineMapsOrg/renderer\">github.com/AlpineMapsOrg/renderer</a>.</p>"
+ "<p>The source of elevation and orthographic photo data is <a href=\"https://basemap.at\">basemap.at</a>, "
+ "it is licensed under the Open Government Data Austria license (CC-BY 4.0).</p>"
+ "<h3>Authors:</h3><p>Adam Celarek, Lucas Dworschak, Gerald Kimmersdorfer, Jakob Lindner</p>"
+ "<h3>Impressum:</h3><p>Adam Celarek<br />Hartmanngasse 12/22<br />1050 Wien<br />Österreich / Austria</p>")
The source of elevation and orthographic photo data is [basemap.at](https://basemap.at),
it is licensed under the Open Government Data Austria license (CC-BY 4.0).
## Authors:
Adam Celarek, Lucas Dworschak, Gerald Kimmersdorfer, Jakob Lindner
## Impressum:
Adam Celarek\\
Hartmanngasse 12/22\\
1050 Wien\\
Österreich / Austria")
}
}
}
Expand Down
75 changes: 27 additions & 48 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -69,73 +69,52 @@ qt_add_qml_module(alpineapp
components/FluxColor/HueWheel.qml
components/FluxColor/WheelArea.qml
RESOURCES
icons/mascot.jpg
icons/menu.svg
icons/peak.svg
icons/search.svg
icons/favicon.ico
icons/icon.svg
icons/material/monitoring.svg
icons/material/3d_rotation.svg
icons/material/map.svg
icons/material/pin_drop.svg
icons/material/settings.svg
icons/material/info.svg
icons/material/format_paint.svg
icons/material/location_searching.svg
icons/material/my_location.svg
icons/material/navigation.svg
icons/material/navigation_offset.svg
icons/material/chevron_left.svg
icons/material/visibility_off.svg
icons/mascot.jpg
icons/menu.png
icons/search.png
icons/icon.png
icons/material/monitoring.png
icons/material/3d_rotation.png
icons/material/map.png
icons/material/pin_drop.png
icons/material/settings.png
icons/material/info.png
icons/material/format_paint.png
icons/material/location_searching.png
icons/material/my_location.png
icons/material/navigation.png
icons/material/navigation_offset.png
icons/material/chevron_left.png
icons/material/visibility_off.png
icons/presets/basic.png
icons/presets/shaded.png
icons/presets/snow.png
icons/needle_head_down.svg
icons/logo_type_horizontal.svg
icons/logo_type_vertical.svg
icons/logo_type_horizontal_short.svg

icons/needle_head_down.png
icons/logo_type_horizontal.png
icons/logo_type_vertical.png
icons/logo_type_horizontal_short.png
)

qt_add_resources(alpineapp "height_data"
PREFIX "/map"
BASE ${renderer_static_data_SOURCE_DIR}
FILES ${renderer_static_data_SOURCE_DIR}/height_data.atb
qt_add_resources(alpineapp "fonts"
BASE ${alpineapp_fonts_SOURCE_DIR}/
PREFIX "/fonts"
FILES
${alpineapp_fonts_SOURCE_DIR}/Roboto/Roboto-Regular.ttf
)

qt_add_translations(alpineapp TS_FILES
i18n/de.ts
i18n/en.ts
)

qt_add_resources(alpineapp "fonts"
BASE ${alpineapp_fonts_SOURCE_DIR}/SourceSans/
PREFIX "/fonts"
FILES
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-BlackIt.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-BoldIt.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-ExtraLightIt.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-It.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-Light.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-Medium.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-SemiboldIt.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-Black.ttf
${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-Bold.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-ExtraLight.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-LightIt.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-MediumIt.ttf
${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-Regular.ttf
# ${alpineapp_fonts_SOURCE_DIR}/SourceSans/SourceSans3-Semibold.ttf
)


set_target_properties(alpineapp PROPERTIES
QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android
)
target_link_libraries(alpineapp PUBLIC gl_engine Qt::Quick Qt::QuickControls2)
if (ALP_ENABLE_DEBUG_GUI)
message(WARNING building alpine app with debug gui)
message(WARNING "building alpine app with debug gui")
qt_target_qml_sources(alpineapp QML_FILES StatsWindow.qml)
target_link_libraries(alpineapp PUBLIC Qt::Charts Qt::Widgets)
target_compile_definitions(alpineapp PUBLIC ALP_ENABLE_DEBUG_GUI)
Expand Down
Loading

0 comments on commit 1cc8b69

Please sign in to comment.