Go to the documentation of this file.
14 #if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
16 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
18 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
19 #include <glad/glad.h>
20 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING2)
21 #define GLFW_INCLUDE_NONE // GLFW including OpenGL headers causes ambiguity or multiple definition errors.
22 #include <glbinding/Binding.h>
23 #include <glbinding/gl/gl.h>
25 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING3)
26 #define GLFW_INCLUDE_NONE // GLFW including OpenGL headers causes ambiguity or multiple definition errors.
27 #include <glbinding/glbinding.h>
28 #include <glbinding/gl/gl.h>
31 #include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
40 #if defined(_MSC_VER) && (_MSC_VER >= 1900) && !defined(IMGUI_DISABLE_WIN32_FUNCTIONS)
41 #pragma comment(lib, "legacy_stdio_definitions")
59 const char* glsl_version =
"#version 150";
66 const char* glsl_version =
"#version 130";
81 #if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
83 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
84 bool err = glewInit() != GLEW_OK;
85 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
86 bool err = gladLoadGL() == 0;
87 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING2)
89 glbinding::Binding::initialize();
90 #elif defined(IMGUI_IMPL_OPENGL_LOADER_GLBINDING3)
98 fprintf(stderr,
"Failed to initialize OpenGL loader!\n");
158 static float f = 0.0f;
159 static int counter = 0;
191 int display_w, display_h;
GLFWAPI void glfwSwapInterval(int interval)
Sets the swap interval for the current context.
GLuint const GLchar * name
bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow *window, bool install_callbacks)
GLFWAPI void glfwMakeContextCurrent(GLFWwindow *window)
Makes the context of the specified window current for the calling thread.
GLFWAPI void glfwTerminate(void)
Terminates the GLFW library.
void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData *draw_data)
GLFWAPI void glfwPollEvents(void)
Processes all pending events.
IMGUI_API ImDrawData * GetDrawData()
#define GLFW_OPENGL_PROFILE
IMGUI_API bool Button(const char *label, const ImVec2 &size=ImVec2(0, 0))
The header of the GLFW 3 API.
void ImGui_ImplGlfw_Shutdown()
static void glfw_error_callback(int error, const char *description)
struct GLFWwindow GLFWwindow
Opaque window object.
IMGUI_API void Text(const char *fmt,...) IM_FMTARGS(1)
void ImGui_ImplOpenGL3_Shutdown()
IMGUI_API void SameLine(float offset_from_start_x=0.0f, float spacing=-1.0f)
bool ImGui_ImplOpenGL3_Init(const char *glsl_version)
IMGUI_API ImGuiIO & GetIO()
GLFWAPI GLFWerrorfun glfwSetErrorCallback(GLFWerrorfun cbfun)
Sets the error callback.
static bool show_another_window
#define GLFW_CONTEXT_VERSION_MINOR
GLFWAPI void glfwSwapBuffers(GLFWwindow *window)
Swaps the front and back buffers of the specified window.
#define GLFW_OPENGL_FORWARD_COMPAT
IMGUI_API void ShowDemoWindow(bool *p_open=NULL)
#define GLFW_CONTEXT_VERSION_MAJOR
void ImGui_ImplGlfw_NewFrame()
IMGUI_API bool SliderFloat(const char *label, float *v, float v_min, float v_max, const char *format="%.3f", float power=1.0f)
IMGUI_API void DestroyContext(ImGuiContext *ctx=NULL)
static UPB_NORETURN void err(tarjan *t)
static ImVec4 clear_color
#define GL_COLOR_BUFFER_BIT
GLFWAPI int glfwInit(void)
Initializes the GLFW library.
GLFWAPI GLFWglproc glfwGetProcAddress(const char *procname)
Returns the address of the specified function for the current context.
IMGUI_API bool Checkbox(const char *label, bool *v)
IMGUI_API ImGuiContext * CreateContext(ImFontAtlas *shared_font_atlas=NULL)
typedef void(APIENTRY *GLDEBUGPROCARB)(GLenum source
GLFWAPI void glfwDestroyWindow(GLFWwindow *window)
Destroys the specified window and its context.
IMGUI_API bool ColorEdit3(const char *label, float col[3], ImGuiColorEditFlags flags=0)
IMGUI_API void NewFrame()
IMGUI_API bool Begin(const char *name, bool *p_open=NULL, ImGuiWindowFlags flags=0)
GLFWAPI GLFWwindow * glfwCreateWindow(int width, int height, const char *title, GLFWmonitor *monitor, GLFWwindow *share)
Creates a window and its associated context.
GLFWAPI void glfwWindowHint(int hint, int value)
Sets the specified window hint to the desired value.
void ImGui_ImplOpenGL3_NewFrame()
GLFWAPI int glfwWindowShouldClose(GLFWwindow *window)
Checks the close flag of the specified window.
GLFWAPI void glfwGetFramebufferSize(GLFWwindow *window, int *width, int *height)
Retrieves the size of the framebuffer of the specified window.
#define GLFW_OPENGL_CORE_PROFILE
static bool show_demo_window
IMGUI_API void StyleColorsDark(ImGuiStyle *dst=NULL)
#define IMGUI_CHECKVERSION()
libaditof
Author(s):
autogenerated on Wed May 21 2025 02:06:55