https://github.com/mes0903/mes_imgui_template
https://github.com/mes0903/mes_imgui_template
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/mes0903/mes_imgui_template
- Owner: Mes0903
- Created: 2022-11-18T19:06:49.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-04-10T17:19:38.000Z (about 1 year ago)
- Last Synced: 2025-02-08T14:45:35.139Z (4 months ago)
- Language: C++
- Size: 3.79 MB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mes_Imgui_template
This is a template of Imgui + Implot Project, with opengl + glfw backend.
This template is built with CMake, supporting both Windows and Linux.

# Dependencies
+ OpenGL
On Windows, you can download it in Visual Studio.# How to build
```bash
git clone https://github.com/Mes0903/Mes_Imgui_template.git
cd Mes_Imgui_template
git submodule init
git submodule update
mkdir build && cd build
cmake ..
cmake --build .
```## wsl
if you are using WSL as your environment, you may encounter the wayland-scanner error:
> ... failed to find wayland-scanner
In this case, you can uncomment the cmake flag for glfw to disable wayland:
```cmake
# 3rdparty/CMakeLists.txtif(UNIX)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_WAYLAND OFF CACHE BOOL "" FORCE)
endif()add_subdirectory(glfw)
```## glad
Glad in this template is for opengl 4.6, so you need to change the version of glad if you are using a different version of opengl.
You can download the correspond version on the [glad loader website](https://glad.dav1d.de/).
# mingw64
I'm not quite familar with mingw, but this is how I compile with mingw64:
```bash
C:\mingw64\bin\cmake.EXE --no-warn-unused-cli -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=TRUE -DCMAKE_C_COMPILER:FILEPATH=C:\mingw64\bin\gcc.exe -DCMAKE_CXX_COMPILER:FILEPATH=C:\mingw64\bin\g++.exe -SD:/document/GitHub/Mes_Imgui_template -Bd:/document/GitHub/Mes_Imgui_template/build -G "MinGW Makefiles"cd build
cmake --build .
```The path of my project was `D:\document\GitHub\Mes_Imgui_template`, and the path of my mingw was `C:\mingw64`, please changed the path to yours.
(This command is generated by Visual Studio Code, so it may not be the best way to compile with mingw64.)