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 1385 additions and 1427 deletions
/*
* 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/data/module.hpp"
namespace fggl::data {
auto LocalStorage::factory(modules::ServiceName service, modules::Services &data) -> bool {
if (service == SERVICE_STORAGE) {
// FIXME: no easy way to set the application name
auto pathConfig = fggl::platform::calc_engine_paths("fggl-demo");
data.create<Storage>(pathConfig);
return true;
}
return false;
}
} // namespace fggl::data
\ No newline at end of file
This diff is collapsed.
target_sources(fggl
PRIVATE
debug.cpp
debug_draw.cpp
)
PRIVATE
debug.cpp
debug_draw.cpp
logging.cpp
)
# spdlog for cleaner logging
find_package(spdlog)
......
......@@ -14,17 +14,17 @@
#include <fggl/debug/debug.h>
#include <imgui.h>
#include "imgui.h"
#include "imgui/include/imgui_impl_glfw.h"
#include "imgui/include/imgui_impl_opengl3.h"
using fggl::debug::DebugUI;
DebugUI::DebugUI(std::shared_ptr<fggl::display::glfw::Window>& win) : m_visible(false) {
DebugUI::DebugUI(std::shared_ptr<fggl::display::glfw::Window> &win) : m_visible(false) {
IMGUI_CHECKVERSION();
ImGui::CreateContext();
ImGuiIO& io = ImGui::GetIO();
ImGuiIO &io = ImGui::GetIO();
io.IniFilename = nullptr;
ImGui_ImplGlfw_InitForOpenGL(win->handle(), true);
......@@ -45,14 +45,14 @@ void DebugUI::frameStart() {
}
void DebugUI::draw() {
for ( auto& [name, data] : m_windows) {
if ( data.m_visible ) {
data.m_callback( &data.m_visible );
for (auto &[name, data] : m_windows) {
if (data.m_visible) {
data.m_callback(&data.m_visible);
}
}
ImGui::Render();
if ( m_visible ) {
if (m_visible) {
ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
}
}
target_link_libraries(fggl PUBLIC imgui)
target_link_libraries(fggl PRIVATE imgui)
target_sources( fggl
PRIVATE
target_sources(fggl
PRIVATE
imgui_impl_glfw.cpp
imgui_impl_opengl3.cpp
)
)
target_include_directories( fggl
PRIVATE
target_include_directories(fggl
PRIVATE
include/
)
\ No newline at end of file
)
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
target_sources(fggl
PRIVATE
loader/loader.cpp
module.cpp
)
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.