mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 20:18:47 +02:00
Examples: Extra clarification for the 100th person who insist on using the OpenGL2 code in spite of existing documentation leaning against it. (#1394)
This commit is contained in:
@ -1,8 +1,12 @@
|
||||
// ImGui SDL2 binding with OpenGL
|
||||
// In this binding, ImTextureID is used to store an OpenGL 'GLuint' texture identifier. Read the FAQ about ImTextureID in imgui.cpp.
|
||||
|
||||
// If your context or own usage of OpenGL involve anything GL3/GL4, prefer using the code in sdl_opengl3_example.
|
||||
// If you are not sure what that means, prefer using the code in sdl_opengl3_example.
|
||||
// *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.
|
||||
// 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.
|
||||
// If you use this binding you'll need to call 4 functions: ImGui_ImplXXXX_Init(), ImGui_ImplXXXX_NewFrame(), ImGui::Render() and ImGui_ImplXXXX_Shutdown().
|
||||
|
Reference in New Issue
Block a user