Started thedmd/imgui-node-editor integration

This commit is contained in:
Martin Felis
2023-04-21 11:55:36 +02:00
parent 2dbf8373a8
commit 8dfc8dd05c
88 changed files with 35298 additions and 5 deletions
@@ -0,0 +1,12 @@
project(ScopeGuard)
add_library(ScopeGuard INTERFACE)
set(_ScopeGuard_Sources
${CMAKE_CURRENT_SOURCE_DIR}/ScopeGuard.h
)
target_include_directories(ScopeGuard INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(ScopeGuard INTERFACE ${_ScopeGuard_Sources})
source_group("ThirdParty\\ScopeGuard" FILES ${_ScopeGuard_Sources})
@@ -0,0 +1,42 @@
# pragma once
# include <utility>
# define AX_CONCATENATE_IMPL(s1, s2) s1##s2
# define AX_CONCATENATE(s1, s2) AX_CONCATENATE_IMPL(s1, s2)
# ifdef __COUNTER__
# define AX_ANONYMOUS_VARIABLE(str) AX_CONCATENATE(str, __COUNTER__)
# else
# define AX_ANONYMOUS_VARIABLE(str) AX_CONCATENATE(str, __LINE__)
# endif
namespace ax {
namespace scopeguard_detail {
enum class ScopeGuardOnExit {};
template <typename F>
class ScopeGuard
{
F f_;
bool active_;
public:
ScopeGuard() = delete;
ScopeGuard(const ScopeGuard&) = delete;
ScopeGuard& operator=(const ScopeGuard&) = delete;
ScopeGuard(ScopeGuard&& rhs): f_(std::move(rhs.f_)), active_(rhs.active_) { rhs.dismiss(); }
ScopeGuard(F f): f_(std::move(f)), active_(true) {}
~ScopeGuard() { if (active_) f_(); }
void dismiss() { active_ = false; }
};
template <typename F>
inline ScopeGuard<F> operator+(ScopeGuardOnExit, F&& f)
{
return ScopeGuard<F>(std::forward<F>(f));
}
} // namespace scopeguard_detail
} // namespace ax
# define AX_SCOPE_EXIT \
auto AX_ANONYMOUS_VARIABLE(AX_SCOPE_EXIT_STATE) \
= ::ax::scopeguard_detail::ScopeGuardOnExit() + [&]()
+19
View File
@@ -0,0 +1,19 @@
set(_gl3w_Sources
Include/GL/gl3w.h
Include/GL/glcorearb.h
Source/gl3w.c
)
source_group("" FILES ${_gl3w_Sources})
add_library(gl3w STATIC ${_gl3w_Sources})
target_include_directories(gl3w PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/Include)
if (UNIX AND (NOT APPLE))
# Linux: GL is required to pull glXGetProcAddress
target_link_libraries(gl3w PRIVATE GL dl)
endif()
set_property(TARGET gl3w PROPERTY FOLDER "external")
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,12 @@
project(stb_image)
add_library(stb_image INTERFACE)
set(_stb_image_Sources
${CMAKE_CURRENT_SOURCE_DIR}/stb_image.h
)
target_include_directories(stb_image INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_sources(stb_image INTERFACE ${_stb_image_Sources})
source_group("ThirdParty\\stb_image" FILES ${_stb_image_Sources})
File diff suppressed because it is too large Load Diff