imgui_impl_opengl3.h
Go to the documentation of this file.
1 // dear imgui: Renderer for modern OpenGL with shaders / programmatic pipeline
2 // - Desktop GL: 2.x 3.x 4.x
3 // - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0)
4 // This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..)
5 
6 // Implemented features:
7 // [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID!
8 // [x] Renderer: Desktop GL only: Support for large meshes (64k+ vertices) with 16-bit indices.
9 
10 // You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
11 // If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
12 // https://github.com/ocornut/imgui
13 
14 // About Desktop OpenGL function loaders:
15 // Modern desktop OpenGL doesn't have a standard portable header file to load OpenGL function pointers.
16 // Helper libraries are often used for this purpose! Here we are supporting a few common ones (gl3w, glew, glad).
17 // You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own.
18 
19 // About GLSL version:
20 // The 'glsl_version' initialization parameter should be NULL (default) or a "#version XXX" string.
21 // On computer platform the GLSL version default to "#version 130". On OpenGL ES 3 platform it defaults to "#version 300 es"
22 // Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp.
23 
24 #pragma once
25 
26 // Backend API
27 IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL);
31 
32 // (Optional) Called by Init/NewFrame/Shutdown
37 
38 // Specific OpenGL versions
39 //#define IMGUI_IMPL_OPENGL_ES2 // Auto-detected on Emscripten
40 //#define IMGUI_IMPL_OPENGL_ES3 // Auto-detected on iOS/Android
41 
42 // Desktop OpenGL: attempt to detect default GL loader based on available header files.
43 // If auto-detection fails or doesn't select the same GL loader file as used by your application,
44 // you are likely to get a crash in ImGui_ImplOpenGL3_Init().
45 // You can explicitly select a loader by using '#define IMGUI_IMPL_OPENGL_LOADER_XXX' in imconfig.h or compiler command-line.
46 #if !defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) \
47  && !defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) \
48  && !defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) \
49  && !defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING2) \
50  && !defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING3) \
51  && !defined(IMGUI_IMPL_OPENGL_LOADER_CUSTOM)
52  #if defined(__has_include)
53  #if __has_include(<glad/glad.h>)
54  #define IMGUI_IMPL_OPENGL_LOADER_GLAD
55  #elif __has_include(<GL/gl3w.h>)
56  #define IMGUI_IMPL_OPENGL_LOADER_GL3W
57  #elif __has_include(<GL/glew.h>)
58  #define IMGUI_IMPL_OPENGL_LOADER_GLEW
59  #elif __has_include(<glbinding/glbinding.h>)
60  #define IMGUI_IMPL_OPENGL_LOADER_GLBINDING3
61  #elif __has_include(<glbinding/Binding.h>)
62  #define IMGUI_IMPL_OPENGL_LOADER_GLBINDING2
63  #else
64  #error "Cannot detect OpenGL loader!"
65  #endif
66  #else
67  #define IMGUI_IMPL_OPENGL_LOADER_GL3W // Default to GL3W
68  #endif
69 #endif
ImGui_ImplOpenGL3_NewFrame
IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame()
Definition: imgui_impl_opengl3.cpp:226
ImGui_ImplOpenGL3_DestroyFontsTexture
IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyFontsTexture()
Definition: imgui_impl_opengl3.cpp:449
NULL
NULL
Definition: test_security_zap.cpp:405
ImGui_ImplOpenGL3_Shutdown
IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown()
Definition: imgui_impl_opengl3.cpp:221
ImDrawData
Definition: imgui.h:2068
IMGUI_IMPL_API
#define IMGUI_IMPL_API
Definition: imgui.h:73
ImGui_ImplOpenGL3_CreateFontsTexture
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateFontsTexture()
Definition: imgui_impl_opengl3.cpp:420
ImGui_ImplOpenGL3_CreateDeviceObjects
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateDeviceObjects()
Definition: imgui_impl_opengl3.cpp:496
ImGui_ImplOpenGL3_Init
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char *glsl_version=NULL)
Definition: imgui_impl_opengl3.cpp:153
ImGui_ImplOpenGL3_RenderDrawData
IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData *draw_data)
Definition: imgui_impl_opengl3.cpp:285
ImGui_ImplOpenGL3_DestroyDeviceObjects
IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects()
Definition: imgui_impl_opengl3.cpp:676


libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:54