Skip to content

Commit

Permalink
imgui cloudlife
Browse files Browse the repository at this point in the history
  • Loading branch information
yekm committed Jan 12, 2023
1 parent cecf9f5 commit 54a7366
Show file tree
Hide file tree
Showing 4 changed files with 381 additions and 123 deletions.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@ cmake_minimum_required(VERSION 3.16.3)
project(imgui-cmake LANGUAGES C CXX)


set (CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native")
set (CMAKE_C_FLAGS_RELEASE "-O3 -march=native")
set (CMAKE_CXX_FLAGS_DEBUG "-O0 -ggdb3 -fsanitize=address")
set (CMAKE_C_FLAGS_DEBUG "-O0 -ggdb3 -fsanitize=address")
set (CMAKE_VERBOSE_MAKEFILE TRUE)


# https://github.com/Pesc0/imgui-cmake
######### IMGUI #######################

Expand Down Expand Up @@ -35,6 +42,7 @@ target_link_libraries(IMGUI PUBLIC ${CMAKE_DL_LIBS})
#######################################################

find_package(glfw3)
#add_subdirectory(colormap)

add_executable(cloudlife)
target_sources(cloudlife PUBLIC main.cpp imgui_elements.cpp)
Expand Down
4 changes: 4 additions & 0 deletions imgui_elements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,7 @@ bool ScrollableSliderInt(const char* label, int* v, int v_min, int v_max, const
}
return rv;
}

bool ScrollableSliderUInt(const char* label, unsigned* v, unsigned v_min, unsigned v_max, const char* format, float scrollFactor) {
return ScrollableSliderInt(label, (int*)v, (int)v_min, (int)v_max, format, scrollFactor);
}
1 change: 1 addition & 0 deletions imgui_elements.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
bool BitField(const char* label, unsigned* bits, unsigned* hoverIndex);
bool ScrollableSliderFloat(const char* label, float* v, float v_min, float v_max, const char* format, float scrollFactor);
bool ScrollableSliderInt(const char* label, int* v, int v_min, int v_max, const char* format, float scrollFactor);
bool ScrollableSliderUInt(const char* label, unsigned* v, unsigned v_min, unsigned v_max, const char* format, float scrollFactor);
Loading

0 comments on commit 54a7366

Please sign in to comment.