Skip to content

Commit

Permalink
book
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Jan 7, 2024
1 parent b00938c commit 78da359
Show file tree
Hide file tree
Showing 12 changed files with 321 additions and 690 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/Win_Mac_Linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
submodules: true

- name: apt install xorg-dev libglfw3-dev libsdl2-dev libfreetype-dev (ubuntu only)
- name: apt install xorg-dev libglfw3-dev libsdl2-dev libfreetype-dev (ubuntu only)
if: ${{ matrix.platform == 'ubuntu-latest' }}
run: sudo apt-get update && sudo apt-get install -y xorg-dev libglfw3-dev libsdl2-dev libfreetype-dev

Expand Down
47 changes: 37 additions & 10 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,21 +45,25 @@ include(hello_imgui_add_app)
# On desktop platforms, it will install the "app exe" and the "assets" folder in the install folder.
option(HELLOIMGUI_ADD_APP_WITH_INSTALL "Add cmake install() instructions with hello_imgui_add_app" ON)

# </hello_imgui_add_app> # do not remove this line (used by the script that generates the documentation)

###############################################################################
# HelloImGui Build options
###############################################################################

################################################################################
# <Backends> # do not remove this line (used by the script that generates the documentation)
# Available backends combinations: HelloImGui needs to use at least one of them.
# If you specify no option:
# - HELLOIMGUI_USE_GLFW_OPENGL3 will be used for Windows, Linux, and macOS
# - HELLOIMGUI_USE_SDL_OPENGL3 will be used for Android, iOS and emscripten
#
# Note:
# - Only one rendering backend can be used at a time (OpenGL3, Metal or Vulkan)!
# - You may select multiple platform backends (for example, you may select both SDL and Glfw3)
# - Combinations using OpenGL3 as a renderer are easier to use, and are recommended, especially for beginners.
# - You may select multiple platform backends
# (for example, you may select both SDL and Glfw3)
# - Combinations using OpenGL3 as a renderer are easier to use,
# and are recommended, especially for beginners.
################################################################################
# Standard backends:
# Use Glfw3 + OpenGl3
Expand All @@ -86,6 +90,9 @@ option(HELLOIMGUI_USE_GLFW_DIRECTX11 "Build HelloImGui for Glfw3+DirectX11" OFF)
# Experimental! DirectX12 was not tested, although it does compile!
option(HELLOIMGUI_USE_SDL_DIRECTX12 "Build HelloImGui for SDL2+DirectX12" OFF)

# </Backends> # do not remove this line (used by the script that generates the documentation)


#------------------------------------------------------------------------------
# Options / Freetype
#------------------------------------------------------------------------------
Expand All @@ -99,19 +106,38 @@ endif()
option(HELLOIMGUI_USE_FREETYPE "Use freetype for text rendering" ${freetype_default})

#------------------------------------------------------------------------------
# <Dependencies> # do not remove this line (used by the script that generates the documentation)
# Automatic download of Glfw3, SDL2, and Freetype (provided as a convenience)
# (disabled by default on Linux, which prefers to use the system libraries,
#
# (this is disabled by default on Linux, which prefers to use the system libraries,
# enabled by default on other platforms)
#
# Note:
# - SDL and Glfw3 will be downloaded if:
#
# SDL and Glfw3 will be downloaded only if:
# -----------------------------------------
# - HELLOIMGUI_DOWNLOAD_GLFW_IF_NEEDED or HELLOIMGUI_DOWNLOAD_SDL_IF_NEEDED is ON
# - HELLOIMGUI_USE_SDL_XXXX or HELLOIMGUI_USE_GLFW_XXXX is ON
# - find_package(glfw3 or SDL2) fails. If a system library is found, or a user library provided
# in a path added to CMAKE_PREFIX_PATH, it will be used instead
# - In the case of Glfw3, if a target named glfw is already defined, it will be used instead
# - Freetype will be downloaded if:
# - HELLOIMGUI_DOWNLOAD_FREETYPE is ON, HELLOIMGUI_USE_FREETYPE is ON, and find_package(freetype) fails
# - Or of HELLOIMGUI_FREETYPE_STATIC is ON
# - SDL and/or Glfw3 were not added as CMake target
# (add_subdirectory(external/SDL) or add_subdirectory(external/glfw) for example)
# - find_package(glfw3 or SDL2) fails. If a system library is found,
# or a user library provided in a path added to CMAKE_PREFIX_PATH,
# it will be used instead
#
# - Freetype will be downloaded only if:
# --------------------------------------
# - HELLOIMGUI_DOWNLOAD_FREETYPE is ON, HELLOIMGUI_USE_FREETYPE is ON
# - Freetype was not added as a CMake target
# (add_subdirectory(external/freetype) for example)
# - find_package(freetype) fails
# (it will also be forcibly downloaded if HELLOIMGUI_FREETYPE_STATIC is ON)
#
#
# Automatic download of SDL2, Glfw3, and Freetype is disabled by default on Linux,
# because it is recommended to use the system libraries instead:
# On ubuntu, you can install them with:
# sudo apt install libglfw3-dev libsdl2-dev libfreetype-dev
#
#------------------------------------------------------------------------------
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
set(autodownload_default OFF)
Expand All @@ -123,6 +149,7 @@ option(HELLOIMGUI_DOWNLOAD_SDL_IF_NEEDED "Download and build GLFW if needed" ${a
option(HELLOIMGUI_DOWNLOAD_FREETYPE_IF_NEEDED "Download and build Freetype if needed" ${autodownload_default})
option(HELLOIMGUI_FREETYPE_STATIC "Force static linking of freetype (only used for python bindings)" OFF)

# </Dependencies> # do not remove this line (used by the script that generates the documentation)

#------------------------------------------------------------------------------
# Options / Windows: provide WinMain automatically
Expand Down
33 changes: 0 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,2 @@
<img src="logo/logo_hello_imgui.png" width="200">


# Hello ImGui


<table style="border-style: none">
<tr><td align="center"><a href="https://www.youtube.com/watch?v=dArP4lBnOr8">
<img src="docs/book_src/images/yt_multiplatform.jpg" height="120"></a></td></tr>
<tr><td><i>10' demo video showcasing multi-platform support<br/> and rapid development with Hello ImGui</i></td></tr>
</table><t></t>






-------------------
__Table of contents__

<span id="TOC"/></span>

* [Hello ImGui](#hello-imgui)
* [Online interactive development platform](#online-interactive-development-platform)

--------------------




---

# Online interactive development platform

You can test developing with Hello ImGui in 1 minute, *without even installing anything*, thanks to [Gitpod.io](https://gitpod.io)'s online development platform: [Open Hello ImGui inside Gitpod](https://gitpod.io/#https://github.com/pthom/hello_imgui/) (58 seconds [demo video](https://www.youtube.com/watch?v=1cgemZQ2CMc) on youtube)
2 changes: 1 addition & 1 deletion _example_integration
Loading

0 comments on commit 78da359

Please sign in to comment.