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 1489 additions and 1084 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 11/09/22.
//
#ifdef __GNUG__
#include <cstdlib>
#include <memory>
#include <cxxabi.h>
namespace fggl::debug {
auto demangle(const char *name) -> std::string {
int status = -4;
std::unique_ptr<char, decltype(&std::free)> res{
abi::__cxa_demangle(name, nullptr, nullptr, &status),
std::free
};
return (status == 0) ? res.get() : name;
}
}
#else
namespace fggl::debug {
std::string demangle(const char* name) {
return name;
}
}
#endif
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.
# Sources
find_package( glfw3 REQUIRED )
find_package(glfw3 REQUIRED)
include(CMakePrintHelpers)
cmake_print_variables(GLFW_TARGETS)
target_link_libraries(fggl PUBLIC glfw )
target_link_libraries(fggl PUBLIC glfw fggl-glad)
target_sources(fggl
PRIVATE
window.cpp
input.cpp
PRIVATE
window.cpp
input.cpp
atlas.cpp
)
)
# OpenGL backend
add_subdirectory(ogl)
......
This diff is collapsed.
This diff is collapsed.
# Sources
target_sources(fggl
PRIVATE
glad.c
backend.cpp
shader.cpp
renderer.cpp
types.cpp
)
PRIVATE
backend.cpp
shader.cpp
renderer.cpp
types.cpp
)
# OpenGL Backend
find_package( OpenGL REQUIRED )
if ( MSVC )
target_link_libraries(${PROJECT_NAME} PUBLIC OpenGL::GL)
else()
target_link_libraries(${PROJECT_NAME} PRIVATE OpenGL::OpenGL)
endif()
find_package(OpenGL REQUIRED)
if (MSVC)
target_link_libraries(${PROJECT_NAME} PUBLIC OpenGL::GL)
else ()
target_link_libraries(${PROJECT_NAME} PRIVATE OpenGL::OpenGL)
endif ()
# FreeType
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.