Merge branch 'master' into navigation

# Conflicts:
#	imgui.cpp
This commit is contained in:
omar 2017-11-24 16:55:31 +01:00
commit f5c47faee8
9 changed files with 46 additions and 34 deletions

View File

@ -46,17 +46,18 @@ Also note that some setup or GPU drivers may be causing extra lag (possibly by e
leaving you with no option but sadness/anger (Intel GPU drivers were reported as such).
opengl2_example/
*DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
GLFW + OpenGL example (old, fixed graphic pipeline).
This is mostly provided as a reference to learn how ImGui integration works, because it is easier to read.
If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything
more complicated, will require your code to reset every single OpenGL attributes to their initial state,
and might confuse your GPU driver. Prefer using opengl3_example.
**DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
**Prefer using the code in the opengl3_example/ folder**
GLFW + OpenGL example (legacy, fixed pipeline).
This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
confuse your GPU driver.
opengl3_example/
GLFW + OpenGL example (programmable pipeline, binding modern functions with GL3W).
This uses more modern OpenGL calls and custom shaders.
Prefer using that if you are using modern OpenGL3/4 in your application.
Prefer using that if you are using modern OpenGL in your application (anything with shaders, vbo, vao, etc.).
directx9_example/
DirectX9 example, Windows only.
@ -75,15 +76,18 @@ apple_example/
Synergy keyboard integration is rather hacky.
sdl_opengl2_example/
*DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
SDL2 + OpenGL example (old fixed pipeline).
This is mostly provided as a reference to learn how ImGui integration works, because it is easier to read.
If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything
more complicated, will require your code to reset every single OpenGL attributes to their initial state,
and might confuse your GPU driver. Prefer using sdl_opengl3_example.
**DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
**Prefer using the code in the sdl_opengl3_example/ folder**
SDL2 + OpenGL example (legacy, fixed pipeline).
This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
confuse your GPU driver.
sdl_opengl3_example/
SDL2 + OpenGL3 example.
This uses more modern OpenGL calls and custom shaders.
Prefer using that if you are using modern OpenGL in your application (anything with shaders, vbo, vao, etc.).
allegro5_example/
Allegro 5 example.

View File

@ -1,12 +1,13 @@
// ImGui GLFW binding with OpenGL
// ImGui GLFW binding with OpenGL (legacy, fixed pipeline)
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// *DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
// This is mostly provided as a reference to learn how ImGui integration works, because it is easier to read.
// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything
// more complicated, will require your code to reset every single OpenGL attributes to their initial state,
// and might confuse your GPU driver. Prefer using opengl3_example.
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the opengl3_example/ folder**
// This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
// complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
// confuse your GPU driver.
// The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.

View File

@ -1,8 +1,9 @@
// ImGui GLFW binding with OpenGL
// ImGui GLFW binding with OpenGL (legacy, fixed pipeline)
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// *DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the opengl3_example/ folder**
// See imgui_impl_glfw.cpp for details.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.

View File

@ -1,8 +1,9 @@
// ImGui - standalone example application for GLFW + OpenGL 2, using fixed pipeline
// ImGui - standalone example application for GLFW + OpenGL2, using legacy fixed pipeline
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// *DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the opengl3_example/ folder**
// See imgui_impl_glfw.cpp for details.
#include <imgui.h>

View File

@ -1,12 +1,13 @@
// ImGui SDL2 binding with OpenGL
// ImGui SDL2 binding with OpenGL (legacy, fixed pipeline)
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// *DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
// This is mostly provided as a reference to learn how ImGui integration works, because it is easier to read.
// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything
// more complicated, will require your code to reset every single OpenGL attributes to their initial state,
// and might confuse your GPU driver. Prefer using sdl_opengl3_example.
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the sdl_opengl3_example/ folder**
// This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
// complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
// confuse your GPU driver.
// The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.

View File

@ -1,7 +1,11 @@
// ImGui SDL2 binding with OpenGL
// ImGui SDL2 binding with OpenGL (legacy, fixed pipeline)
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the sdl_opengl3_example/ folder**
// See imgui_impl_sdl.cpp for details.
// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.

View File

@ -2,7 +2,8 @@
// If you are new to ImGui, see examples/README.txt and documentation at the top of imgui.cpp.
// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
// *DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL*
// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
// **Prefer using the code in the sdl_opengl3_example/ folder**
// See imgui_impl_sdl.cpp for details.
#include <imgui.h>

View File

@ -108,8 +108,7 @@
- Add the Dear ImGui source files to your projects, using your preferred build system.
It is recommended you build the .cpp files as part of your project and not as a library.
- You can later customize the imconfig.h file to tweak some compilation time behavior, such as integrating imgui types with your own maths types.
- See examples/ folder for standalone sample applications. To understand the integration process, you can read examples/opengl2_example/ because
it is short, then switch to the one more appropriate to your use case.
- See examples/ folder for standalone sample applications.
- You may be able to grab and copy a ready made imgui_impl_*** file from the examples/.
- When using Dear ImGui, your programming IDE is your friend: follow the declaration of variables, functions and types to find comments about them.

View File

@ -241,8 +241,8 @@ void ImGui::StyleColorsLight(ImGuiStyle* dst)
colors[ImGuiCol_FrameBgHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.40f);
colors[ImGuiCol_FrameBgActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f);
colors[ImGuiCol_TitleBg] = ImVec4(0.96f, 0.96f, 0.96f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f);
colors[ImGuiCol_TitleBgActive] = ImVec4(0.82f, 0.82f, 0.82f, 1.00f);
colors[ImGuiCol_TitleBgCollapsed] = ImVec4(1.00f, 1.00f, 1.00f, 0.51f);
colors[ImGuiCol_MenuBarBg] = ImVec4(0.86f, 0.86f, 0.86f, 1.00f);
colors[ImGuiCol_ScrollbarBg] = ImVec4(0.98f, 0.98f, 0.98f, 0.53f);
colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.69f, 0.69f, 0.69f, 0.80f);