Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • gamedev/fggl
  • onuralpsezer/fggl
2 results
Show changes
Showing
with 1148 additions and 218 deletions
# headers
file(GLOB_RECURSE HEADER_LIST CONFIGURE_DEPENDS "${CMAKE_SOURCE_DIR}/include/fggl/**.hpp")
# the fggl library itself
# Should be shared linkage for legal reasons (LGPL)
add_library(fggl ${HEADER_LIST})
target_link_libraries(fggl PUBLIC entt)
# we need to tell people using the library about our headers
target_include_directories(fggl
PUBLIC
......@@ -31,6 +33,14 @@ if (CLANG_TIDY_FOUND)
set(CMAKE_CXX_CLANG_TIDY clang-tidy -checks=*,-llvmlibc-*,-fuchsia-*,-cppcoreguidelines-*,-android-*,-llvm-*,-altera-*,-modernize-use-trailing-return-type)
endif ()
# the important stuff everything else uses
add_subdirectory(math)
add_subdirectory(util)
add_subdirectory(grid)
add_subdirectory(assets)
add_subdirectory(phys)
target_sources(${PROJECT_NAME}
PRIVATE
app.cpp
......@@ -38,11 +48,7 @@ target_sources(${PROJECT_NAME}
data/model.cpp
data/procedural.cpp
data/heightmap.cpp
ecs/ecs.cpp
ecs3/module/module.cpp
ecs3/fast/Container.cpp
ecs3/prototype/world.cpp
data/module.cpp
scenes/menu.cpp
scenes/game.cpp
......@@ -50,35 +56,35 @@ target_sources(${PROJECT_NAME}
input/input.cpp
input/mouse.cpp
input/camera_input.cpp
)
gui/widget.cpp
gui/widgets.cpp
gui/containers.cpp
gui/fonts.cpp
math/triangulation.cpp
math/shapes.cpp
)
# GUI support
add_subdirectory(gui)
# yaml-cpp for configs and storage
find_package(yaml-cpp)
target_link_libraries(fggl PUBLIC yaml-cpp)
# spdlog for cleaner logging
find_package(spdlog)
target_link_libraries(${PROJECT_NAME} PRIVATE spdlog::spdlog)
find_package(freetype)
target_link_libraries(${PROJECT_NAME} PUBLIC freetype)
# model loading
add_subdirectory(data/assimp)
# Graphics backend
add_subdirectory(gfx)
add_subdirectory(audio)
# physics integration
add_subdirectory(phys/bullet)
# Debug backend
add_subdirectory(debug)
# platform integrations
add_subdirectory(platform)
add_subdirectory(entity)
##
# begin windows support
##
if (MSVC)
target_compile_options(${PROJECT_NAME} PUBLIC "/ZI")
target_link_options(${PROJECT_NAME} PUBLIC "/INCREMENTAL")
endif ()
/*
* This file is part of FGGL.
*
* FGGL is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* FGGL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with FGGL.
* If not, see <https://www.gnu.org/licenses/>.
*/
// the configured options and settings for Tutorial
#define FGGL_VERSION_MAJOR @FGGL_VERSION_MAJOR@
#define FGGL_VERSION_MINOR @FGGL_VERSION_MINOR@
This diff is collapsed.
target_sources(fggl PRIVATE
module.cpp
types.cpp
packed/module.cpp
)
\ No newline at end of file
/*
* This file is part of FGGL.
*
* FGGL is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* FGGL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with FGGL.
* If not, see <https://www.gnu.org/licenses/>.
*/
//
// Created by webpigeon on 20/08/22.
//
#include "fggl/assets/module.hpp"
namespace fggl::assets {
auto AssetFolders::factory(modules::ServiceName service, modules::Services &services) -> bool {
if (service == Loader::service) {
auto *storage = services.get<data::Storage>();
auto *checkin = services.get<CheckinAdapted>();
services.create<Loader>(storage, checkin);
return true;
}
if (service == AssetManager::service) {
services.create<AssetManager>();
return true;
}
return false;
}
} // namespace fggl::assets
\ No newline at end of file
/*
* This file is part of FGGL.
*
* FGGL is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
* later version.
*
* FGGL is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
* of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License along with FGGL.
* If not, see <https://www.gnu.org/licenses/>.
*/
//
// Created by webpigeon on 20/08/22.
//
#include "fggl/assets/packed/module.hpp"
namespace fggl::assets {
auto PackedAssets::factory(modules::ServiceName service, modules::Services &services) -> bool {
if (service == RawCheckin::service) {
services.create<RawCheckin>();
return true;
}
if (service == CheckinAdapted::service) {
auto* storage = services.get<data::Storage>();
auto* rawCheckin = services.get<RawCheckin>();
services.create<CheckinAdapted>(storage, rawCheckin);
return true;
}
return false;
}
} // namespace fggl::assets
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
target_sources(fggl
PRIVATE
types.cpp
types.cpp
)
)
add_subdirectory(openal)
\ No newline at end of file
add_subdirectory(openal)
add_subdirectory(fallback)
\ No newline at end of file
target_sources(fggl
PRIVATE
audio.cpp
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
find_package(assimp CONFIG)
if (MSVC)
target_link_libraries(${PROJECT_NAME} PUBLIC assimp::assimp)
else ()
target_link_libraries(${PROJECT_NAME} PUBLIC assimp)
endif ()
target_sources(fggl
PRIVATE
module.cpp
image.cpp
)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.