diff --git a/examples/README.txt b/examples/README.txt index 8ec8e75..1f00756 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,7 +48,7 @@ opengl2_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 graphic pipeline). + 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 @@ -57,7 +57,7 @@ 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. @@ -76,15 +76,18 @@ 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. diff --git a/examples/README.txt b/examples/README.txt index 8ec8e75..1f00756 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,7 +48,7 @@ opengl2_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 graphic pipeline). + 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 @@ -57,7 +57,7 @@ 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. @@ -76,15 +76,18 @@ 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. diff --git a/examples/opengl2_example/imgui_impl_glfw.cpp b/examples/opengl2_example/imgui_impl_glfw.cpp index b6bb56a..364d928 100644 --- a/examples/opengl2_example/imgui_impl_glfw.cpp +++ b/examples/opengl2_example/imgui_impl_glfw.cpp @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/README.txt b/examples/README.txt index 8ec8e75..1f00756 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,7 +48,7 @@ opengl2_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 graphic pipeline). + 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 @@ -57,7 +57,7 @@ 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. @@ -76,15 +76,18 @@ 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. diff --git a/examples/opengl2_example/imgui_impl_glfw.cpp b/examples/opengl2_example/imgui_impl_glfw.cpp index b6bb56a..364d928 100644 --- a/examples/opengl2_example/imgui_impl_glfw.cpp +++ b/examples/opengl2_example/imgui_impl_glfw.cpp @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/opengl2_example/imgui_impl_glfw.h b/examples/opengl2_example/imgui_impl_glfw.h index 22f910e..d04a84f 100644 --- a/examples/opengl2_example/imgui_impl_glfw.h +++ b/examples/opengl2_example/imgui_impl_glfw.h @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/README.txt b/examples/README.txt index 8ec8e75..1f00756 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,7 +48,7 @@ opengl2_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 graphic pipeline). + 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 @@ -57,7 +57,7 @@ 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. @@ -76,15 +76,18 @@ 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. diff --git a/examples/opengl2_example/imgui_impl_glfw.cpp b/examples/opengl2_example/imgui_impl_glfw.cpp index b6bb56a..364d928 100644 --- a/examples/opengl2_example/imgui_impl_glfw.cpp +++ b/examples/opengl2_example/imgui_impl_glfw.cpp @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/opengl2_example/imgui_impl_glfw.h b/examples/opengl2_example/imgui_impl_glfw.h index 22f910e..d04a84f 100644 --- a/examples/opengl2_example/imgui_impl_glfw.h +++ b/examples/opengl2_example/imgui_impl_glfw.h @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/sdl_opengl2_example/imgui_impl_sdl.cpp b/examples/sdl_opengl2_example/imgui_impl_sdl.cpp index 2982f8d..66f3ed5 100644 --- a/examples/sdl_opengl2_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl2_example/imgui_impl_sdl.cpp @@ -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. diff --git a/examples/README.txt b/examples/README.txt index 8ec8e75..1f00756 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,7 +48,7 @@ opengl2_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 graphic pipeline). + 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 @@ -57,7 +57,7 @@ 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. @@ -76,15 +76,18 @@ 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. diff --git a/examples/opengl2_example/imgui_impl_glfw.cpp b/examples/opengl2_example/imgui_impl_glfw.cpp index b6bb56a..364d928 100644 --- a/examples/opengl2_example/imgui_impl_glfw.cpp +++ b/examples/opengl2_example/imgui_impl_glfw.cpp @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/opengl2_example/imgui_impl_glfw.h b/examples/opengl2_example/imgui_impl_glfw.h index 22f910e..d04a84f 100644 --- a/examples/opengl2_example/imgui_impl_glfw.h +++ b/examples/opengl2_example/imgui_impl_glfw.h @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/sdl_opengl2_example/imgui_impl_sdl.cpp b/examples/sdl_opengl2_example/imgui_impl_sdl.cpp index 2982f8d..66f3ed5 100644 --- a/examples/sdl_opengl2_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl2_example/imgui_impl_sdl.cpp @@ -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. diff --git a/examples/sdl_opengl2_example/imgui_impl_sdl.h b/examples/sdl_opengl2_example/imgui_impl_sdl.h index ea94f69..32d7bc0 100644 --- a/examples/sdl_opengl2_example/imgui_impl_sdl.h +++ b/examples/sdl_opengl2_example/imgui_impl_sdl.h @@ -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. diff --git a/examples/README.txt b/examples/README.txt index 8ec8e75..1f00756 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -48,7 +48,7 @@ opengl2_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 graphic pipeline). + 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 @@ -57,7 +57,7 @@ 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. @@ -76,15 +76,18 @@ 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. diff --git a/examples/opengl2_example/imgui_impl_glfw.cpp b/examples/opengl2_example/imgui_impl_glfw.cpp index b6bb56a..364d928 100644 --- a/examples/opengl2_example/imgui_impl_glfw.cpp +++ b/examples/opengl2_example/imgui_impl_glfw.cpp @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/opengl2_example/imgui_impl_glfw.h b/examples/opengl2_example/imgui_impl_glfw.h index 22f910e..d04a84f 100644 --- a/examples/opengl2_example/imgui_impl_glfw.h +++ b/examples/opengl2_example/imgui_impl_glfw.h @@ -1,4 +1,4 @@ -// ImGui GLFW binding with OpenGL (legacy fixed pipeline) +// 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.) diff --git a/examples/sdl_opengl2_example/imgui_impl_sdl.cpp b/examples/sdl_opengl2_example/imgui_impl_sdl.cpp index 2982f8d..66f3ed5 100644 --- a/examples/sdl_opengl2_example/imgui_impl_sdl.cpp +++ b/examples/sdl_opengl2_example/imgui_impl_sdl.cpp @@ -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. diff --git a/examples/sdl_opengl2_example/imgui_impl_sdl.h b/examples/sdl_opengl2_example/imgui_impl_sdl.h index ea94f69..32d7bc0 100644 --- a/examples/sdl_opengl2_example/imgui_impl_sdl.h +++ b/examples/sdl_opengl2_example/imgui_impl_sdl.h @@ -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. diff --git a/examples/sdl_opengl2_example/main.cpp b/examples/sdl_opengl2_example/main.cpp index cfa43e8..77241a5 100644 --- a/examples/sdl_opengl2_example/main.cpp +++ b/examples/sdl_opengl2_example/main.cpp @@ -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