Steppable 0.0.1
A CAS project written from scratch in C++
Loading...
Searching...
No Matches
imgui_impl_opengl2.h
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 identifier as void*/ImTextureID. Read the FAQ about ImTextureID!
6// [X] Renderer: Multi-viewport support (multiple windows). Enable with 'io.ConfigFlags |= ImGuiConfigFlags_ViewportsEnable'.
7
8// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
9// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
10// Learn about Dear ImGui:
11// - FAQ https://dearimgui.com/faq
12// - Getting Started https://dearimgui.com/getting-started
13// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
14// - Introduction, links and more at the top of imgui.cpp
15
16// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
17// **Prefer using the code in imgui_impl_opengl3.cpp**
18// This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
19// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
20// complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
21// confuse your GPU driver.
22// The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
23
24#pragma once
25#include "imgui.h" // IMGUI_IMPL_API
26#ifndef IMGUI_DISABLE
27
28IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init();
29IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown();
30IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame();
31IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data);
32
33// Called by Init/NewFrame/Shutdown
34IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture();
35IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture();
36IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects();
37IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects();
38
39#endif // #ifndef IMGUI_DISABLE
Definition imgui.h:3269
Untitled