Debian Codegraph @

extern/imgui_patched/backends/imgui_impl_opengl2.h

raw
1 // dear imgui: Renderer Backend for OpenGL2 (legacy OpenGL, fixed pipeline)
2 // This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
3
4 // Implemented features:
5 // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture as texture identifier. Read the FAQ about ImTextureID/ImTextureRef!
6 // [X] Renderer: Texture updates support for dynamic font atlas (ImGuiBackendFlags_RendererHasTextures).
7 // [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
8 // Missing features or Issues:
9 // [ ] Renderer: Large meshes support (64k+ vertices) even with 16-bit indices (ImGuiBackendFlags_RendererHasVtxOffset).
10
11 // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
12 // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
13 // Learn about Dear ImGui:
14 // - FAQ https://dearimgui.com/faq
15 // - Getting Started https://dearimgui.com/getting-started
16 // - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
17 // - Introduction, links and more at the top of imgui.cpp
18
19 // **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
20 // **Prefer using the code in imgui_impl_opengl3.cpp**
21 // This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
22 // If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
23 // complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
24 // confuse your GPU driver.
25 // The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
26
27 #pragma once
28 #include "imgui.h" // IMGUI_IMPL_API
29 #ifndef IMGUI_DISABLE
30
31 // Follow "Getting Started" link and check examples/ folder to learn about using backends!
32 IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init();
33 IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown();
34 IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame();
35 IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data);
36
37 // Called by Init/NewFrame/Shutdown
38 IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects();
39 IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects();
40
41 // (Advanced) Use e.g. if you need to precisely control the timing of texture updates (e.g. for staged rendering), by setting ImDrawData::Textures = NULL to handle this manually.
42 IMGUI_IMPL_API void ImGui_ImplOpenGL2_UpdateTexture(ImTextureData* tex);
43
44 #endif // #ifndef IMGUI_DISABLE