forked from Green-Sky/tomato
Green Sky
0e1b1703f6
6ccc561a2ab Version 1.90.6 0d483a1c89f Backends: OpenGL3: Update loader for Linux to support EGL/GLVND. (#7562) 92df32d3390 Backends: OpenGL3: minor update of generated loader to match latest downloaded glcorearb.h/khrplatform.h files. 1ab1af80c74 Backends: Win32: Facepalm revert part of d15574c + additional commentary (#6275) d15574ce2a5 Backends: Win32: Removed silent return when calling ImGui_ImplWin32_WndProcHandler() with no active context! (#6275) d4495446d53 Windows, Internal: added experimental SkipRefresh mode. (#3515, #4763, #7556, #5116 , #4076, #2749, #2268) 0b309471f2e Windows: Changed default ClipRect to extend to windows' left and right borders. (#3312, #7540, #3756, #6170, #6365) 0c9c12c1bb9 InnerClipRect use ImFloor() matching docking branch (fix c41868531 for #6861, #2884, followed by rename 94da5842) 6ebbecc6a08 Realign assignments. fc4d818e170 Tables: Angled headers: added TableAngledHeadersTextAlign, ImGuiStyleVar_TableAngledHeadersTextAlign. (#6917) 4bb75671414 Tables: Angled headers: fixed multi-line label display when angle is flipped. (#6917) b30df8890de Table: Angled Headers: internal refactor to facilitate changing angled header bg and text colors per column. (#6917) 558c57a086c Fixed static analyzer warning "Pointer to local array 'overlay_buf' is stored outside the scope". Technically not used outside that scope, but best to play nice. 50b2ff0bf03 ImGuiIO: moved IMGUI_DISABLE_OBSOLETE_KEYIO block lower in the structure so other fields layout are not affected by it (#7534) 6ef4f67fa94 ImDrawList: moved cold fields lower in the structure so hot fields are closer to each others + better packed ImGuiNavItemData a60387a3c25 Backends: GLFW: Add define guards for glfw native defines. (#7536) 913151caa89 Demo: move progress bars to their own section. c895e987adf ProgressBar: added indeterminate mode by passing an animated negative value. (#5316, #5370, #1901) b8a44b198c9 TreeNode: added ImGuiTreeNodeFlags_SpanTextWidth. (#6937) baaaaea9e91 Demo: tweak TreeNode demo. da18fcb7aed Internals: ensure ButtonBehavior() is called with non 0 id. b720c0f541c Backends: Vulkan: Added convenience support for Volk via IMGUI_IMPL_VULKAN_USE_VOLK define. (#6582, #4854) 07e8ff9a8d4 Backends: Win32: Fixed a warning + moved header cruft below Changelog. fa0120ea5ea Windows: Fixed subsequent Begin() append calls from setting last item information for title-bar. (#7506, #823) 361432a0bb2 TreeNode: fixed layout so that TreeNode("") or TreeNode("##HiddenLabel") may properly be used with SameLine(0,0). (#7505, #282) eba46cb0d22 Drag and Drop: assert when nesting BeginDragDropSource() and BeginDragDropTarget() (#7504) + update Gallery links 9ec299ebe31 Backends: OpenGL: Detect ES3 contexts on desktop based on version string, (#7447) 7b8107e7c84 Examples: GLFW+WebGPU: Rename example_emscripten_wgpu/ to example_glfw_wgpu/ (#7435, #7132) 648278cd62f Examples: GLFW+WebGPU: Amends. (#7435, #7132) 80a5fdb1089 Examples: GLFW+WebGPU: Fixed condition for when to recreate swapchain. (#7435, #7132) f9df6bf6622 Examples: GLFW+WebGPU: added support for WebGPU-native/Dawn (#7435, #7132) git-subtree-dir: external/imgui/imgui git-subtree-split: 6ccc561a2ab497ad4ae6ee1dbd3b992ffada35cb
67 lines
3.4 KiB
C
67 lines
3.4 KiB
C
// dear imgui: Renderer Backend for modern OpenGL with shaders / programmatic pipeline
|
|
// - Desktop GL: 2.x 3.x 4.x
|
|
// - Embedded GL: ES 2.0 (WebGL 1.0), ES 3.0 (WebGL 2.0)
|
|
// This needs to be used along with a Platform Backend (e.g. GLFW, SDL, Win32, custom..)
|
|
|
|
// Implemented features:
|
|
// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID!
|
|
// [x] Renderer: Large meshes support (64k+ vertices) with 16-bit indices (Desktop OpenGL only).
|
|
|
|
// About WebGL/ES:
|
|
// - You need to '#define IMGUI_IMPL_OPENGL_ES2' or '#define IMGUI_IMPL_OPENGL_ES3' to use WebGL or OpenGL ES.
|
|
// - This is done automatically on iOS, Android and Emscripten targets.
|
|
// - For other targets, the define needs to be visible from the imgui_impl_opengl3.cpp compilation unit. If unsure, define globally or in imconfig.h.
|
|
|
|
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
|
|
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
|
|
// Learn about Dear ImGui:
|
|
// - FAQ https://dearimgui.com/faq
|
|
// - Getting Started https://dearimgui.com/getting-started
|
|
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
|
|
// - Introduction, links and more at the top of imgui.cpp
|
|
|
|
// About GLSL version:
|
|
// The 'glsl_version' initialization parameter should be nullptr (default) or a "#version XXX" string.
|
|
// On computer platform the GLSL version default to "#version 130". On OpenGL ES 3 platform it defaults to "#version 300 es"
|
|
// Only override if your GL version doesn't handle this GLSL version. See GLSL version table at the top of imgui_impl_opengl3.cpp.
|
|
|
|
#pragma once
|
|
#include "imgui.h" // IMGUI_IMPL_API
|
|
#ifndef IMGUI_DISABLE
|
|
|
|
// Backend API
|
|
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = nullptr);
|
|
IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
|
|
IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame();
|
|
IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data);
|
|
|
|
// (Optional) Called by Init/NewFrame/Shutdown
|
|
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateFontsTexture();
|
|
IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyFontsTexture();
|
|
IMGUI_IMPL_API bool ImGui_ImplOpenGL3_CreateDeviceObjects();
|
|
IMGUI_IMPL_API void ImGui_ImplOpenGL3_DestroyDeviceObjects();
|
|
|
|
// Configuration flags to add in your imconfig file:
|
|
//#define IMGUI_IMPL_OPENGL_ES2 // Enable ES 2 (Auto-detected on Emscripten)
|
|
//#define IMGUI_IMPL_OPENGL_ES3 // Enable ES 3 (Auto-detected on iOS/Android)
|
|
|
|
// You can explicitly select GLES2 or GLES3 API by using one of the '#define IMGUI_IMPL_OPENGL_LOADER_XXX' in imconfig.h or compiler command-line.
|
|
#if !defined(IMGUI_IMPL_OPENGL_ES2) \
|
|
&& !defined(IMGUI_IMPL_OPENGL_ES3)
|
|
|
|
// Try to detect GLES on matching platforms
|
|
#if defined(__APPLE__)
|
|
#include <TargetConditionals.h>
|
|
#endif
|
|
#if (defined(__APPLE__) && (TARGET_OS_IOS || TARGET_OS_TV)) || (defined(__ANDROID__))
|
|
#define IMGUI_IMPL_OPENGL_ES3 // iOS, Android -> GL ES 3, "#version 300 es"
|
|
#elif defined(__EMSCRIPTEN__) || defined(__amigaos4__)
|
|
#define IMGUI_IMPL_OPENGL_ES2 // Emscripten -> GL ES 2, "#version 100"
|
|
#else
|
|
// Otherwise imgui_impl_opengl3_loader.h will be used.
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#endif // #ifndef IMGUI_DISABLE
|