diff --git a/.gitignore b/.gitignore index e865726..b9eec73 100644 --- a/.gitignore +++ b/.gitignore @@ -1,378 +1,9 @@ -## Ignore Visual Studio temporary files, build results, and -## files generated by popular Visual Studio add-ons. -## -## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore - -# User-specific files -*.rsuser -*.suo -*.user -*.userosscache -*.sln.docstates - -# User-specific files (MonoDevelop/Xamarin Studio) -*.userprefs - -# Mono auto generated files -mono_crash.* - -# Build results -[Dd]ebug/ -[Dd]ebugPublic/ -[Rr]elease/ -[Rr]eleases/ -x64/ -x86/ -[Ww][Ii][Nn]32/ -[Aa][Rr][Mm]/ -[Aa][Rr][Mm]64/ -bld/ -[Bb]in/ -[Oo]bj/ -[Oo]ut/ -[Ll]og/ -[Ll]ogs/ - -# Visual Studio 2015/2017 cache/options directory -.vs/ -# Uncomment if you have tasks that create the project's static files in wwwroot -#wwwroot/ - -# Visual Studio 2017 auto generated files -Generated\ Files/ - -# MSTest test Results -[Tt]est[Rr]esult*/ -[Bb]uild[Ll]og.* - -# NUnit -*.VisualState.xml -TestResult.xml -nunit-*.xml - -# Build Results of an ATL Project -[Dd]ebugPS/ -[Rr]eleasePS/ -dlldata.c - -# Benchmark Results -BenchmarkDotNet.Artifacts/ - -# .NET Core -project.lock.json -project.fragment.lock.json -artifacts/ - -# ASP.NET Scaffolding -ScaffoldingReadMe.txt - -# StyleCop -StyleCopReport.xml - -# Files built by Visual Studio -*_i.c -*_p.c -*_h.h -*.ilk -*.meta -*.obj -*.iobj -*.pch -*.pdb -*.ipdb -*.pgc -*.pgd -*.rsp -*.sbr -*.tlb -*.tli -*.tlh -*.tmp -*.tmp_proj -*_wpftmp.csproj -*.log -*.vspscc -*.vssscc -.builds -*.pidb -*.svclog -*.scc - -# Chutzpah Test files -_Chutzpah* - -# Visual C++ cache files -ipch/ -*.aps -*.ncb -*.opendb -*.opensdf -*.sdf -*.cachefile -*.VC.db -*.VC.VC.opendb - -# Visual Studio profiler -*.psess -*.vsp -*.vspx -*.sap - -# Visual Studio Trace Files -*.e2e - -# TFS 2012 Local Workspace -$tf/ - -# Guidance Automation Toolkit -*.gpState - -# ReSharper is a .NET coding add-in -_ReSharper*/ -*.[Rr]e[Ss]harper -*.DotSettings.user - -# TeamCity is a build add-in -_TeamCity* - -# DotCover is a Code Coverage Tool -*.dotCover - -# AxoCover is a Code Coverage Tool -.axoCover/* -!.axoCover/settings.json - -# Coverlet is a free, cross platform Code Coverage Tool -coverage*.json -coverage*.xml -coverage*.info - -# Visual Studio code coverage results -*.coverage -*.coveragexml - -# NCrunch -_NCrunch_* -.*crunch*.local.xml -nCrunchTemp_* - -# MightyMoose -*.mm.* -AutoTest.Net/ - -# Web workbench (sass) -.sass-cache/ - -# Installshield output folder -[Ee]xpress/ - -# DocProject is a documentation generator add-in -DocProject/buildhelp/ -DocProject/Help/*.HxT -DocProject/Help/*.HxC -DocProject/Help/*.hhc -DocProject/Help/*.hhk -DocProject/Help/*.hhp -DocProject/Help/Html2 -DocProject/Help/html - -# Click-Once directory -publish/ - -# Publish Web Output -*.[Pp]ublish.xml -*.azurePubxml -# Note: Comment the next line if you want to checkin your web deploy settings, -# but database connection strings (with potential passwords) will be unencrypted -*.pubxml -*.publishproj - -# Microsoft Azure Web App publish settings. Comment the next line if you want to -# checkin your Azure Web App publish settings, but sensitive information contained -# in these scripts will be unencrypted -PublishScripts/ - -# NuGet Packages -*.nupkg -# NuGet Symbol Packages -*.snupkg -# The packages folder can be ignored because of Package Restore -**/[Pp]ackages/* -# except build/, which is used as an MSBuild target. -!**/[Pp]ackages/build/ -# Uncomment if necessary however generally it will be regenerated when needed -#!**/[Pp]ackages/repositories.config -# NuGet v3's project.json files produces more ignorable files -*.nuget.props -*.nuget.targets - -# Microsoft Azure Build Output -csx/ -*.build.csdef - -# Microsoft Azure Emulator -ecf/ -rcf/ - -# Windows Store app package directories and files -AppPackages/ -BundleArtifacts/ -Package.StoreAssociation.xml -_pkginfo.txt -*.appx -*.appxbundle -*.appxupload - -# Visual Studio cache files -# files ending in .cache can be ignored -*.[Cc]ache -# but keep track of directories ending in .cache -!?*.[Cc]ache/ - -# Others -ClientBin/ -~$* -*~ -*.dbmdl -*.dbproj.schemaview -*.jfm -*.pfx -*.publishsettings -orleans.codegen.cs - -# Including strong name files can present a security risk -# (https://github.com/github/gitignore/pull/2483#issue-259490424) -#*.snk - -# Since there are multiple workflows, uncomment next line to ignore bower_components -# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) -#bower_components/ - -# RIA/Silverlight projects -Generated_Code/ - -# Backup & report files from converting an old project file -# to a newer Visual Studio version. Backup files are not needed, -# because we have git ;-) -_UpgradeReport_Files/ -Backup*/ -UpgradeLog*.XML -UpgradeLog*.htm -ServiceFabricBackup/ -*.rptproj.bak - -# SQL Server files -*.mdf -*.ldf -*.ndf - -# Business Intelligence projects -*.rdl.data -*.bim.layout -*.bim_*.settings -*.rptproj.rsuser -*- [Bb]ackup.rdl -*- [Bb]ackup ([0-9]).rdl -*- [Bb]ackup ([0-9][0-9]).rdl - -# Microsoft Fakes -FakesAssemblies/ - -# GhostDoc plugin setting file -*.GhostDoc.xml - -# Node.js Tools for Visual Studio -.ntvs_analysis.dat -node_modules/ - -# Visual Studio 6 build log -*.plg - -# Visual Studio 6 workspace options file -*.opt - -# Visual Studio 6 auto-generated workspace file (contains which files were open etc.) -*.vbw - -# Visual Studio LightSwitch build output -**/*.HTMLClient/GeneratedArtifacts -**/*.DesktopClient/GeneratedArtifacts -**/*.DesktopClient/ModelManifest.xml -**/*.Server/GeneratedArtifacts -**/*.Server/ModelManifest.xml -_Pvt_Extensions - -# Paket dependency manager -.paket/paket.exe -paket-files/ - -# FAKE - F# Make -.fake/ - -# CodeRush personal settings -.cr/personal - -# Python Tools for Visual Studio (PTVS) -__pycache__/ -*.pyc - -# Cake - Uncomment if you are using it -# tools/** -# !tools/packages.config - -# Tabs Studio -*.tss - -# Telerik's JustMock configuration file -*.jmconfig - -# BizTalk build output -*.btp.cs -*.btm.cs -*.odx.cs -*.xsd.cs - -# OpenCover UI analysis results -OpenCover/ - -# Azure Stream Analytics local run output -ASALocalRun/ - -# MSBuild Binary and Structured Log -*.binlog - -# NVidia Nsight GPU debugger configuration file -*.nvuser - -# MFractors (Xamarin productivity tool) working folder -.mfractor/ - -# Local History for Visual Studio -.localhistory/ - -# BeatPulse healthcheck temp database -healthchecksdb - -# Backup folder for Package Reference Convert tool in Visual Studio 2017 -MigrationBackup/ - -# Ionide (cross platform F# VS Code tools) working folder -.ionide/ - -# Fody - auto-generated XML schema -FodyWeavers.xsd - # Jetbrains' .idea folder /.idea/ -/CMakeFiles/ -# Shaders / Code formatting +# Shaders / 3D Models *.spv -/.clang-format - -# Build directory unignore (.spv and .obj files) -!/build/assets/models/*.obj -!/build/assets/shaders/*.spv +*.obj # CMake binary directories /cmake-build-debug/ diff --git a/CMake/SetModuleUUID.cmake b/CMake/SetModuleUUID.cmake new file mode 100644 index 0000000..f7de12b --- /dev/null +++ b/CMake/SetModuleUUID.cmake @@ -0,0 +1,14 @@ +function(setModuleID) + set(CMAKE_CXX_SCAN_FOR_MODULES ON CACHE BOOL "" FORCE) + set(CMAKE_EXPERIMENTAL_CXX_MODULE_STD ON CACHE BOOL "" FORCE) + if(${CMAKE_VERSION} VERSION_LESS_EQUAL 3.31.7) + set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "0e5b6991-d74f-4b3d-a41c-cf096e0b2508" CACHE STRING "" FORCE) + elseif(${CMAKE_VERSION} VERSION_GREATER_EQUAL 4.0.0 AND ${CMAKE_VERSION} VERSION_LESS_EQUAL 4.0.2) + set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "a9e1cf81-9932-4810-974b-6eccaf14e457" CACHE STRING "" FORCE) + elseif(${CMAKE_VERSION} VERSION_EQUAL 3.31.8 OR ${CMAKE_VERSION} VERSION_EQUAL 4.0.3) + set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "d0edc3af-4c50-42ea-a356-e2862fe7a444" CACHE STRING "" FORCE) + else() + message(FATAL_ERROR "CMake CXX_MODULES not supported") + endif() + set(CMAKE_CXX_MODULE_STD ON CACHE BOOL "" FORCE) +endfunction() \ No newline at end of file diff --git a/CMakeLists.txt b/CMakeLists.txt index 995ae79..d130bdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,14 +1,16 @@ cmake_minimum_required(VERSION 3.30 FATAL_ERROR) set(CMAKE_CXX_STANDARD 23) -set(CMAKE_CXX_STANDARD_REQUIRED YES) -set(CMAKE_EXPERIMENTAL_CXX_MODULE_STD ON) -if(${CMAKE_VERSION} VERSION_LESS_EQUAL 3.32) - set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "0e5b6991-d74f-4b3d-a41c-cf096e0b2508") -else() - set(CMAKE_EXPERIMENTAL_CXX_IMPORT_STD "a9e1cf81-9932-4810-974b-6eccaf14e457") +set(CMAKE_CXX_STANDARD_REQUIRED ON) + +# C++20 modules +include(CMake/SetModuleUUID.cmake) +setModuleID() + +# Default build set to release +if(NOT DEFINED CMAKE_BUILD_TYPE OR CMAKE_BUILD_TYPE STREQUAL "") + set(CMAKE_BUILD_TYPE "Release" CACHE STRING "." FORCE) endif() -set(CMAKE_CXX_MODULE_STD ON) project(KaguEngine VERSION 0.0.1 LANGUAGES CXX) diff --git a/KaguEngine/CMakeLists.txt b/KaguEngine/CMakeLists.txt index 35bbc88..158c94b 100644 --- a/KaguEngine/CMakeLists.txt +++ b/KaguEngine/CMakeLists.txt @@ -4,6 +4,10 @@ file(GLOB_RECURSE CPP_MODULES src/*.ixx) # Adding the executable add_executable(KaguEngine) +# Enforces C++23 on the target +target_compile_features(KaguEngine PRIVATE cxx_std_23) + +# Add source files & modules target_sources(KaguEngine PRIVATE ${CPP_SOURCES}) target_sources(KaguEngine PRIVATE FILE_SET all_modules TYPE CXX_MODULES @@ -13,14 +17,8 @@ set_target_properties(KaguEngine PROPERTIES CXX_SCAN_FOR_MODULES ON ) -# Adding external libraries -add_subdirectory(extern/glfw) -target_include_directories(KaguEngine PRIVATE extern/glfw/include) -target_link_libraries(KaguEngine PRIVATE glfw) -target_include_directories(KaguEngine PRIVATE extern/glm) -target_include_directories(KaguEngine PRIVATE extern/stb) -target_include_directories(KaguEngine PRIVATE extern/tinyobjloader) -target_include_directories(KaguEngine PRIVATE extern/ImGuiFork) +# Third-party +add_subdirectory(extern) # Adding Vulkan find_package(Vulkan REQUIRED) @@ -31,17 +29,8 @@ endif() target_include_directories(KaguEngine PRIVATE ${Vulkan_INCLUDE_DIRS}) target_link_libraries(KaguEngine PRIVATE Vulkan::Vulkan) -# Enforces C++23 on the target -target_compile_features(KaguEngine PRIVATE cxx_std_23) - -# Set default build type to Release if not specified -if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) - set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build." FORCE) - message(STATUS "No build type specified, defaulting to Release") -endif() - -# Linker options (to disable console window in Release build) -if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel") +# Linker options (to disable console window on Windows in Release build) +if(WIN32 AND (CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "MinSizeRel")) if(MSVC) target_link_options(KaguEngine PRIVATE /SUBSYSTEM:WINDOWS /ENTRY:mainCRTStartup) else() diff --git a/KaguEngine/assets/fonts/fontawesome/LICENSE.txt b/KaguEngine/assets/fonts/fontawesome/LICENSE.txt new file mode 100644 index 0000000..e69c5e3 --- /dev/null +++ b/KaguEngine/assets/fonts/fontawesome/LICENSE.txt @@ -0,0 +1,165 @@ +Fonticons, Inc. (https://fontawesome.com) + +-------------------------------------------------------------------------------- + +Font Awesome Free License + +Font Awesome Free is free, open source, and GPL friendly. You can use it for +commercial projects, open source projects, or really almost whatever you want. +Full Font Awesome Free license: https://fontawesome.com/license/free. + +-------------------------------------------------------------------------------- + +# Icons: CC BY 4.0 License (https://creativecommons.org/licenses/by/4.0/) + +The Font Awesome Free download is licensed under a Creative Commons +Attribution 4.0 International License and applies to all icons packaged +as SVG and JS file types. + +-------------------------------------------------------------------------------- + +# Fonts: SIL OFL 1.1 License + +In the Font Awesome Free download, the SIL OFL license applies to all icons +packaged as web and desktop font files. + +Copyright (c) 2024 Fonticons, Inc. (https://fontawesome.com) +with Reserved Font Name: "Font Awesome". + +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. + +-------------------------------------------------------------------------------- + +# Code: MIT License (https://opensource.org/licenses/MIT) + +In the Font Awesome Free download, the MIT license applies to all non-font and +non-icon files. + +Copyright 2024 Fonticons, Inc. + +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 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 +SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +-------------------------------------------------------------------------------- + +# Attribution + +Attribution is required by MIT, SIL OFL, and CC BY licenses. Downloaded Font +Awesome Free files already contain embedded comments with sufficient +attribution, so you shouldn't need to do anything additional when using these +files normally. + +We've kept attribution comments terse, so we ask that you do not actively work +to remove them from files, especially code. They're a great way for folks to +learn about Font Awesome. + +-------------------------------------------------------------------------------- + +# Brand Icons + +All brand icons are trademarks of their respective owners. The use of these +trademarks does not indicate endorsement of the trademark holder by Font +Awesome, nor vice versa. **Please do not use brand logos for any purpose except +to represent the company, product, or service to which they refer.** diff --git a/KaguEngine/assets/fonts/fontawesome/fontawesome.ttf b/KaguEngine/assets/fonts/fontawesome/fontawesome.ttf new file mode 100644 index 0000000..35acda2 Binary files /dev/null and b/KaguEngine/assets/fonts/fontawesome/fontawesome.ttf differ diff --git a/KaguEngine/assets/fonts/opensans/LICENSE.txt b/KaguEngine/assets/fonts/opensans/LICENSE.txt new file mode 100644 index 0000000..cb7002a --- /dev/null +++ b/KaguEngine/assets/fonts/opensans/LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2020 The Open Sans Project Authors (https://github.com/googlefonts/opensans) + +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: +https://openfontlicense.org + + +----------------------------------------------------------- +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. diff --git a/KaguEngine/assets/fonts/opensans/OpenSans-Regular.ttf b/KaguEngine/assets/fonts/opensans/OpenSans-Regular.ttf new file mode 100644 index 0000000..705966c Binary files /dev/null and b/KaguEngine/assets/fonts/opensans/OpenSans-Regular.ttf differ diff --git a/KaguEngine/assets/fonts/roboto/LICENSE.txt b/KaguEngine/assets/fonts/roboto/LICENSE.txt new file mode 100644 index 0000000..9c48e05 --- /dev/null +++ b/KaguEngine/assets/fonts/roboto/LICENSE.txt @@ -0,0 +1,93 @@ +Copyright 2011 The Roboto Project Authors (https://github.com/googlefonts/roboto-classic) + +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: +https://openfontlicense.org + + +----------------------------------------------------------- +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. diff --git a/KaguEngine/assets/fonts/roboto/Roboto-Regular.ttf b/KaguEngine/assets/fonts/roboto/Roboto-Regular.ttf new file mode 100644 index 0000000..7e3bb2f Binary files /dev/null and b/KaguEngine/assets/fonts/roboto/Roboto-Regular.ttf differ diff --git a/KaguEngine/assets/shaders/simple_shader.frag b/KaguEngine/assets/shaders/simple_shader.frag index 2782653..563b0bb 100644 --- a/KaguEngine/assets/shaders/simple_shader.frag +++ b/KaguEngine/assets/shaders/simple_shader.frag @@ -26,8 +26,13 @@ layout(set = 0, binding = 0) uniform GlobalUbo { layout(push_constant) uniform Push { mat4 modelMatrix; mat4 normalMatrix; + float modelAlpha; } push; +vec3 srgbToLinear(vec3 srgb) { + return pow(srgb, vec3(1.0/2.2)); +} + void main() { vec3 diffuseLight = ubo.ambientLightColor.xyz * ubo.ambientLightColor.w; vec3 specularLight = vec3(0.0); @@ -56,7 +61,7 @@ void main() { blinnTerm = pow(blinnTerm, 512.0); // higher values -> sharper highlight specularLight += intensity * blinnTerm; } - - sourceColor = vec4(diffuseLight * fragColor + specularLight * fragColor, 1.0); - outColor = vec4(sourceColor.rgb * texture(texSampler, fragTexCoord).rgb, 1.0); + sourceColor = vec4(diffuseLight * fragColor + specularLight * fragColor, push.modelAlpha); + vec4 texColor = vec4(srgbToLinear(texture(texSampler, fragTexCoord).rgb), 1.0); + outColor = vec4(sourceColor * texColor); } diff --git a/KaguEngine/assets/shaders/simple_shader.frag.spv b/KaguEngine/assets/shaders/simple_shader.frag.spv index 5f2fd41..73a078d 100644 Binary files a/KaguEngine/assets/shaders/simple_shader.frag.spv and b/KaguEngine/assets/shaders/simple_shader.frag.spv differ diff --git a/KaguEngine/assets/shaders/simple_shader.vert b/KaguEngine/assets/shaders/simple_shader.vert index a0d79e6..919ec4b 100644 --- a/KaguEngine/assets/shaders/simple_shader.vert +++ b/KaguEngine/assets/shaders/simple_shader.vert @@ -27,6 +27,7 @@ layout(set = 0, binding = 0) uniform GlobalUbo { layout(push_constant) uniform Push { mat4 modelMatrix; mat4 normalMatrix; + float modelAlpha; } push; void main() { diff --git a/KaguEngine/assets/shaders/simple_shader.vert.spv b/KaguEngine/assets/shaders/simple_shader.vert.spv index 1b7f150..de20f40 100644 Binary files a/KaguEngine/assets/shaders/simple_shader.vert.spv and b/KaguEngine/assets/shaders/simple_shader.vert.spv differ diff --git a/KaguEngine/extern/CMakeLists.txt b/KaguEngine/extern/CMakeLists.txt new file mode 100644 index 0000000..6a6a6e2 --- /dev/null +++ b/KaguEngine/extern/CMakeLists.txt @@ -0,0 +1,8 @@ +# Adding external libraries +add_subdirectory(glfw) +target_include_directories(KaguEngine PRIVATE glfw/include) +target_link_libraries(KaguEngine PRIVATE glfw) +target_include_directories(KaguEngine PRIVATE glm) +target_include_directories(KaguEngine PRIVATE stb) +target_include_directories(KaguEngine PRIVATE tinyobjloader) +target_include_directories(KaguEngine PRIVATE ImGuiFork) \ No newline at end of file diff --git a/KaguEngine/extern/ImGuiFork b/KaguEngine/extern/ImGuiFork index 110839b..ee6438e 160000 --- a/KaguEngine/extern/ImGuiFork +++ b/KaguEngine/extern/ImGuiFork @@ -1 +1 @@ -Subproject commit 110839b613c87d5ab2e2afc2231ace55472888c3 +Subproject commit ee6438ed98c06a2153bec15ca9b942957875e2a5 diff --git a/KaguEngine/src/App.cpp b/KaguEngine/src/App.cpp index 7c021a1..ac33265 100644 --- a/KaguEngine/src/App.cpp +++ b/KaguEngine/src/App.cpp @@ -60,14 +60,27 @@ void App::run() { m_Renderer.getSwapChainRenderPass(), m_GlobalSetLayout->getDescriptorSetLayout() }; - ImGuiContext imGuiContext(m_Window, *m_Renderer.getSwapChain(), m_Device, m_DescriptorPool); Camera camera{}; + std::vector views; + views.reserve(2); + auto viewerObject = Entity::createEntity(); + auto otherView = Entity::createEntity(); viewerObject.transform.translation = {0.f, -0.5f, -3.f}; + otherView.transform.translation = {0.f, -1.f, -5.f}; + views.emplace_back(std::move(viewerObject)); + views.emplace_back(std::move(otherView)); + + glm::vec4 ambientLightColor = { 0.2f, 0.2f, 0.2f, 1.0f }; + ImGuiContext imGuiContext( + m_Window, *m_Renderer.getSwapChain(), m_Device, + m_DescriptorPool, + m_SceneEntities, views, camera, ambientLightColor + ); auto currentTime = std::chrono::high_resolution_clock::now(); - while (!m_Window.shouldClose()) { + while (!m_Window.shouldClose() && m_IsRunning) { KeyboardMovementController cameraController{}; glfwPollEvents(); @@ -75,11 +88,11 @@ void App::run() { float frameTime = std::chrono::duration(newTime - currentTime).count(); currentTime = newTime; - cameraController.moveInPlaneXZ(m_Window.getGLFWwindow(), frameTime, viewerObject); - camera.setViewYXZ(viewerObject.transform.translation, viewerObject.transform.rotation); + cameraController.moveInPlaneXZ(m_Window.getGLFWwindow(), frameTime, imGuiContext.getView()); + camera.setViewYXZ(imGuiContext.getView().transform.translation, imGuiContext.getView().transform.rotation); float aspect = m_Renderer.getAspectRatio(); - camera.setPerspectiveProjection(glm::radians(50.f), aspect, 0.1f, 100.f); + camera.setPerspectiveProjection(imGuiContext.getFovY(), aspect, 0.1f, imGuiContext.getDepth()); if (auto commandBuffer = m_Renderer.beginFrame()) { int frameIndex = m_Renderer.getFrameIndex(); @@ -92,6 +105,7 @@ void App::run() { ubo.projection = camera.getProjection(); ubo.view = camera.getView(); ubo.inverseView = camera.getInverseView(); + ubo.ambientLightColor = imGuiContext.getAmbientLightColor(); PointLightSystem::update(frameInfo, ubo); uboBuffers[frameIndex]->writeToBuffer(&ubo); if(uboBuffers[frameIndex]->flush() != VK_SUCCESS) @@ -109,11 +123,12 @@ void App::run() { // Present the image m_Renderer.beginSwapChainRenderPass(commandBuffer); - imGuiContext.onPresent(commandBuffer); + ImGuiContext::onPresent(commandBuffer); m_Renderer.endSwapChainRenderPass(commandBuffer); m_Renderer.endFrame(); } + m_IsRunning = imGuiContext.isRunning(); } vkDeviceWaitIdle(m_Device.device()); @@ -130,6 +145,7 @@ void App::loadGameObjects() { loadedModel = Model::createModelFromFile(m_Device, "assets/models/obamium_model.obj"); auto centralObamium = Entity::createEntity(); + centralObamium.name = "Obamium"; centralObamium.model = loadedModel; centralObamium.texture = std::move(obamiumTexture); centralObamium.material = centralObamium.texture->getMaterial(); @@ -146,6 +162,7 @@ void App::loadGameObjects() { loadedModel = Model::createModelFromFile(m_Device, "assets/models/viking_room.obj"); auto vikingRoom = Entity::createEntity(); + vikingRoom.name = "Viking Room"; vikingRoom.model = loadedModel; vikingRoom.texture = std::move(vikingRoomTexture); vikingRoom.material = vikingRoom.texture->getMaterial(); @@ -163,6 +180,7 @@ void App::loadGameObjects() { ); loadedModel = Model::createModelFromFile(m_Device, "assets/models/base.obj"); auto floor = Entity::createEntity(); + floor.name = "Base"; floor.model = loadedModel; floor.texture = std::move(dummyTexture); floor.material = floor.texture->getMaterial(); diff --git a/KaguEngine/src/App.ixx b/KaguEngine/src/App.ixx index 192055f..27541c2 100644 --- a/KaguEngine/src/App.ixx +++ b/KaguEngine/src/App.ixx @@ -18,8 +18,8 @@ export namespace KaguEngine { class App { public: - static constexpr int WIDTH = 800; - static constexpr int HEIGHT = 600; + static constexpr int WIDTH = 1600; + static constexpr int HEIGHT = 900; App() { m_GlobalSetLayout = DescriptorSetLayout::Builder(m_Device) @@ -56,6 +56,7 @@ public: private: void loadGameObjects(); + bool m_IsRunning = true; Window m_Window{WIDTH, HEIGHT, "Kagu Engine"}; Device m_Device{m_Window}; diff --git a/KaguEngine/src/Descriptor.cpp b/KaguEngine/src/Descriptor.cpp index 69848de..9f66212 100644 --- a/KaguEngine/src/Descriptor.cpp +++ b/KaguEngine/src/Descriptor.cpp @@ -159,7 +159,7 @@ DescriptorWriter &DescriptorWriter::writeImage(const uint32_t binding, const VkD } bool DescriptorWriter::build(VkDescriptorSet &set) { - if (const bool success = poolRef.allocateDescriptor(setLayoutRef.getDescriptorSetLayout(), set); !success) { + if (!poolRef.allocateDescriptor(setLayoutRef.getDescriptorSetLayout(), set)) { return false; } overwrite(set); diff --git a/KaguEngine/src/Entity.ixx b/KaguEngine/src/Entity.ixx index 1fa7fa7..9c393b8 100644 --- a/KaguEngine/src/Entity.ixx +++ b/KaguEngine/src/Entity.ixx @@ -23,6 +23,7 @@ struct TransformComponent { // https://en.wikipedia.org/wiki/Euler_angles#Rotation_matrix [[nodiscard]] glm::mat4 mat4() const; [[nodiscard]] glm::mat3 normalMatrix() const; + float alpha = 1.0f; }; struct PointLightComponent { @@ -45,6 +46,7 @@ public: Entity(const Entity &) = delete; Entity &operator=(const Entity &) = delete; Entity(Entity &&other) noexcept { + name = other.name; m_Id = other.m_Id; color = other.color; transform = other.transform; @@ -57,6 +59,7 @@ public: [[nodiscard]] id_t getId() const { return m_Id; } + std::string name; glm::vec3 color{}; TransformComponent transform{}; diff --git a/KaguEngine/src/FrameInfo.ixx b/KaguEngine/src/FrameInfo.ixx index 6345403..bfacb7f 100644 --- a/KaguEngine/src/FrameInfo.ixx +++ b/KaguEngine/src/FrameInfo.ixx @@ -22,7 +22,7 @@ struct GlobalUbo { glm::mat4 projection{1.f}; glm::mat4 view{1.f}; glm::mat4 inverseView{1.f}; - glm::vec4 ambientLightColor{1.f, 1.f, 1.f, 0.02f}; // w is intensity + glm::vec4 ambientLightColor{0.2f, 0.2f, 0.2f, 1.f}; // w is intensity PointLight pointLights[MAX_LIGHTS]; int numLights; }; diff --git a/KaguEngine/src/ImGuiContext.cpp b/KaguEngine/src/ImGuiContext.cpp index e58860b..c7daa77 100644 --- a/KaguEngine/src/ImGuiContext.cpp +++ b/KaguEngine/src/ImGuiContext.cpp @@ -1,18 +1,105 @@ module; +// libs +#include "include/font_awesome.hpp" #include "include/imgui_includes.hpp" +#include +#include module KaguEngine.ImGuiContext; +import KaguEngine.Camera; import KaguEngine.Device; +import KaguEngine.Entity; import KaguEngine.SwapChain; import KaguEngine.Renderer; import KaguEngine.Window; namespace KaguEngine { -ImGuiContext::ImGuiContext(Window &window, SwapChain &swapChain, Device &device, std::unique_ptr &pool) : - poolRef{pool}, deviceRef{device}, swapChainRef{swapChain}, windowRef{window} { +namespace UI_Helpers { + static bool DrawVec3Control(const std::string& label, glm::vec3& values, float resetValue = 0.0f, float columnWidth = 100.0f) { + bool value_changed = false; + ImGuiIO& io = ImGui::GetIO(); + auto boldFont = io.Fonts->Fonts[0]; + + ImGui::PushID(label.c_str()); + + ImGui::Columns(2); + ImGui::SetColumnWidth(0, columnWidth); + ImGui::Text("%s", label.c_str()); + ImGui::NextColumn(); + + ImGui::PushMultiItemsWidths(3, ImGui::CalcItemWidth()); + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2{ 0, 0 }); + + float lineHeight = GImGui->Font->FontSize + GImGui->Style.FramePadding.y * 2.0f; + ImVec2 buttonSize = { lineHeight + 3.0f, lineHeight }; + + // X + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4{ 0.8f, 0.1f, 0.15f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4{ 0.9f, 0.2f, 0.2f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4{ 0.8f, 0.1f, 0.15f, 1.0f }); + ImGui::PushFont(boldFont); + if (ImGui::Button("X", buttonSize)) { + values.x = resetValue; + value_changed = true; + } + ImGui::PopFont(); + ImGui::PopStyleColor(3); + + ImGui::SameLine(); + if(ImGui::DragFloat("##X", &values.x, 0.1f, 0.0f, 0.0f, "%.2f")) value_changed = true; + ImGui::PopItemWidth(); + ImGui::SameLine(); + + // Y + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4{ 0.2f, 0.7f, 0.2f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4{ 0.3f, 0.8f, 0.3f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4{ 0.2f, 0.7f, 0.2f, 1.0f }); + ImGui::PushFont(boldFont); + if (ImGui::Button("Y", buttonSize)) { + values.y = resetValue; + value_changed = true; + } + ImGui::PopFont(); + ImGui::PopStyleColor(3); + + ImGui::SameLine(); + if(ImGui::DragFloat("##Y", &values.y, 0.1f, 0.0f, 0.0f, "%.2f")) value_changed = true; + ImGui::PopItemWidth(); + ImGui::SameLine(); + + // Z + ImGui::PushStyleColor(ImGuiCol_Button, ImVec4{ 0.1f, 0.25f, 0.8f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonHovered, ImVec4{ 0.2f, 0.35f, 0.9f, 1.0f }); + ImGui::PushStyleColor(ImGuiCol_ButtonActive, ImVec4{ 0.1f, 0.25f, 0.8f, 1.0f }); + ImGui::PushFont(boldFont); + if (ImGui::Button("Z", buttonSize)) { + values.z = resetValue; + value_changed = true; + } + ImGui::PopFont(); + ImGui::PopStyleColor(3); + + ImGui::SameLine(); + if(ImGui::DragFloat("##Z", &values.z, 0.1f, 0.0f, 0.0f, "%.2f")) value_changed = true; + ImGui::PopItemWidth(); + + ImGui::PopStyleVar(); + ImGui::Columns(1); + ImGui::PopID(); + + return value_changed; + } +} + +ImGuiContext::ImGuiContext( + Window &window, SwapChain &swapChain, Device &device, + std::unique_ptr &pool, + Entity::Map& sceneEntities, std::vector& views, Camera& camera, glm::vec4& ambientLight +) : + ambientLightColor{ambientLight}, poolRef{pool}, viewsRef{views}, entitiesRef{sceneEntities}, cameraRef{camera}, deviceRef{device}, swapChainRef{swapChain}, windowRef{window} { IMGUI_CHECKVERSION(); ImGui::CreateContext(); setupConfigFlags(); @@ -42,7 +129,20 @@ void ImGuiContext::setupStyle() { style.WindowRounding = 0.0f; style.Colors[ImGuiCol_WindowBg].w = 1.0f; } + + constexpr float baseFontSize = 18.0f; + constexpr float iconFontSize = baseFontSize * 2.0f / 3.0f; + io.FontDefault = io.Fonts->AddFontFromFileTTF("assets/fonts/roboto/Roboto-Regular.ttf", baseFontSize); + ImFontConfig icons_config; + icons_config.MergeMode = true; + icons_config.PixelSnapH = true; + icons_config.GlyphMinAdvanceX = iconFontSize; + static constexpr ImWchar icons_ranges[] = { ICON_MIN_FA, ICON_MAX_16_FA, 0 }; + io.Fonts->AddFontFromFileTTF(FONT_ICON_FILE_NAME_FA, iconFontSize, &icons_config, icons_ranges); + ImGui::StyleColorsDark(); + setAppTheme(); + setStyleVars(); } void ImGuiContext::setupContext() const { @@ -62,17 +162,62 @@ void ImGuiContext::setupContext() const { init_info.MinImageCount = SwapChain::MAX_FRAMES_IN_FLIGHT; init_info.MSAASamples = deviceRef.getSampleCount(); init_info.ImageCount = SwapChain::MAX_FRAMES_IN_FLIGHT; - //init_info.CheckVkResultFn = check_vk_result; ImGui_ImplVulkan_Init(&init_info); - ImGui_ImplVulkan_CreateFontsTexture(); } -void ImGuiContext::recreateSwapChain() const { +void ImGuiContext::setAppTheme() { + ImVec4* colors = ImGui::GetStyle().Colors; + colors[ImGuiCol_WindowBg] = ImVec4(0.149f, 0.149f, 0.149f, 1.0f); + colors[ImGuiCol_Header] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f }; + colors[ImGuiCol_HeaderHovered] = ImVec4{ 0.3f, 0.305f, 0.31f, 1.0f }; + colors[ImGuiCol_HeaderActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_Button] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f }; + colors[ImGuiCol_ButtonHovered] = ImVec4{ 0.3f, 0.305f, 0.31f, 1.0f }; + colors[ImGuiCol_ButtonActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_FrameBg] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f }; + colors[ImGuiCol_FrameBgHovered] = ImVec4{ 0.3f, 0.305f, 0.31f, 1.0f }; + colors[ImGuiCol_FrameBgActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_Tab] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_TabHovered] = ImVec4{ 0.38f, 0.3805f, 0.381f, 1.0f }; + colors[ImGuiCol_TabActive] = ImVec4{ 0.28f, 0.2805f, 0.281f, 1.0f }; + colors[ImGuiCol_TabUnfocused] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_TabUnfocusedActive] = ImVec4{ 0.2f, 0.205f, 0.21f, 1.0f }; + colors[ImGuiCol_TitleBg] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_TitleBgActive] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; + colors[ImGuiCol_TitleBgCollapsed] = ImVec4{ 0.15f, 0.1505f, 0.151f, 1.0f }; +} + +void ImGuiContext::setStyleVars() { + ImGuiStyle& style = ImGui::GetStyle(); + style.WindowPadding = ImVec2(8, 8); + style.FramePadding = ImVec2(4, 4); + style.ItemSpacing = ImVec2(8, 4); + style.ItemInnerSpacing = ImVec2(4, 4); + style.IndentSpacing = 21.0f; + style.ScrollbarSize = 14.0f; + style.GrabMinSize = 12.0f; + style.WindowBorderSize = 1.0f; + style.ChildBorderSize = 1.0f; + style.PopupBorderSize = 1.0f; + style.FrameBorderSize = 0.0f; + style.WindowRounding = 0.0f; + style.ChildRounding = 0.0f; + style.FrameRounding = 0.0f; + style.PopupRounding = 2.0f; + style.ScrollbarRounding = 2.0f; + style.GrabRounding = 2.0f; + style.TabBorderSize = 0.0f; + style.TabRounding = 0.0f; + style.WindowTitleAlign = ImVec2(0.5f, 0.5f); + style.ButtonTextAlign = ImVec2(0.5f, 0.5f); +} + +void ImGuiContext::recreateSwapChain() { ImGui_ImplVulkan_SetMinImageCount(SwapChain::MAX_FRAMES_IN_FLIGHT); } -void ImGuiContext::render(Renderer& renderer) { +void ImGuiContext::render(const Renderer& renderer) { beginRender(); onRender(renderer); } @@ -83,36 +228,262 @@ void ImGuiContext::beginRender() { ImGui::NewFrame(); } -void ImGuiContext::onRender(Renderer& renderer) { - // Main viewport init +void ImGuiContext::onRender(const Renderer& renderer) { + const ImGuiViewport* viewport = setupViewport(); + const ImGuiID dockspace_id = getDockspaceID(); + + static bool dockspaceInitialized = false; + if (!dockspaceInitialized) { + initializeDockspace(dockspace_id, viewport); + dockspaceInitialized = true; + } + + // Render all UI panels + render3DScene(renderer); + renderSceneHierarchyPanel(); + renderPropertiesPanel(); + renderVisualsPanel(); + renderConsole(); +} + +ImGuiViewport* ImGuiContext::setupViewport() { ImGuiViewport* viewport = ImGui::GetMainViewport(); ImGui::SetNextWindowPos(viewport->WorkPos); ImGui::SetNextWindowSize(viewport->WorkSize); ImGui::SetNextWindowViewport(viewport->ID); + return viewport; +} +ImGuiID ImGuiContext::getDockspaceID() { constexpr ImGuiWindowFlags hostFlags = ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoNavFocus | ImGuiWindowFlags_NoBackground | ImGuiWindowFlags_NoDocking; - // Dockspace ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); ImGui::Begin("DockSpaceHost", nullptr, hostFlags); ImGuiID dockspace_id = ImGui::GetID("MyDockspace"); - ImGui::DockSpace(dockspace_id, ImVec2(0, 0), ImGuiDockNodeFlags_PassthruCentralNode); + ImGui::DockSpace(dockspace_id, ImVec2(0, 0), ImGuiDockNodeFlags_PassthruCentralNode | ImGuiDockNodeFlags_AutoHideTabBar); + drawMainMenuBar(); ImGui::End(); ImGui::PopStyleVar(); + return dockspace_id; +} - // Scene viewport +void ImGuiContext::drawMainMenuBar() { + const ImGuiIO& io = ImGui::GetIO(); + ImGui::PushStyleVarY(ImGuiStyleVar_FramePadding, 5.f); + ImGui::PushFont(io.Fonts->Fonts[0]); + if (ImGui::BeginMainMenuBar()) { + ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(12, 8)); + if (ImGui::BeginMenu((std::string(ICON_FA_FILE) + " File").c_str())) { + if (ImGui::MenuItem((std::string(ICON_FA_WINDOW_CLOSE) + " Exit").c_str(), "Ctrl+Q")) { + m_IsRunning = false; + } + ImGui::EndMenu(); + } + if (ImGui::BeginMenu((std::string(ICON_FA_TASKS) + " Window").c_str())) { + if (ImGui::BeginMenu("Theme")) { + if (ImGui::MenuItem((std::string("App Theme ") + ICON_FA_GITHUB).c_str())) {setAppTheme();setStyleVars();} + if (ImGui::MenuItem((std::string("ImGui Dark ") + ICON_FA_MOON_O).c_str())) ImGui::StyleColorsDark(); + if (ImGui::MenuItem((std::string("ImGuiLight ") + ICON_FA_SUN_O).c_str())) ImGui::StyleColorsLight(); + if (ImGui::MenuItem((std::string("ImGuiClassic ") + ICON_FA_SMILE_O).c_str())) ImGui::StyleColorsClassic(); + ImGui::EndMenu(); + } + ImGui::EndMenu(); + } + ImGui::PopStyleVar(); + ImGui::EndMainMenuBar(); + } + ImGui::PopFont(); + ImGui::PopStyleVar(); +} + +void ImGuiContext::initializeDockspace(const ImGuiID& dockspace_id, const ImGuiViewport* viewport) { + ImGui::DockBuilderRemoveNode(dockspace_id); + ImGui::DockBuilderAddNode(dockspace_id, ImGuiDockNodeFlags_DockSpace); + ImGui::DockBuilderSetNodeSize(dockspace_id, viewport->WorkSize); + + // Main dockspace: left panel and a "main" area + ImGuiID dock_id_left, dock_id_main; + ImGui::DockBuilderSplitNode(dockspace_id, ImGuiDir_Left, 0.2f, &dock_id_left, &dock_id_main); + + // "main" area: right panel and a "center" area + ImGuiID dock_id_right, dock_id_center; + ImGui::DockBuilderSplitNode(dock_id_main, ImGuiDir_Right, 0.25f, &dock_id_right, &dock_id_center); + + // "center" area: viewport on top, console on bottom + ImGuiID dock_id_viewport, dock_id_console; + ImGui::DockBuilderSplitNode(dock_id_center, ImGuiDir_Down, 0.25f, &dock_id_console, &dock_id_viewport); + + // Left panel: hierarchy on top, properties on bottom + ImGuiID dock_id_hierarchy, dock_id_properties; + ImGui::DockBuilderSplitNode(dock_id_left, ImGuiDir_Down, 0.5f, &dock_id_properties, &dock_id_hierarchy); + + // Dock windows + ImGui::DockBuilderDockWindow("Scene Hierarchy", dock_id_hierarchy); + ImGui::DockBuilderDockWindow("Properties", dock_id_properties); + ImGui::DockBuilderDockWindow("3D Scene", dock_id_viewport); + ImGui::DockBuilderDockWindow("Visuals", dock_id_right); + ImGui::DockBuilderDockWindow("Console", dock_id_console); + + ImGui::DockBuilderFinish(dockspace_id); +} + +void ImGuiContext::render3DScene(const Renderer& renderer) const { ImGui::PushStyleVar(ImGuiStyleVar_WindowPadding, ImVec2(0, 0)); - ImGui::Begin("Viewport", nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse); - ImVec2 availableSpace = ImGui::GetContentRegionAvail(); - ImGui::Image(reinterpret_cast(renderer.getOffscreenImGuiDescriptorSet()), availableSpace); + ImGui::Begin("3D Scene", nullptr, ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse); + + const float fovx = getFovX(); + const float fovy = getFovY(); + const float nativeAspect = tan(fovx / 2.0f) / tan(fovy / 2.0f); + const ImVec2 viewportSpace = ImGui::GetContentRegionAvail(); + const float viewportAspect = viewportSpace.x / viewportSpace.y; + + float idealWidth = viewportSpace.y * nativeAspect; + float idealHeight = viewportSpace.x / nativeAspect; + + ImVec2 renderSize; + if (viewportAspect > nativeAspect) { + renderSize = { viewportSpace.x, idealHeight }; + } else { + renderSize = { idealWidth, viewportSpace.y }; + } + + ImVec2 imagePos = { + (viewportSpace.x - renderSize.x) * 0.5f, + (viewportSpace.y - renderSize.y) * 0.5f + }; + ImGui::SetCursorPos(imagePos); + ImGui::Image(reinterpret_cast(renderer.getOffscreenImGuiDescriptorSet()), renderSize); + ImGui::End(); ImGui::PopStyleVar(); +} + +void ImGuiContext::renderSceneHierarchyPanel() { + ImGui::Begin("Scene Hierarchy"); + + if (ImGui::TreeNodeEx("Scene", ImGuiTreeNodeFlags_DefaultOpen)) { + for (auto& [id, entity] : entitiesRef) { + std::string name = entity.pointLight != nullptr ? std::string(ICON_FA_LIGHTBULB_O) + " Point Light " + std::to_string(id) : std::string(ICON_FA_CUBE) + " " + entity.name; + + bool is_selected = (m_SelectedEntityID == id); + if (ImGui::Selectable(name.c_str(), is_selected)) { + m_SelectedEntityID = id; + } + } + ImGui::TreePop(); + } + + // Deselect if clicking in empty space + if (ImGui::IsMouseDown(0) && ImGui::IsWindowHovered()) { + m_SelectedEntityID = std::numeric_limits::max(); + } + + ImGui::End(); +} + +void ImGuiContext::renderPropertiesPanel() { + ImGui::Begin("Properties"); + + if (m_SelectedEntityID != std::numeric_limits::max()) { + auto& entity = entitiesRef.at(m_SelectedEntityID); + + // Name + char buffer[256]; + strncpy(buffer, entity.name.c_str(), sizeof(buffer)); + if (ImGui::InputText("Name", buffer, sizeof(buffer))) { + entity.name = std::string(buffer); + } + + // Transform Component + if (ImGui::CollapsingHeader("Transform", ImGuiTreeNodeFlags_DefaultOpen)) { + UI_Helpers::DrawVec3Control("Translation", entity.transform.translation, 0.0f); + UI_Helpers::DrawVec3Control("Rotation", entity.transform.rotation, 0.0f); + UI_Helpers::DrawVec3Control("Scale", entity.transform.scale, 1.0f); + } + + // Material/Color Component + if (entity.texture == nullptr && entity.pointLight == nullptr) { + if (ImGui::CollapsingHeader("Material", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::ColorEdit3("Color", glm::value_ptr(entity.color)); + } + } + + // Point Light Component + if (entity.pointLight) { + if (ImGui::CollapsingHeader("Point Light", ImGuiTreeNodeFlags_DefaultOpen)) { + ImGui::ColorEdit3("Color", glm::value_ptr(entity.color)); + ImGui::DragFloat("Intensity", &entity.pointLight->lightIntensity, 0.1f, 0.0f, 100.0f); + } + } + } else { + ImGui::Text("Select an entity to view its properties."); + } + + ImGui::End(); +} + +void ImGuiContext::renderVisualsPanel() { + ImGui::Begin("Visuals"); + + ImGui::Text("Camera"); + ImGui::SliderInt("##Camera", &m_CamIdx, 0, 1, "View %d"); + ImGui::DragFloat("Depth", &m_MaxDepth[m_CamIdx], 1.0f, 1.0f, 100.f); + ImGui::DragFloat("FOV-X", &m_FovX[m_CamIdx], 1.0f, 30.f, 120.f); + ImGui::DragFloat("FOV-Y", &m_FovY[m_CamIdx], 1.0f, 30.f, 120.f); + + ImGui::Separator(); + + ImGui::Text("Lighting"); + ImGui::ColorEdit4("Ambient Light", glm::value_ptr(ambientLightColor)); + + ImGui::End(); +} - // Demo - ImGui::ShowDemoWindow(); +void ImGuiContext::renderConsole() { + ImGui::Begin("Console", &m_ConsoleOpened); + + if (ImGui::SmallButton("Clear")) { m_Items.clear(); } + ImGui::Separator(); + + const float footer_height_to_reserve = ImGui::GetStyle().ItemSpacing.y + ImGui::GetFrameHeightWithSpacing(); + if (ImGui::BeginChild("ScrollingRegion", ImVec2(0, -footer_height_to_reserve), false, ImGuiWindowFlags_HorizontalScrollbar)) { + ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(4, 1)); + for (auto& item : m_Items) { + ImVec4 color = { 1.0f, 1.0f, 1.0f, 1.0f }; // Default + if (strstr(item.c_str(), "[Error]")) { color = ImVec4(1.0f, 0.4f, 0.4f, 1.0f); } + else if (strstr(item.c_str(), "[Hint]")) { color = ImVec4(0.6f, 0.8f, 1.0f, 1.0f); } + else if (strstr(item.c_str(), "[Info]")) { color = ImVec4(0.7f, 0.7f, 0.7f, 1.0f); } + ImGui::PushStyleColor(ImGuiCol_Text, color); + ImGui::TextUnformatted(item.c_str()); + ImGui::PopStyleColor(); + } + + if (ImGui::GetScrollY() >= ImGui::GetScrollMaxY()) + ImGui::SetScrollHereY(1.0f); + + ImGui::PopStyleVar(); + } + ImGui::EndChild(); + ImGui::Separator(); + + bool reclaim_focus = false; + if (ImGui::InputText("Input", m_InputBuffer, IM_ARRAYSIZE(m_InputBuffer), ImGuiInputTextFlags_EnterReturnsTrue)) { + if (m_InputBuffer[0] != '\0') { + m_Items.emplace_back(std::string("> ") + m_InputBuffer); + // Command processing if needed later happens here + memset(m_InputBuffer, 0, sizeof(m_InputBuffer)); + } + reclaim_focus = true; + } + + ImGui::SetItemDefaultFocus(); + if (reclaim_focus) + ImGui::SetKeyboardFocusHere(-1); + + ImGui::End(); } void ImGuiContext::onPresent(VkCommandBuffer commandBuffer) { diff --git a/KaguEngine/src/ImGuiContext.ixx b/KaguEngine/src/ImGuiContext.ixx index 095ed85..d0106a5 100644 --- a/KaguEngine/src/ImGuiContext.ixx +++ b/KaguEngine/src/ImGuiContext.ixx @@ -1,5 +1,8 @@ module; +// libs +#include +#include #include export module KaguEngine.ImGuiContext; @@ -7,8 +10,10 @@ export module KaguEngine.ImGuiContext; // std import std; +import KaguEngine.Camera; import KaguEngine.Descriptor; import KaguEngine.Device; +import KaguEngine.Entity; import KaguEngine.SwapChain; import KaguEngine.Renderer; import KaguEngine.Window; @@ -18,25 +23,79 @@ export namespace KaguEngine { class ImGuiContext { public: - ImGuiContext(Window &window, SwapChain &swapChain, Device &device, std::unique_ptr &pool); + ImGuiContext( + Window &window, SwapChain &swapChain, Device &device, + std::unique_ptr &pool, + Entity::Map& sceneEntities, std::vector& views, Camera& camera, + glm::vec4& ambientLight + ); ~ImGuiContext(); - void recreateSwapChain() const; - void render(Renderer& renderer); - void onPresent(VkCommandBuffer commandBuffer); + static void recreateSwapChain(); + void render(const Renderer& renderer); + + static void onPresent(VkCommandBuffer commandBuffer); + + // Specs + [[nodiscard]] float getDepth() const { return m_MaxDepth[m_CamIdx]; } + [[nodiscard]] float getFovY() const { return glm::radians(m_FovY[m_CamIdx]); } // Radians + [[nodiscard]] float getFovX() const { return glm::radians(m_FovX[m_CamIdx]); } // Radians + [[nodiscard]] Entity& getView() const { return viewsRef[m_CamIdx]; } + [[nodiscard]] int getCamIdx() const { return m_CamIdx; } + [[nodiscard]] glm::vec4& getAmbientLightColor() const { return ambientLightColor; } + [[nodiscard]] bool isRunning() const { return m_IsRunning; } + + // Console + void addLog(const char* msg) { m_Items.emplace_back(msg); } private: + // --- Setup --- void setupContext() const; - void setupConfigFlags(); - void setupStyle(); - void beginRender(); - void onRender(Renderer& renderer); - void endRender(); + static void setupConfigFlags(); + static void setupStyle(); + static void setAppTheme(); + static void setStyleVars(); + static void initializeDockspace(const ImGuiID& dockspace_id, const ImGuiViewport* viewport); + + // --- Main Rendering Flow --- + static void beginRender(); + void onRender(const Renderer& renderer); + static void endRender(); + // --- UI Panel Rendering --- + static ImGuiViewport* setupViewport(); + ImGuiID getDockspaceID(); + void drawMainMenuBar(); + void render3DScene(const Renderer& renderer) const; + void renderSceneHierarchyPanel(); + void renderPropertiesPanel(); + void renderVisualsPanel(); + void renderConsole(); + + // --- State --- + bool m_IsRunning = true; + Entity::id_t m_SelectedEntityID = std::numeric_limits::max(); + + // --- Lvalue References to Engine State --- + glm::vec4& ambientLightColor; std::unique_ptr &poolRef; + std::vector &viewsRef; + Entity::Map &entitiesRef; + Camera &cameraRef; Device &deviceRef; SwapChain &swapChainRef; Window &windowRef; + + // --- UI/Editor State --- + std::vector m_MaxDepth = { 100.f, 100.f }; + std::vector m_FovY = { 70.f, 70.f }; + std::vector m_FovX = { 90.f, 90.f }; + int m_CamIdx = 0; + + // --- Console State --- + bool m_ConsoleOpened = true; + char m_InputBuffer[256]; + std::vector m_Items = { "Welcome to Kagu Engine!", "[Info] Still in development!.", "[Hint] Select an entity in the hierarchy to see its properties." }; }; } \ No newline at end of file diff --git a/KaguEngine/src/Renderer.cpp b/KaguEngine/src/Renderer.cpp index 318c6da..71ccbf0 100644 --- a/KaguEngine/src/Renderer.cpp +++ b/KaguEngine/src/Renderer.cpp @@ -158,7 +158,7 @@ void Renderer::createOffscreenResources() { cleanupOffscreenResources(); m_offscreenExtent = m_SwapChain->getSwapChainExtent(); - m_offscreenFormat = VK_FORMAT_B8G8R8A8_SRGB; + m_offscreenFormat = VK_FORMAT_B8G8R8A8_UNORM; // Create color attachment VkImageCreateInfo createInfo{}; @@ -528,7 +528,7 @@ void Renderer::transitionOffscreenImageForImGui() { } } -void Renderer::transitionImageLayout(VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout) { +void Renderer::transitionImageLayout(VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout) const { VkCommandBuffer commandBuffer = deviceRef.beginSingleTimeCommands(); VkImageMemoryBarrier barrier{}; diff --git a/KaguEngine/src/Renderer.ixx b/KaguEngine/src/Renderer.ixx index 6211ef3..aea092d 100644 --- a/KaguEngine/src/Renderer.ixx +++ b/KaguEngine/src/Renderer.ixx @@ -75,7 +75,7 @@ private: VkDescriptorPool m_offscreenDescriptorPool = VK_NULL_HANDLE; VkImageLayout m_offscreenCurrentLayout = VK_IMAGE_LAYOUT_UNDEFINED; VkDescriptorSetLayout m_offscreenDescriptorSetLayout = VK_NULL_HANDLE; - VkFormat m_offscreenFormat = VK_FORMAT_B8G8R8A8_SRGB; + VkFormat m_offscreenFormat = VK_FORMAT_B8G8R8A8_UNORM; VkExtent2D m_offscreenExtent{}; // Multi sampled color image @@ -97,7 +97,7 @@ private: void createOffscreenRenderPass(); void createOffscreenFramebuffer(); void createOffscreenDescriptorSet(); - void transitionImageLayout(VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout); + void transitionImageLayout(VkImage image, VkImageLayout oldLayout, VkImageLayout newLayout) const; }; } // Namespace KaguEngine \ No newline at end of file diff --git a/KaguEngine/src/SwapChain.cpp b/KaguEngine/src/SwapChain.cpp index 1b67177..0f4d603 100644 --- a/KaguEngine/src/SwapChain.cpp +++ b/KaguEngine/src/SwapChain.cpp @@ -433,7 +433,7 @@ void SwapChain::createSyncObjects() { VkSurfaceFormatKHR SwapChain::chooseSwapSurfaceFormat(const std::vector &availableFormats) { for (const auto &availableFormat: availableFormats) { // availableFormat.format == VK_FORMAT_B8G8R8A8_UNORM for ImGui looking right - if (availableFormat.format == VK_FORMAT_B8G8R8A8_SRGB && + if (availableFormat.format == VK_FORMAT_B8G8R8A8_UNORM && availableFormat.colorSpace == VK_COLOR_SPACE_SRGB_NONLINEAR_KHR) { return availableFormat; } @@ -446,7 +446,6 @@ VkPresentModeKHR SwapChain::chooseSwapPresentMode(const std::vectorblueBits); glfwWindowHint(GLFW_DECORATED, GLFW_TRUE); // GLFW_FALSE when GUI - m_Window = glfwCreateWindow(mode->width / 2, mode->height / 2, m_WindowName.c_str(), nullptr, nullptr); + int width, height; + setWindowDimensions(mode, width, height); + + m_Window = glfwCreateWindow(width, height, m_WindowName.c_str(), nullptr, nullptr); centerWindow(m_Window, monitor); glfwSetWindowUserPointer(m_Window, this); glfwSetFramebufferSizeCallback(m_Window, framebufferResizeCallback); @@ -44,6 +47,21 @@ void Window::createWindowSurface(const VkInstance instance, VkSurfaceKHR* surfac } } +void Window::setWindowDimensions(const GLFWvidmode* mode, int& width, int& height) { + if (mode->height < 900) { + height = mode->height / 2; + } + else { + height = m_Height; + } + if (mode->width < m_Width) { + width = mode->width / 2; + } + else { + width = m_Width; + } +} + void Window::centerWindow(GLFWwindow *window, GLFWmonitor *monitor) { if (!monitor) return; diff --git a/KaguEngine/src/Window.ixx b/KaguEngine/src/Window.ixx index b626fb0..464a486 100644 --- a/KaguEngine/src/Window.ixx +++ b/KaguEngine/src/Window.ixx @@ -33,6 +33,7 @@ public: private: static void framebufferResizeCallback(GLFWwindow *window, int width, int height); void initWindow(); + void setWindowDimensions(const GLFWvidmode* mode, int& width, int& height); void centerWindow(GLFWwindow *window, GLFWmonitor *monitor); int m_Width; diff --git a/KaguEngine/src/include/LICENSE.txt b/KaguEngine/src/include/LICENSE.txt new file mode 100644 index 0000000..59ec22b --- /dev/null +++ b/KaguEngine/src/include/LICENSE.txt @@ -0,0 +1,17 @@ +Copyright (c) 2017 Juliette Foucaut and Doug Binks + +This software is provided 'as-is', without any express or implied +warranty. In no event will the authors be held liable for any damages +arising from the use of this software. + +Permission is granted to anyone to use this software for any purpose, +including commercial applications, and to alter it and redistribute it +freely, subject to the following restrictions: + +1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. +2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. +3. This notice may not be removed or altered from any source distribution. diff --git a/KaguEngine/src/include/font_awesome.hpp b/KaguEngine/src/include/font_awesome.hpp new file mode 100644 index 0000000..509f80a --- /dev/null +++ b/KaguEngine/src/include/font_awesome.hpp @@ -0,0 +1,683 @@ +#pragma once + +auto inline FONT_ICON_FILE_NAME_FA = "assets/fonts/fontawesome/fontawesome.ttf"; + +constexpr int ICON_MIN_FA = 0xf000; +constexpr int ICON_MAX_16_FA = 0xf2e0; +constexpr int ICON_MAX_FA = 0xf2e0; + +auto inline ICON_FA_GLASS = "\xef\x80\x80"; +auto inline ICON_FA_MUSIC = "\xef\x80\x81"; +auto inline ICON_FA_SEARCH = "\xef\x80\x82"; +auto inline ICON_FA_ENVELOPE_O = "\xef\x80\x83"; +auto inline ICON_FA_HEART = "\xef\x80\x84"; +auto inline ICON_FA_STAR = "\xef\x80\x85"; +auto inline ICON_FA_STAR_O = "\xef\x80\x86"; +auto inline ICON_FA_USER = "\xef\x80\x87"; +auto inline ICON_FA_FILM = "\xef\x80\x88"; +auto inline ICON_FA_TH_LARGE = "\xef\x80\x89"; +auto inline ICON_FA_TH = "\xef\x80\x8a"; +auto inline ICON_FA_TH_LIST = "\xef\x80\x8b"; +auto inline ICON_FA_CHECK = "\xef\x80\x8c"; +auto inline ICON_FA_TIMES = "\xef\x80\x8d"; +auto inline ICON_FA_SEARCH_PLUS = "\xef\x80\x8e"; +auto inline ICON_FA_SEARCH_MINUS = "\xef\x80\x90"; +auto inline ICON_FA_POWER_OFF = "\xef\x80\x91"; +auto inline ICON_FA_SIGNAL = "\xef\x80\x92"; +auto inline ICON_FA_COG = "\xef\x80\x93"; +auto inline ICON_FA_TRASH_O = "\xef\x80\x94"; +auto inline ICON_FA_HOME = "\xef\x80\x95"; +auto inline ICON_FA_FILE_O = "\xef\x80\x96"; +auto inline ICON_FA_CLOCK_O = "\xef\x80\x97"; +auto inline ICON_FA_ROAD = "\xef\x80\x98"; +auto inline ICON_FA_DOWNLOAD = "\xef\x80\x99"; +auto inline ICON_FA_ARROW_CIRCLE_O_DOWN = "\xef\x80\x9a"; +auto inline ICON_FA_ARROW_CIRCLE_O_UP = "\xef\x80\x9b"; +auto inline ICON_FA_INBOX = "\xef\x80\x9c"; +auto inline ICON_FA_PLAY_CIRCLE_O = "\xef\x80\x9d"; +auto inline ICON_FA_REPEAT = "\xef\x80\x9e"; +auto inline ICON_FA_REFRESH = "\xef\x80\xa1"; +auto inline ICON_FA_LIST_ALT = "\xef\x80\xa2"; +auto inline ICON_FA_LOCK = "\xef\x80\xa3"; +auto inline ICON_FA_FLAG = "\xef\x80\xa4"; +auto inline ICON_FA_HEADPHONES = "\xef\x80\xa5"; +auto inline ICON_FA_VOLUME_OFF = "\xef\x80\xa6"; +auto inline ICON_FA_VOLUME_DOWN = "\xef\x80\xa7"; +auto inline ICON_FA_VOLUME_UP = "\xef\x80\xa8"; +auto inline ICON_FA_QRCODE = "\xef\x80\xa9"; +auto inline ICON_FA_BARCODE = "\xef\x80\xaa"; +auto inline ICON_FA_TAG = "\xef\x80\xab"; +auto inline ICON_FA_TAGS = "\xef\x80\xac"; +auto inline ICON_FA_BOOK = "\xef\x80\xad"; +auto inline ICON_FA_BOOKMARK = "\xef\x80\xae"; +auto inline ICON_FA_PRINT = "\xef\x80\xaf"; +auto inline ICON_FA_CAMERA = "\xef\x80\xb0"; +auto inline ICON_FA_FONT = "\xef\x80\xb1"; +auto inline ICON_FA_BOLD = "\xef\x80\xb2"; +auto inline ICON_FA_ITALIC = "\xef\x80\xb3"; +auto inline ICON_FA_TEXT_HEIGHT = "\xef\x80\xb4"; +auto inline ICON_FA_TEXT_WIDTH = "\xef\x80\xb5"; +auto inline ICON_FA_ALIGN_LEFT = "\xef\x80\xb6"; +auto inline ICON_FA_ALIGN_CENTER = "\xef\x80\xb7"; +auto inline ICON_FA_ALIGN_RIGHT = "\xef\x80\xb8"; +auto inline ICON_FA_ALIGN_JUSTIFY = "\xef\x80\xb9"; +auto inline ICON_FA_LIST = "\xef\x80\xba"; +auto inline ICON_FA_OUTDENT = "\xef\x80\xbb"; +auto inline ICON_FA_INDENT = "\xef\x80\xbc"; +auto inline ICON_FA_VIDEO_CAMERA = "\xef\x80\xbd"; +auto inline ICON_FA_PICTURE_O = "\xef\x80\xbe"; +auto inline ICON_FA_PENCIL = "\xef\x81\x80"; +auto inline ICON_FA_MAP_MARKER = "\xef\x81\x81"; +auto inline ICON_FA_ADJUST = "\xef\x81\x82"; +auto inline ICON_FA_TINT = "\xef\x81\x83"; +auto inline ICON_FA_PENCIL_SQUARE_O = "\xef\x81\x84"; +auto inline ICON_FA_SHARE_SQUARE_O = "\xef\x81\x85"; +auto inline ICON_FA_CHECK_SQUARE_O = "\xef\x81\x86"; +auto inline ICON_FA_ARROWS = "\xef\x81\x87"; +auto inline ICON_FA_STEP_BACKWARD = "\xef\x81\x88"; +auto inline ICON_FA_FAST_BACKWARD = "\xef\x81\x89"; +auto inline ICON_FA_BACKWARD = "\xef\x81\x8a"; +auto inline ICON_FA_PLAY = "\xef\x81\x8b"; +auto inline ICON_FA_PAUSE = "\xef\x81\x8c"; +auto inline ICON_FA_STOP = "\xef\x81\x8d"; +auto inline ICON_FA_FORWARD = "\xef\x81\x8e"; +auto inline ICON_FA_FAST_FORWARD = "\xef\x81\x90"; +auto inline ICON_FA_STEP_FORWARD = "\xef\x81\x91"; +auto inline ICON_FA_EJECT = "\xef\x81\x92"; +auto inline ICON_FA_CHEVRON_LEFT = "\xef\x81\x93"; +auto inline ICON_FA_CHEVRON_RIGHT = "\xef\x81\x94"; +auto inline ICON_FA_PLUS_CIRCLE = "\xef\x81\x95"; +auto inline ICON_FA_MINUS_CIRCLE = "\xef\x81\x96"; +auto inline ICON_FA_TIMES_CIRCLE = "\xef\x81\x97"; +auto inline ICON_FA_CHECK_CIRCLE = "\xef\x81\x98"; +auto inline ICON_FA_QUESTION_CIRCLE = "\xef\x81\x99"; +auto inline ICON_FA_INFO_CIRCLE = "\xef\x81\x9a"; +auto inline ICON_FA_CROSSHAIRS = "\xef\x81\x9b"; +auto inline ICON_FA_TIMES_CIRCLE_O = "\xef\x81\x9c"; +auto inline ICON_FA_CHECK_CIRCLE_O = "\xef\x81\x9d"; +auto inline ICON_FA_BAN = "\xef\x81\x9e"; +auto inline ICON_FA_ARROW_LEFT = "\xef\x81\xa0"; +auto inline ICON_FA_ARROW_RIGHT = "\xef\x81\xa1"; +auto inline ICON_FA_ARROW_UP = "\xef\x81\xa2"; +auto inline ICON_FA_ARROW_DOWN = "\xef\x81\xa3"; +auto inline ICON_FA_SHARE = "\xef\x81\xa4"; +auto inline ICON_FA_EXPAND = "\xef\x81\xa5"; +auto inline ICON_FA_COMPRESS = "\xef\x81\xa6"; +auto inline ICON_FA_PLUS = "\xef\x81\xa7"; +auto inline ICON_FA_MINUS = "\xef\x81\xa8"; +auto inline ICON_FA_ASTERISK = "\xef\x81\xa9"; +auto inline ICON_FA_EXCLAMATION_CIRCLE = "\xef\x81\xaa"; +auto inline ICON_FA_GIFT = "\xef\x81\xab"; +auto inline ICON_FA_LEAF = "\xef\x81\xac"; +auto inline ICON_FA_FIRE = "\xef\x81\xad"; +auto inline ICON_FA_EYE = "\xef\x81\xae"; +auto inline ICON_FA_EYE_SLASH = "\xef\x81\xb0"; +auto inline ICON_FA_EXCLAMATION_TRIANGLE = "\xef\x81\xb1"; +auto inline ICON_FA_PLANE = "\xef\x81\xb2"; +auto inline ICON_FA_CALENDAR = "\xef\x81\xb3"; +auto inline ICON_FA_RANDOM = "\xef\x81\xb4"; +auto inline ICON_FA_COMMENT = "\xef\x81\xb5"; +auto inline ICON_FA_MAGNET = "\xef\x81\xb6"; +auto inline ICON_FA_CHEVRON_UP = "\xef\x81\xb7"; +auto inline ICON_FA_CHEVRON_DOWN = "\xef\x81\xb8"; +auto inline ICON_FA_RETWEET = "\xef\x81\xb9"; +auto inline ICON_FA_SHOPPING_CART = "\xef\x81\xba"; +auto inline ICON_FA_FOLDER = "\xef\x81\xbb"; +auto inline ICON_FA_FOLDER_OPEN = "\xef\x81\xbc"; +auto inline ICON_FA_ARROWS_V = "\xef\x81\xbd"; +auto inline ICON_FA_ARROWS_H = "\xef\x81\xbe"; +auto inline ICON_FA_BAR_CHART = "\xef\x82\x80"; +auto inline ICON_FA_TWITTER_SQUARE = "\xef\x82\x81"; +auto inline ICON_FA_FACEBOOK_SQUARE = "\xef\x82\x82"; +auto inline ICON_FA_CAMERA_RETRO = "\xef\x82\x83"; +auto inline ICON_FA_KEY = "\xef\x82\x84"; +auto inline ICON_FA_COGS = "\xef\x82\x85"; +auto inline ICON_FA_COMMENTS = "\xef\x82\x86"; +auto inline ICON_FA_THUMBS_O_UP = "\xef\x82\x87"; +auto inline ICON_FA_THUMBS_O_DOWN = "\xef\x82\x88"; +auto inline ICON_FA_STAR_HALF = "\xef\x82\x89"; +auto inline ICON_FA_HEART_O = "\xef\x82\x8a"; +auto inline ICON_FA_SIGN_OUT = "\xef\x82\x8b"; +auto inline ICON_FA_LINKEDIN_SQUARE = "\xef\x82\x8c"; +auto inline ICON_FA_THUMB_TACK = "\xef\x82\x8d"; +auto inline ICON_FA_EXTERNAL_LINK = "\xef\x82\x8e"; +auto inline ICON_FA_SIGN_IN = "\xef\x82\x90"; +auto inline ICON_FA_TROPHY = "\xef\x82\x91"; +auto inline ICON_FA_GITHUB_SQUARE = "\xef\x82\x92"; +auto inline ICON_FA_UPLOAD = "\xef\x82\x93"; +auto inline ICON_FA_LEMON_O = "\xef\x82\x94"; +auto inline ICON_FA_PHONE = "\xef\x82\x95"; +auto inline ICON_FA_SQUARE_O = "\xef\x82\x96"; +auto inline ICON_FA_BOOKMARK_O = "\xef\x82\x97"; +auto inline ICON_FA_PHONE_SQUARE = "\xef\x82\x98"; +auto inline ICON_FA_TWITTER = "\xef\x82\x99"; +auto inline ICON_FA_FACEBOOK = "\xef\x82\x9a"; +auto inline ICON_FA_GITHUB = "\xef\x82\x9b"; +auto inline ICON_FA_UNLOCK = "\xef\x82\x9c"; +auto inline ICON_FA_CREDIT_CARD = "\xef\x82\x9d"; +auto inline ICON_FA_RSS = "\xef\x82\x9e"; +auto inline ICON_FA_HDD_O = "\xef\x82\xa0"; +auto inline ICON_FA_BULLHORN = "\xef\x82\xa1"; +auto inline ICON_FA_BELL = "\xef\x83\xb3"; +auto inline ICON_FA_CERTIFICATE = "\xef\x82\xa3"; +auto inline ICON_FA_HAND_O_RIGHT = "\xef\x82\xa4"; +auto inline ICON_FA_HAND_O_LEFT = "\xef\x82\xa5"; +auto inline ICON_FA_HAND_O_UP = "\xef\x82\xa6"; +auto inline ICON_FA_HAND_O_DOWN = "\xef\x82\xa7"; +auto inline ICON_FA_ARROW_CIRCLE_LEFT = "\xef\x82\xa8"; +auto inline ICON_FA_ARROW_CIRCLE_RIGHT = "\xef\x82\xa9"; +auto inline ICON_FA_ARROW_CIRCLE_UP = "\xef\x82\xaa"; +auto inline ICON_FA_ARROW_CIRCLE_DOWN = "\xef\x82\xab"; +auto inline ICON_FA_GLOBE = "\xef\x82\xac"; +auto inline ICON_FA_WRENCH = "\xef\x82\xad"; +auto inline ICON_FA_TASKS = "\xef\x82\xae"; +auto inline ICON_FA_FILTER = "\xef\x82\xb0"; +auto inline ICON_FA_BRIEFCASE = "\xef\x82\xb1"; +auto inline ICON_FA_ARROWS_ALT = "\xef\x82\xb2"; +auto inline ICON_FA_USERS = "\xef\x83\x80"; +auto inline ICON_FA_LINK = "\xef\x83\x81"; +auto inline ICON_FA_CLOUD = "\xef\x83\x82"; +auto inline ICON_FA_FLASK = "\xef\x83\x83"; +auto inline ICON_FA_SCISSORS = "\xef\x83\x84"; +auto inline ICON_FA_FILES_O = "\xef\x83\x85"; +auto inline ICON_FA_PAPERCLIP = "\xef\x83\x86"; +auto inline ICON_FA_FLOPPY_O = "\xef\x83\x87"; +auto inline ICON_FA_SQUARE = "\xef\x83\x88"; +auto inline ICON_FA_BARS = "\xef\x83\x89"; +auto inline ICON_FA_LIST_UL = "\xef\x83\x8a"; +auto inline ICON_FA_LIST_OL = "\xef\x83\x8b"; +auto inline ICON_FA_STRIKETHROUGH = "\xef\x83\x8c"; +auto inline ICON_FA_UNDERLINE = "\xef\x83\x8d"; +auto inline ICON_FA_TABLE = "\xef\x83\x8e"; +auto inline ICON_FA_MAGIC = "\xef\x83\x90"; +auto inline ICON_FA_TRUCK = "\xef\x83\x91"; +auto inline ICON_FA_PINTEREST = "\xef\x83\x92"; +auto inline ICON_FA_PINTEREST_SQUARE = "\xef\x83\x93"; +auto inline ICON_FA_GOOGLE_PLUS_SQUARE = "\xef\x83\x94"; +auto inline ICON_FA_GOOGLE_PLUS = "\xef\x83\x95"; +auto inline ICON_FA_MONEY = "\xef\x83\x96"; +auto inline ICON_FA_CARET_DOWN = "\xef\x83\x97"; +auto inline ICON_FA_CARET_UP = "\xef\x83\x98"; +auto inline ICON_FA_CARET_LEFT = "\xef\x83\x99"; +auto inline ICON_FA_CARET_RIGHT = "\xef\x83\x9a"; +auto inline ICON_FA_COLUMNS = "\xef\x83\x9b"; +auto inline ICON_FA_SORT = "\xef\x83\x9c"; +auto inline ICON_FA_SORT_DESC = "\xef\x83\x9d"; +auto inline ICON_FA_SORT_ASC = "\xef\x83\x9e"; +auto inline ICON_FA_ENVELOPE = "\xef\x83\xa0"; +auto inline ICON_FA_LINKEDIN = "\xef\x83\xa1"; +auto inline ICON_FA_UNDO = "\xef\x83\xa2"; +auto inline ICON_FA_GAVEL = "\xef\x83\xa3"; +auto inline ICON_FA_TACHOMETER = "\xef\x83\xa4"; +auto inline ICON_FA_COMMENT_O = "\xef\x83\xa5"; +auto inline ICON_FA_COMMENTS_O = "\xef\x83\xa6"; +auto inline ICON_FA_BOLT = "\xef\x83\xa7"; +auto inline ICON_FA_SITEMAP = "\xef\x83\xa8"; +auto inline ICON_FA_UMBRELLA = "\xef\x83\xa9"; +auto inline ICON_FA_CLIPBOARD = "\xef\x83\xaa"; +auto inline ICON_FA_LIGHTBULB_O = "\xef\x83\xab"; +auto inline ICON_FA_EXCHANGE = "\xef\x83\xac"; +auto inline ICON_FA_CLOUD_DOWNLOAD = "\xef\x83\xad"; +auto inline ICON_FA_CLOUD_UPLOAD = "\xef\x83\xae"; +auto inline ICON_FA_USER_MD = "\xef\x83\xb0"; +auto inline ICON_FA_STETHOSCOPE = "\xef\x83\xb1"; +auto inline ICON_FA_SUITCASE = "\xef\x83\xb2"; +auto inline ICON_FA_BELL_O = "\xef\x82\xa2"; +auto inline ICON_FA_COFFEE = "\xef\x83\xb4"; +auto inline ICON_FA_CUTLERY = "\xef\x83\xb5"; +auto inline ICON_FA_FILE_TEXT_O = "\xef\x83\xb6"; +auto inline ICON_FA_BUILDING_O = "\xef\x83\xb7"; +auto inline ICON_FA_HOSPITAL_O = "\xef\x83\xb8"; +auto inline ICON_FA_AMBULANCE = "\xef\x83\xb9"; +auto inline ICON_FA_MEDKIT = "\xef\x83\xba"; +auto inline ICON_FA_FIGHTER_JET = "\xef\x83\xbb"; +auto inline ICON_FA_BEER = "\xef\x83\xbc"; +auto inline ICON_FA_H_SQUARE = "\xef\x83\xbd"; +auto inline ICON_FA_PLUS_SQUARE = "\xef\x83\xbe"; +auto inline ICON_FA_ANGLE_DOUBLE_LEFT = "\xef\x84\x80"; +auto inline ICON_FA_ANGLE_DOUBLE_RIGHT = "\xef\x84\x81"; +auto inline ICON_FA_ANGLE_DOUBLE_UP = "\xef\x84\x82"; +auto inline ICON_FA_ANGLE_DOUBLE_DOWN = "\xef\x84\x83"; +auto inline ICON_FA_ANGLE_LEFT = "\xef\x84\x84"; +auto inline ICON_FA_ANGLE_RIGHT = "\xef\x84\x85"; +auto inline ICON_FA_ANGLE_UP = "\xef\x84\x86"; +auto inline ICON_FA_ANGLE_DOWN = "\xef\x84\x87"; +auto inline ICON_FA_DESKTOP = "\xef\x84\x88"; +auto inline ICON_FA_LAPTOP = "\xef\x84\x89"; +auto inline ICON_FA_TABLET = "\xef\x84\x8a"; +auto inline ICON_FA_MOBILE = "\xef\x84\x8b"; +auto inline ICON_FA_CIRCLE_O = "\xef\x84\x8c"; +auto inline ICON_FA_QUOTE_LEFT = "\xef\x84\x8d"; +auto inline ICON_FA_QUOTE_RIGHT = "\xef\x84\x8e"; +auto inline ICON_FA_SPINNER = "\xef\x84\x90"; +auto inline ICON_FA_CIRCLE = "\xef\x84\x91"; +auto inline ICON_FA_REPLY = "\xef\x84\x92"; +auto inline ICON_FA_GITHUB_ALT = "\xef\x84\x93"; +auto inline ICON_FA_FOLDER_O = "\xef\x84\x94"; +auto inline ICON_FA_FOLDER_OPEN_O = "\xef\x84\x95"; +auto inline ICON_FA_SMILE_O = "\xef\x84\x98"; +auto inline ICON_FA_FROWN_O = "\xef\x84\x99"; +auto inline ICON_FA_MEH_O = "\xef\x84\x9a"; +auto inline ICON_FA_GAMEPAD = "\xef\x84\x9b"; +auto inline ICON_FA_KEYBOARD_O = "\xef\x84\x9c"; +auto inline ICON_FA_FLAG_O = "\xef\x84\x9d"; +auto inline ICON_FA_FLAG_CHECKERED = "\xef\x84\x9e"; +auto inline ICON_FA_TERMINAL = "\xef\x84\xa0"; +auto inline ICON_FA_CODE = "\xef\x84\xa1"; +auto inline ICON_FA_REPLY_ALL = "\xef\x84\xa2"; +auto inline ICON_FA_STAR_HALF_O = "\xef\x84\xa3"; +auto inline ICON_FA_LOCATION_ARROW = "\xef\x84\xa4"; +auto inline ICON_FA_CROP = "\xef\x84\xa5"; +auto inline ICON_FA_CODE_FORK = "\xef\x84\xa6"; +auto inline ICON_FA_CHAIN_BROKEN = "\xef\x84\xa7"; +auto inline ICON_FA_QUESTION = "\xef\x84\xa8"; +auto inline ICON_FA_INFO = "\xef\x84\xa9"; +auto inline ICON_FA_EXCLAMATION = "\xef\x84\xaa"; +auto inline ICON_FA_SUPERSCRIPT = "\xef\x84\xab"; +auto inline ICON_FA_SUBSCRIPT = "\xef\x84\xac"; +auto inline ICON_FA_ERASER = "\xef\x84\xad"; +auto inline ICON_FA_PUZZLE_PIECE = "\xef\x84\xae"; +auto inline ICON_FA_MICROPHONE = "\xef\x84\xb0"; +auto inline ICON_FA_MICROPHONE_SLASH = "\xef\x84\xb1"; +auto inline ICON_FA_SHIELD = "\xef\x84\xb2"; +auto inline ICON_FA_CALENDAR_O = "\xef\x84\xb3"; +auto inline ICON_FA_FIRE_EXTINGUISHER = "\xef\x84\xb4"; +auto inline ICON_FA_ROCKET = "\xef\x84\xb5"; +auto inline ICON_FA_MAXCDN = "\xef\x84\xb6"; +auto inline ICON_FA_CHEVRON_CIRCLE_LEFT = "\xef\x84\xb7"; +auto inline ICON_FA_CHEVRON_CIRCLE_RIGHT = "\xef\x84\xb8"; +auto inline ICON_FA_CHEVRON_CIRCLE_UP = "\xef\x84\xb9"; +auto inline ICON_FA_CHEVRON_CIRCLE_DOWN = "\xef\x84\xba"; +auto inline ICON_FA_HTML5 = "\xef\x84\xbb"; +auto inline ICON_FA_CSS3 = "\xef\x84\xbc"; +auto inline ICON_FA_ANCHOR = "\xef\x84\xbd"; +auto inline ICON_FA_UNLOCK_ALT = "\xef\x84\xbe"; +auto inline ICON_FA_BULLSEYE = "\xef\x85\x80"; +auto inline ICON_FA_ELLIPSIS_H = "\xef\x85\x81"; +auto inline ICON_FA_ELLIPSIS_V = "\xef\x85\x82"; +auto inline ICON_FA_RSS_SQUARE = "\xef\x85\x83"; +auto inline ICON_FA_PLAY_CIRCLE = "\xef\x85\x84"; +auto inline ICON_FA_TICKET = "\xef\x85\x85"; +auto inline ICON_FA_MINUS_SQUARE = "\xef\x85\x86"; +auto inline ICON_FA_MINUS_SQUARE_O = "\xef\x85\x87"; +auto inline ICON_FA_LEVEL_UP = "\xef\x85\x88"; +auto inline ICON_FA_LEVEL_DOWN = "\xef\x85\x89"; +auto inline ICON_FA_CHECK_SQUARE = "\xef\x85\x8a"; +auto inline ICON_FA_PENCIL_SQUARE = "\xef\x85\x8b"; +auto inline ICON_FA_EXTERNAL_LINK_SQUARE = "\xef\x85\x8c"; +auto inline ICON_FA_SHARE_SQUARE = "\xef\x85\x8d"; +auto inline ICON_FA_COMPASS = "\xef\x85\x8e"; +auto inline ICON_FA_CARET_SQUARE_O_DOWN = "\xef\x85\x90"; +auto inline ICON_FA_CARET_SQUARE_O_UP = "\xef\x85\x91"; +auto inline ICON_FA_CARET_SQUARE_O_RIGHT = "\xef\x85\x92"; +auto inline ICON_FA_EUR = "\xef\x85\x93"; +auto inline ICON_FA_GBP = "\xef\x85\x94"; +auto inline ICON_FA_USD = "\xef\x85\x95"; +auto inline ICON_FA_INR = "\xef\x85\x96"; +auto inline ICON_FA_JPY = "\xef\x85\x97"; +auto inline ICON_FA_RUB = "\xef\x85\x98"; +auto inline ICON_FA_KRW = "\xef\x85\x99"; +auto inline ICON_FA_BTC = "\xef\x85\x9a"; +auto inline ICON_FA_FILE = "\xef\x85\x9b"; +auto inline ICON_FA_FILE_TEXT = "\xef\x85\x9c"; +auto inline ICON_FA_SORT_ALPHA_ASC = "\xef\x85\x9d"; +auto inline ICON_FA_SORT_ALPHA_DESC = "\xef\x85\x9e"; +auto inline ICON_FA_SORT_AMOUNT_ASC = "\xef\x85\xa0"; +auto inline ICON_FA_SORT_AMOUNT_DESC = "\xef\x85\xa1"; +auto inline ICON_FA_SORT_NUMERIC_ASC = "\xef\x85\xa2"; +auto inline ICON_FA_SORT_NUMERIC_DESC = "\xef\x85\xa3"; +auto inline ICON_FA_THUMBS_UP = "\xef\x85\xa4"; +auto inline ICON_FA_THUMBS_DOWN = "\xef\x85\xa5"; +auto inline ICON_FA_YOUTUBE_SQUARE = "\xef\x85\xa6"; +auto inline ICON_FA_YOUTUBE = "\xef\x85\xa7"; +auto inline ICON_FA_XING = "\xef\x85\xa8"; +auto inline ICON_FA_XING_SQUARE = "\xef\x85\xa9"; +auto inline ICON_FA_YOUTUBE_PLAY = "\xef\x85\xaa"; +auto inline ICON_FA_DROPBOX = "\xef\x85\xab"; +auto inline ICON_FA_STACK_OVERFLOW = "\xef\x85\xac"; +auto inline ICON_FA_INSTAGRAM = "\xef\x85\xad"; +auto inline ICON_FA_FLICKR = "\xef\x85\xae"; +auto inline ICON_FA_ADN = "\xef\x85\xb0"; +auto inline ICON_FA_BITBUCKET = "\xef\x85\xb1"; +auto inline ICON_FA_BITBUCKET_SQUARE = "\xef\x85\xb2"; +auto inline ICON_FA_TUMBLR = "\xef\x85\xb3"; +auto inline ICON_FA_TUMBLR_SQUARE = "\xef\x85\xb4"; +auto inline ICON_FA_LONG_ARROW_DOWN = "\xef\x85\xb5"; +auto inline ICON_FA_LONG_ARROW_UP = "\xef\x85\xb6"; +auto inline ICON_FA_LONG_ARROW_LEFT = "\xef\x85\xb7"; +auto inline ICON_FA_LONG_ARROW_RIGHT = "\xef\x85\xb8"; +auto inline ICON_FA_APPLE = "\xef\x85\xb9"; +auto inline ICON_FA_WINDOWS = "\xef\x85\xba"; +auto inline ICON_FA_ANDROID = "\xef\x85\xbb"; +auto inline ICON_FA_LINUX = "\xef\x85\xbc"; +auto inline ICON_FA_DRIBBBLE = "\xef\x85\xbd"; +auto inline ICON_FA_SKYPE = "\xef\x85\xbe"; +auto inline ICON_FA_FOURSQUARE = "\xef\x86\x80"; +auto inline ICON_FA_TRELLO = "\xef\x86\x81"; +auto inline ICON_FA_FEMALE = "\xef\x86\x82"; +auto inline ICON_FA_MALE = "\xef\x86\x83"; +auto inline ICON_FA_GRATIPAY = "\xef\x86\x84"; +auto inline ICON_FA_SUN_O = "\xef\x86\x85"; +auto inline ICON_FA_MOON_O = "\xef\x86\x86"; +auto inline ICON_FA_ARCHIVE = "\xef\x86\x87"; +auto inline ICON_FA_BUG = "\xef\x86\x88"; +auto inline ICON_FA_VK = "\xef\x86\x89"; +auto inline ICON_FA_WEIBO = "\xef\x86\x8a"; +auto inline ICON_FA_RENREN = "\xef\x86\x8b"; +auto inline ICON_FA_PAGELINES = "\xef\x86\x8c"; +auto inline ICON_FA_STACK_EXCHANGE = "\xef\x86\x8d"; +auto inline ICON_FA_ARROW_CIRCLE_O_RIGHT = "\xef\x86\x8e"; +auto inline ICON_FA_ARROW_CIRCLE_O_LEFT = "\xef\x86\x90"; +auto inline ICON_FA_CARET_SQUARE_O_LEFT = "\xef\x86\x91"; +auto inline ICON_FA_DOT_CIRCLE_O = "\xef\x86\x92"; +auto inline ICON_FA_WHEELCHAIR = "\xef\x86\x93"; +auto inline ICON_FA_VIMEO_SQUARE = "\xef\x86\x94"; +auto inline ICON_FA_TRY = "\xef\x86\x95"; +auto inline ICON_FA_PLUS_SQUARE_O = "\xef\x86\x96"; +auto inline ICON_FA_SPACE_SHUTTLE = "\xef\x86\x97"; +auto inline ICON_FA_SLACK = "\xef\x86\x98"; +auto inline ICON_FA_ENVELOPE_SQUARE = "\xef\x86\x99"; +auto inline ICON_FA_WORDPRESS = "\xef\x86\x9a"; +auto inline ICON_FA_OPENID = "\xef\x86\x9b"; +auto inline ICON_FA_UNIVERSITY = "\xef\x86\x9c"; +auto inline ICON_FA_GRADUATION_CAP = "\xef\x86\x9d"; +auto inline ICON_FA_YAHOO = "\xef\x86\x9e"; +auto inline ICON_FA_GOOGLE = "\xef\x86\xa0"; +auto inline ICON_FA_REDDIT = "\xef\x86\xa1"; +auto inline ICON_FA_REDDIT_SQUARE = "\xef\x86\xa2"; +auto inline ICON_FA_STUMBLEUPON_CIRCLE = "\xef\x86\xa3"; +auto inline ICON_FA_STUMBLEUPON = "\xef\x86\xa4"; +auto inline ICON_FA_DELICIOUS = "\xef\x86\xa5"; +auto inline ICON_FA_DIGG = "\xef\x86\xa6"; +auto inline ICON_FA_PIED_PIPER_PP = "\xef\x86\xa7"; +auto inline ICON_FA_PIED_PIPER_ALT = "\xef\x86\xa8"; +auto inline ICON_FA_DRUPAL = "\xef\x86\xa9"; +auto inline ICON_FA_JOOMLA = "\xef\x86\xaa"; +auto inline ICON_FA_LANGUAGE = "\xef\x86\xab"; +auto inline ICON_FA_FAX = "\xef\x86\xac"; +auto inline ICON_FA_BUILDING = "\xef\x86\xad"; +auto inline ICON_FA_CHILD = "\xef\x86\xae"; +auto inline ICON_FA_PAW = "\xef\x86\xb0"; +auto inline ICON_FA_SPOON = "\xef\x86\xb1"; +auto inline ICON_FA_CUBE = "\xef\x86\xb2"; +auto inline ICON_FA_CUBES = "\xef\x86\xb3"; +auto inline ICON_FA_BEHANCE = "\xef\x86\xb4"; +auto inline ICON_FA_BEHANCE_SQUARE = "\xef\x86\xb5"; +auto inline ICON_FA_STEAM = "\xef\x86\xb6"; +auto inline ICON_FA_STEAM_SQUARE = "\xef\x86\xb7"; +auto inline ICON_FA_RECYCLE = "\xef\x86\xb8"; +auto inline ICON_FA_CAR = "\xef\x86\xb9"; +auto inline ICON_FA_TAXI = "\xef\x86\xba"; +auto inline ICON_FA_TREE = "\xef\x86\xbb"; +auto inline ICON_FA_SPOTIFY = "\xef\x86\xbc"; +auto inline ICON_FA_DEVIANTART = "\xef\x86\xbd"; +auto inline ICON_FA_SOUNDCLOUD = "\xef\x86\xbe"; +auto inline ICON_FA_DATABASE = "\xef\x87\x80"; +auto inline ICON_FA_FILE_PDF_O = "\xef\x87\x81"; +auto inline ICON_FA_FILE_WORD_O = "\xef\x87\x82"; +auto inline ICON_FA_FILE_EXCEL_O = "\xef\x87\x83"; +auto inline ICON_FA_FILE_POWERPOINT_O = "\xef\x87\x84"; +auto inline ICON_FA_FILE_IMAGE_O = "\xef\x87\x85"; +auto inline ICON_FA_FILE_ARCHIVE_O = "\xef\x87\x86"; +auto inline ICON_FA_FILE_AUDIO_O = "\xef\x87\x87"; +auto inline ICON_FA_FILE_VIDEO_O = "\xef\x87\x88"; +auto inline ICON_FA_FILE_CODE_O = "\xef\x87\x89"; +auto inline ICON_FA_VINE = "\xef\x87\x8a"; +auto inline ICON_FA_CODEPEN = "\xef\x87\x8b"; +auto inline ICON_FA_JSFIDDLE = "\xef\x87\x8c"; +auto inline ICON_FA_LIFE_RING = "\xef\x87\x8d"; +auto inline ICON_FA_CIRCLE_O_NOTCH = "\xef\x87\x8e"; +auto inline ICON_FA_REBEL = "\xef\x87\x90"; +auto inline ICON_FA_EMPIRE = "\xef\x87\x91"; +auto inline ICON_FA_GIT_SQUARE = "\xef\x87\x92"; +auto inline ICON_FA_GIT = "\xef\x87\x93"; +auto inline ICON_FA_HACKER_NEWS = "\xef\x87\x94"; +auto inline ICON_FA_TENCENT_WEIBO = "\xef\x87\x95"; +auto inline ICON_FA_QQ = "\xef\x87\x96"; +auto inline ICON_FA_WEIXIN = "\xef\x87\x97"; +auto inline ICON_FA_PAPER_PLANE = "\xef\x87\x98"; +auto inline ICON_FA_PAPER_PLANE_O = "\xef\x87\x99"; +auto inline ICON_FA_HISTORY = "\xef\x87\x9a"; +auto inline ICON_FA_CIRCLE_THIN = "\xef\x87\x9b"; +auto inline ICON_FA_HEADER = "\xef\x87\x9c"; +auto inline ICON_FA_PARAGRAPH = "\xef\x87\x9d"; +auto inline ICON_FA_SLIDERS = "\xef\x87\x9e"; +auto inline ICON_FA_SHARE_ALT = "\xef\x87\xa0"; +auto inline ICON_FA_SHARE_ALT_SQUARE = "\xef\x87\xa1"; +auto inline ICON_FA_BOMB = "\xef\x87\xa2"; +auto inline ICON_FA_FUTBOL_O = "\xef\x87\xa3"; +auto inline ICON_FA_TTY = "\xef\x87\xa4"; +auto inline ICON_FA_BINOCULARS = "\xef\x87\xa5"; +auto inline ICON_FA_PLUG = "\xef\x87\xa6"; +auto inline ICON_FA_SLIDESHARE = "\xef\x87\xa7"; +auto inline ICON_FA_TWITCH = "\xef\x87\xa8"; +auto inline ICON_FA_YELP = "\xef\x87\xa9"; +auto inline ICON_FA_NEWSPAPER_O = "\xef\x87\xaa"; +auto inline ICON_FA_WIFI = "\xef\x87\xab"; +auto inline ICON_FA_CALCULATOR = "\xef\x87\xac"; +auto inline ICON_FA_PAYPAL = "\xef\x87\xad"; +auto inline ICON_FA_GOOGLE_WALLET = "\xef\x87\xae"; +auto inline ICON_FA_CC_VISA = "\xef\x87\xb0"; +auto inline ICON_FA_CC_MASTERCARD = "\xef\x87\xb1"; +auto inline ICON_FA_CC_DISCOVER = "\xef\x87\xb2"; +auto inline ICON_FA_CC_AMEX = "\xef\x87\xb3"; +auto inline ICON_FA_CC_PAYPAL = "\xef\x87\xb4"; +auto inline ICON_FA_CC_STRIPE = "\xef\x87\xb5"; +auto inline ICON_FA_BELL_SLASH = "\xef\x87\xb6"; +auto inline ICON_FA_BELL_SLASH_O = "\xef\x87\xb7"; +auto inline ICON_FA_TRASH = "\xef\x87\xb8"; +auto inline ICON_FA_COPYRIGHT = "\xef\x87\xb9"; +auto inline ICON_FA_AT = "\xef\x87\xba"; +auto inline ICON_FA_EYEDROPPER = "\xef\x87\xbb"; +auto inline ICON_FA_PAINT_BRUSH = "\xef\x87\xbc"; +auto inline ICON_FA_BIRTHDAY_CAKE = "\xef\x87\xbd"; +auto inline ICON_FA_AREA_CHART = "\xef\x87\xbe"; +auto inline ICON_FA_PIE_CHART = "\xef\x88\x80"; +auto inline ICON_FA_LINE_CHART = "\xef\x88\x81"; +auto inline ICON_FA_LASTFM = "\xef\x88\x82"; +auto inline ICON_FA_LASTFM_SQUARE = "\xef\x88\x83"; +auto inline ICON_FA_TOGGLE_OFF = "\xef\x88\x84"; +auto inline ICON_FA_TOGGLE_ON = "\xef\x88\x85"; +auto inline ICON_FA_BICYCLE = "\xef\x88\x86"; +auto inline ICON_FA_BUS = "\xef\x88\x87"; +auto inline ICON_FA_IOXHOST = "\xef\x88\x88"; +auto inline ICON_FA_ANGELLIST = "\xef\x88\x89"; +auto inline ICON_FA_CC = "\xef\x88\x8a"; +auto inline ICON_FA_ILS = "\xef\x88\x8b"; +auto inline ICON_FA_MEANPATH = "\xef\x88\x8c"; +auto inline ICON_FA_BUYSELLADS = "\xef\x88\x8d"; +auto inline ICON_FA_CONNECTDEVELOP = "\xef\x88\x8e"; +auto inline ICON_FA_DASHCUBE = "\xef\x88\x90"; +auto inline ICON_FA_FORUMBEE = "\xef\x88\x91"; +auto inline ICON_FA_LEANPUB = "\xef\x88\x92"; +auto inline ICON_FA_SELLSY = "\xef\x88\x93"; +auto inline ICON_FA_SHIRTSINBULK = "\xef\x88\x94"; +auto inline ICON_FA_SIMPLYBUILT = "\xef\x88\x95"; +auto inline ICON_FA_SKYATLAS = "\xef\x88\x96"; +auto inline ICON_FA_CART_PLUS = "\xef\x88\x97"; +auto inline ICON_FA_CART_ARROW_DOWN = "\xef\x88\x98"; +auto inline ICON_FA_DIAMOND = "\xef\x88\x99"; +auto inline ICON_FA_SHIP = "\xef\x88\x9a"; +auto inline ICON_FA_USER_SECRET = "\xef\x88\x9b"; +auto inline ICON_FA_MOTORCYCLE = "\xef\x88\x9c"; +auto inline ICON_FA_STREET_VIEW = "\xef\x88\x9d"; +auto inline ICON_FA_HEARTBEAT = "\xef\x88\x9e"; +auto inline ICON_FA_VENUS = "\xef\x88\xa1"; +auto inline ICON_FA_MARS = "\xef\x88\xa2"; +auto inline ICON_FA_MERCURY = "\xef\x88\xa3"; +auto inline ICON_FA_TRANSGENDER = "\xef\x88\xa4"; +auto inline ICON_FA_TRANSGENDER_ALT = "\xef\x88\xa5"; +auto inline ICON_FA_VENUS_DOUBLE = "\xef\x88\xa6"; +auto inline ICON_FA_MARS_DOUBLE = "\xef\x88\xa7"; +auto inline ICON_FA_VENUS_MARS = "\xef\x88\xa8"; +auto inline ICON_FA_MARS_STROKE = "\xef\x88\xa9"; +auto inline ICON_FA_MARS_STROKE_V = "\xef\x88\xaa"; +auto inline ICON_FA_MARS_STROKE_H = "\xef\x88\xab"; +auto inline ICON_FA_NEUTER = "\xef\x88\xac"; +auto inline ICON_FA_GENDERLESS = "\xef\x88\xad"; +auto inline ICON_FA_FACEBOOK_OFFICIAL = "\xef\x88\xb0"; +auto inline ICON_FA_PINTEREST_P = "\xef\x88\xb1"; +auto inline ICON_FA_WHATSAPP = "\xef\x88\xb2"; +auto inline ICON_FA_SERVER = "\xef\x88\xb3"; +auto inline ICON_FA_USER_PLUS = "\xef\x88\xb4"; +auto inline ICON_FA_USER_TIMES = "\xef\x88\xb5"; +auto inline ICON_FA_BED = "\xef\x88\xb6"; +auto inline ICON_FA_VIACOIN = "\xef\x88\xb7"; +auto inline ICON_FA_TRAIN = "\xef\x88\xb8"; +auto inline ICON_FA_SUBWAY = "\xef\x88\xb9"; +auto inline ICON_FA_MEDIUM = "\xef\x88\xba"; +auto inline ICON_FA_Y_COMBINATOR = "\xef\x88\xbb"; +auto inline ICON_FA_OPTIN_MONSTER = "\xef\x88\xbc"; +auto inline ICON_FA_OPENCART = "\xef\x88\xbd"; +auto inline ICON_FA_EXPEDITEDSSL = "\xef\x88\xbe"; +auto inline ICON_FA_BATTERY_FULL = "\xef\x89\x80"; +auto inline ICON_FA_BATTERY_THREE_QUARTERS = "\xef\x89\x81"; +auto inline ICON_FA_BATTERY_HALF = "\xef\x89\x82"; +auto inline ICON_FA_BATTERY_QUARTER = "\xef\x89\x83"; +auto inline ICON_FA_BATTERY_EMPTY = "\xef\x89\x84"; +auto inline ICON_FA_MOUSE_POINTER = "\xef\x89\x85"; +auto inline ICON_FA_I_CURSOR = "\xef\x89\x86"; +auto inline ICON_FA_OBJECT_GROUP = "\xef\x89\x87"; +auto inline ICON_FA_OBJECT_UNGROUP = "\xef\x89\x88"; +auto inline ICON_FA_STICKY_NOTE = "\xef\x89\x89"; +auto inline ICON_FA_STICKY_NOTE_O = "\xef\x89\x8a"; +auto inline ICON_FA_CC_JCB = "\xef\x89\x8b"; +auto inline ICON_FA_CC_DINERS_CLUB = "\xef\x89\x8c"; +auto inline ICON_FA_CLONE = "\xef\x89\x8d"; +auto inline ICON_FA_BALANCE_SCALE = "\xef\x89\x8e"; +auto inline ICON_FA_HOURGLASS_O = "\xef\x89\x90"; +auto inline ICON_FA_HOURGLASS_START = "\xef\x89\x91"; +auto inline ICON_FA_HOURGLASS_HALF = "\xef\x89\x92"; +auto inline ICON_FA_HOURGLASS_END = "\xef\x89\x93"; +auto inline ICON_FA_HOURGLASS = "\xef\x89\x94"; +auto inline ICON_FA_HAND_ROCK_O = "\xef\x89\x95"; +auto inline ICON_FA_HAND_PAPER_O = "\xef\x89\x96"; +auto inline ICON_FA_HAND_SCISSORS_O = "\xef\x89\x97"; +auto inline ICON_FA_HAND_LIZARD_O = "\xef\x89\x98"; +auto inline ICON_FA_HAND_SPOCK_O = "\xef\x89\x99"; +auto inline ICON_FA_HAND_POINTER_O = "\xef\x89\x9a"; +auto inline ICON_FA_HAND_PEACE_O = "\xef\x89\x9b"; +auto inline ICON_FA_TRADEMARK = "\xef\x89\x9c"; +auto inline ICON_FA_REGISTERED = "\xef\x89\x9d"; +auto inline ICON_FA_CREATIVE_COMMONS = "\xef\x89\x9e"; +auto inline ICON_FA_GG = "\xef\x89\xa0"; +auto inline ICON_FA_GG_CIRCLE = "\xef\x89\xa1"; +auto inline ICON_FA_TRIPADVISOR = "\xef\x89\xa2"; +auto inline ICON_FA_ODNOKLASSNIKI = "\xef\x89\xa3"; +auto inline ICON_FA_ODNOKLASSNIKI_SQUARE = "\xef\x89\xa4"; +auto inline ICON_FA_GET_POCKET = "\xef\x89\xa5"; +auto inline ICON_FA_WIKIPEDIA_W = "\xef\x89\xa6"; +auto inline ICON_FA_SAFARI = "\xef\x89\xa7"; +auto inline ICON_FA_CHROME = "\xef\x89\xa8"; +auto inline ICON_FA_FIREFOX = "\xef\x89\xa9"; +auto inline ICON_FA_OPERA = "\xef\x89\xaa"; +auto inline ICON_FA_INTERNET_EXPLORER = "\xef\x89\xab"; +auto inline ICON_FA_TELEVISION = "\xef\x89\xac"; +auto inline ICON_FA_CONTAO = "\xef\x89\xad"; +auto inline ICON_FA_500PX = "\xef\x89\xae"; +auto inline ICON_FA_AMAZON = "\xef\x89\xb0"; +auto inline ICON_FA_CALENDAR_PLUS_O = "\xef\x89\xb1"; +auto inline ICON_FA_CALENDAR_MINUS_O = "\xef\x89\xb2"; +auto inline ICON_FA_CALENDAR_TIMES_O = "\xef\x89\xb3"; +auto inline ICON_FA_CALENDAR_CHECK_O = "\xef\x89\xb4"; +auto inline ICON_FA_INDUSTRY = "\xef\x89\xb5"; +auto inline ICON_FA_MAP_PIN = "\xef\x89\xb6"; +auto inline ICON_FA_MAP_SIGNS = "\xef\x89\xb7"; +auto inline ICON_FA_MAP_O = "\xef\x89\xb8"; +auto inline ICON_FA_MAP = "\xef\x89\xb9"; +auto inline ICON_FA_COMMENTING = "\xef\x89\xba"; +auto inline ICON_FA_COMMENTING_O = "\xef\x89\xbb"; +auto inline ICON_FA_HOUZZ = "\xef\x89\xbc"; +auto inline ICON_FA_VIMEO = "\xef\x89\xbd"; +auto inline ICON_FA_BLACK_TIE = "\xef\x89\xbe"; +auto inline ICON_FA_FONTICONS = "\xef\x8a\x80"; +auto inline ICON_FA_REDDIT_ALIEN = "\xef\x8a\x81"; +auto inline ICON_FA_EDGE = "\xef\x8a\x82"; +auto inline ICON_FA_CREDIT_CARD_ALT = "\xef\x8a\x83"; +auto inline ICON_FA_CODIEPIE = "\xef\x8a\x84"; +auto inline ICON_FA_MODX = "\xef\x8a\x85"; +auto inline ICON_FA_FORT_AWESOME = "\xef\x8a\x86"; +auto inline ICON_FA_USB = "\xef\x8a\x87"; +auto inline ICON_FA_PRODUCT_HUNT = "\xef\x8a\x88"; +auto inline ICON_FA_MIXCLOUD = "\xef\x8a\x89"; +auto inline ICON_FA_SCRIBD = "\xef\x8a\x8a"; +auto inline ICON_FA_PAUSE_CIRCLE = "\xef\x8a\x8b"; +auto inline ICON_FA_PAUSE_CIRCLE_O = "\xef\x8a\x8c"; +auto inline ICON_FA_STOP_CIRCLE = "\xef\x8a\x8d"; +auto inline ICON_FA_STOP_CIRCLE_O = "\xef\x8a\x8e"; +auto inline ICON_FA_SHOPPING_BAG = "\xef\x8a\x90"; +auto inline ICON_FA_SHOPPING_BASKET = "\xef\x8a\x91"; +auto inline ICON_FA_HASHTAG = "\xef\x8a\x92"; +auto inline ICON_FA_BLUETOOTH = "\xef\x8a\x93"; +auto inline ICON_FA_BLUETOOTH_B = "\xef\x8a\x94"; +auto inline ICON_FA_PERCENT = "\xef\x8a\x95"; +auto inline ICON_FA_GITLAB = "\xef\x8a\x96"; +auto inline ICON_FA_WPBEGINNER = "\xef\x8a\x97"; +auto inline ICON_FA_WPFORMS = "\xef\x8a\x98"; +auto inline ICON_FA_ENVIRA = "\xef\x8a\x99"; +auto inline ICON_FA_UNIVERSAL_ACCESS = "\xef\x8a\x9a"; +auto inline ICON_FA_WHEELCHAIR_ALT = "\xef\x8a\x9b"; +auto inline ICON_FA_QUESTION_CIRCLE_O = "\xef\x8a\x9c"; +auto inline ICON_FA_BLIND = "\xef\x8a\x9d"; +auto inline ICON_FA_AUDIO_DESCRIPTION = "\xef\x8a\x9e"; +auto inline ICON_FA_VOLUME_CONTROL_PHONE = "\xef\x8a\xa0"; +auto inline ICON_FA_BRAILLE = "\xef\x8a\xa1"; +auto inline ICON_FA_ASSISTIVE_LISTENING_SYSTEMS = "\xef\x8a\xa2"; +auto inline ICON_FA_AMERICAN_SIGN_LANGUAGE_INTERPRETING = "\xef\x8a\xa3"; +auto inline ICON_FA_DEAF = "\xef\x8a\xa4"; +auto inline ICON_FA_GLIDE = "\xef\x8a\xa5"; +auto inline ICON_FA_GLIDE_G = "\xef\x8a\xa6"; +auto inline ICON_FA_SIGN_LANGUAGE = "\xef\x8a\xa7"; +auto inline ICON_FA_LOW_VISION = "\xef\x8a\xa8"; +auto inline ICON_FA_VIADEO = "\xef\x8a\xa9"; +auto inline ICON_FA_VIADEO_SQUARE = "\xef\x8a\xaa"; +auto inline ICON_FA_SNAPCHAT = "\xef\x8a\xab"; +auto inline ICON_FA_SNAPCHAT_GHOST = "\xef\x8a\xac"; +auto inline ICON_FA_SNAPCHAT_SQUARE = "\xef\x8a\xad"; +auto inline ICON_FA_PIED_PIPER = "\xef\x8a\xae"; +auto inline ICON_FA_FIRST_ORDER = "\xef\x8a\xb0"; +auto inline ICON_FA_YOAST = "\xef\x8a\xb1"; +auto inline ICON_FA_THEMEISLE = "\xef\x8a\xb2"; +auto inline ICON_FA_GOOGLE_PLUS_OFFICIAL = "\xef\x8a\xb3"; +auto inline ICON_FA_FONT_AWESOME = "\xef\x8a\xb4"; +auto inline ICON_FA_HANDSHAKE_O = "\xef\x8a\xb5"; +auto inline ICON_FA_ENVELOPE_OPEN = "\xef\x8a\xb6"; +auto inline ICON_FA_ENVELOPE_OPEN_O = "\xef\x8a\xb7"; +auto inline ICON_FA_LINODE = "\xef\x8a\xb8"; +auto inline ICON_FA_ADDRESS_BOOK = "\xef\x8a\xb9"; +auto inline ICON_FA_ADDRESS_BOOK_O = "\xef\x8a\xba"; +auto inline ICON_FA_ADDRESS_CARD = "\xef\x8a\xbb"; +auto inline ICON_FA_ADDRESS_CARD_O = "\xef\x8a\xbc"; +auto inline ICON_FA_USER_CIRCLE = "\xef\x8a\xbd"; +auto inline ICON_FA_USER_CIRCLE_O = "\xef\x8a\xbe"; +auto inline ICON_FA_USER_O = "\xef\x8b\x80"; +auto inline ICON_FA_ID_BADGE = "\xef\x8b\x81"; +auto inline ICON_FA_ID_CARD = "\xef\x8b\x82"; +auto inline ICON_FA_ID_CARD_O = "\xef\x8b\x83"; +auto inline ICON_FA_QUORA = "\xef\x8b\x84"; +auto inline ICON_FA_FREE_CODE_CAMP = "\xef\x8b\x85"; +auto inline ICON_FA_TELEGRAM = "\xef\x8b\x86"; +auto inline ICON_FA_THERMOMETER_FULL = "\xef\x8b\x87"; +auto inline ICON_FA_THERMOMETER_THREE_QUARTERS = "\xef\x8b\x88"; +auto inline ICON_FA_THERMOMETER_HALF = "\xef\x8b\x89"; +auto inline ICON_FA_THERMOMETER_QUARTER = "\xef\x8b\x8a"; +auto inline ICON_FA_THERMOMETER_EMPTY = "\xef\x8b\x8b"; +auto inline ICON_FA_SHOWER = "\xef\x8b\x8c"; +auto inline ICON_FA_BATH = "\xef\x8b\x8d"; +auto inline ICON_FA_PODCAST = "\xef\x8b\x8e"; +auto inline ICON_FA_WINDOW_MAXIMIZE = "\xef\x8b\x90"; +auto inline ICON_FA_WINDOW_MINIMIZE = "\xef\x8b\x91"; +auto inline ICON_FA_WINDOW_RESTORE = "\xef\x8b\x92"; +auto inline ICON_FA_WINDOW_CLOSE = "\xef\x8b\x93"; +auto inline ICON_FA_WINDOW_CLOSE_O = "\xef\x8b\x94"; +auto inline ICON_FA_BANDCAMP = "\xef\x8b\x95"; +auto inline ICON_FA_GRAV = "\xef\x8b\x96"; +auto inline ICON_FA_ETSY = "\xef\x8b\x97"; +auto inline ICON_FA_IMDB = "\xef\x8b\x98"; +auto inline ICON_FA_RAVELRY = "\xef\x8b\x99"; +auto inline ICON_FA_EERCAST = "\xef\x8b\x9a"; +auto inline ICON_FA_MICROCHIP = "\xef\x8b\x9b"; +auto inline ICON_FA_SNOWFLAKE_O = "\xef\x8b\x9c"; +auto inline ICON_FA_SUPERPOWERS = "\xef\x8b\x9d"; +auto inline ICON_FA_WPEXPLORER = "\xef\x8b\x9e"; +auto inline ICON_FA_MEETUP = "\xef\x8b\xa0"; \ No newline at end of file diff --git a/KaguEngine/src/systems/RenderSystem.cpp b/KaguEngine/src/systems/RenderSystem.cpp index 15ddb61..332007d 100644 --- a/KaguEngine/src/systems/RenderSystem.cpp +++ b/KaguEngine/src/systems/RenderSystem.cpp @@ -23,6 +23,7 @@ namespace KaguEngine { struct SimplePushConstantData { glm::mat4 modelMatrix{1.f}; glm::mat4 normalMatrix{1.f}; + float modelAlpha{1.f}; }; RenderSystem::RenderSystem( @@ -98,6 +99,7 @@ void RenderSystem::renderGameObjects(const FrameInfo &frameInfo) const { SimplePushConstantData push{}; push.modelMatrix = obj.transform.mat4(); push.normalMatrix = obj.transform.normalMatrix(); + push.modelAlpha = obj.transform.alpha; vkCmdPushConstants(frameInfo.commandBuffer, m_pipelineLayout, VK_SHADER_STAGE_VERTEX_BIT | VK_SHADER_STAGE_FRAGMENT_BIT, 0,