diff --git a/.gitignore b/.gitignore
index 32fe798d..2510da04 100644
--- a/.gitignore
+++ b/.gitignore
@@ -30,3 +30,20 @@ install_manifest.txt
/ImportExecutables.cmake
*-coverage/
*-coverage.info
+
+# nextpnr-xc7
+*.xdl
+*.bit
+
+# ise
+_xmsgs/
+*.bgn
+*.drc
+*.ncd
+*.xwbt
+usage_statistics_webtalk.html
+webtalk.log
+xilinx_device_details.xml
+*_fpga_editor.*
+*.twr
+*.twx
diff --git a/3rdparty/imgui/.travis.yml b/3rdparty/imgui/.travis.yml
new file mode 100644
index 00000000..7a554baf
--- /dev/null
+++ b/3rdparty/imgui/.travis.yml
@@ -0,0 +1,34 @@
+language: cpp
+sudo: required
+dist: trusty
+
+os:
+ - linux
+ - osx
+
+compiler:
+ - gcc
+ - clang
+
+before_install:
+ - if [ $TRAVIS_OS_NAME == linux ]; then
+ sudo apt-get update -qq;
+ sudo apt-get install -y --no-install-recommends libxrandr-dev libxi-dev libxxf86vm-dev libsdl2-dev;
+ wget https://github.com/glfw/glfw/releases/download/3.2.1/glfw-3.2.1.zip;
+ unzip glfw-3.2.1.zip && cd glfw-3.2.1;
+ cmake -DBUILD_SHARED_LIBS=true -DGLFW_BUILD_EXAMPLES=false -DGLFW_BUILD_TESTS=false -DGLFW_BUILD_DOCS=false .;
+ sudo make -j $CPU_NUM install && cd ..;
+ fi
+ - if [ $TRAVIS_OS_NAME == osx ]; then
+ brew update;
+ brew install glfw3;
+ brew install sdl2;
+ fi
+
+script:
+ - make -C examples/example_glfw_opengl2
+ - make -C examples/example_glfw_opengl3
+ - make -C examples/example_sdl_opengl3
+ - if [ $TRAVIS_OS_NAME == osx ]; then
+ xcodebuild -project examples/example_apple_metal/example_apple_metal.xcodeproj -target example_apple_metal_macos;
+ fi
diff --git a/3rdparty/imgui/LICENSE.txt b/3rdparty/imgui/LICENSE.txt
new file mode 100644
index 00000000..21b6ee7e
--- /dev/null
+++ b/3rdparty/imgui/LICENSE.txt
@@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2014-2018 Omar Cornut
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+SOFTWARE.
diff --git a/3rdparty/imgui/docs/CHANGELOG.txt b/3rdparty/imgui/docs/CHANGELOG.txt
new file mode 100644
index 00000000..5410077f
--- /dev/null
+++ b/3rdparty/imgui/docs/CHANGELOG.txt
@@ -0,0 +1,1054 @@
+dear imgui
+CHANGELOG
+
+This document holds the user-facing changelog that we also use in release notes.
+We generally fold multiple commits pertaining to the same topic as a single entry.
+Changes to the examples/bindings are included within the individual .cpp files in the examples/ folder.
+
+RELEASE NOTES: https://github.com/ocornut/imgui/releases
+REPORT ISSUES, ASK QUESTIONS: https://github.com/ocornut/imgui/issues
+COMMITS HISTORY: https://github.com/ocornut/imgui/commits/master
+
+WHEN TO UPDATE?
+
+- Keeping your copy of dear imgui updated once in a while is recommended.
+- It is generally safe to sync to the latest commit in master.
+ The library is fairly stable and regressions tends to be fixed fast when reported.
+
+HOW TO UPDATE?
+
+- Overwrite every file except imconfig.h (if you have modified it).
+- You may also locally branch to modify imconfig.h and merge latest into your branch.
+- Read the `Breaking Changes` section (in imgui.cpp or here in the Changelog).
+- If you have a problem with a missing function/symbols, search for its name in the code, there will likely be a comment about it.
+- If you are dropping this repository in your codebase, please leave the demo and text files in there, they will be useful.
+- You may diff your previous Changelog with the one you just copied and read that diff.
+- You may enable `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in imconfig.h to forcefully disable legacy names and symbols.
+ Doing it every once in a while is a good way to make sure you are not using obsolete symbols. Dear ImGui is in active development,
+ and API updates have been a little more frequent lately. They are documented below and in imgui.cpp and should not affect all users.
+- Please report any issue!
+
+
+-----------------------------------------------------------------------
+ VERSION 1.66 (In Progress)
+-----------------------------------------------------------------------
+
+Breaking Changes:
+
+- Renamed SetScrollHere() to SetScrollHereY(). Kept redirection function (will obsolete).
+- Renamed misc/stl/imgui_stl.* to misc/cpp/imgui_stdlib.* in prevision for other C++ helper files. (#2035, #2096)
+
+Other Changes:
+
+- Fixed calling DestroyContext() always saving .ini data with the current context instead
+ of the supplied context pointer. (#2066)
+- Fixed calling SetNextWindowSize()/SetWindowSize() with non-integer values leading to
+ accidental alteration of window position. We now round the provided size. (#2067)
+- Nav, Focus: Fixed ImGuiWindowFlags_NoBringToFrontOnFocus windows not being restoring focus
+ properly after the main menu bar or last focused window is deactivated.
+- DragFloat: Fixed a situation where dragging with value rounding enabled or with a power curve
+ erroneously wrapped the value to one of the min/max edge. (#2024, #708, #320, #2075).
+- DragFloat: Disabled using power curve when one edge is FLT_MAX (broken in 1.61). (#2024)
+- DragFloat: Disabled setting a default drag speed when one edge is FLT_MAX. (#2024)
+- Window: Resizing from edges (with io.ConfigResizeWindowsFromEdges Beta flag) extends the hit region
+ of root floating windows outside the window, making it easier to resize windows. Resize grips are also
+ extended accordingly so there are no discontinuity when hovering between borders and corners. (#1495, #822)
+- Window: Added ImGuiWindowFlags_NoBackground flag to avoid rendering window background. This is mostly to allow
+ the creation of new flag combinations, as we could already use SetNextWindowBgAlpha(0.0f). (#1660) [@biojppm, @ocornut]
+- Window: Added ImGuiWindowFlags_NoDecoration helper flag which is essentially NoTitleBar+NoResize+NoScrollbar+NoCollapse.
+- Window: Added ImGuiWindowFlags_NoMouseInputs which is basically the old ImGuiWindowFlags_NoInputs (essentially
+ we have renamed ImGuiWindowFlags_NoInputs to ImGuiWindowFlags_NoMouseInputs). Made the new ImGuiWindowFlags_NoInputs
+ encompass both NoMouseInputs+NoNav, which is consistent with its description. (#1660, #787)
+- Window, Inputs: Fixed resizing from edges when io.MousePos is not pixel-rounded by rounding mouse position input. (#2110)
+- BeginChild(): Fixed BeginChild(const char*, ...) variation erroneously not applying the ID stack
+ to the provided string to uniquely identify the child window. This was undoing an intentional change
+ introduced in 1.50 and broken in 1.60. (#1698, #894, #713).
+- TextUnformatted(): Fixed a case where large-text path would read bytes past the text_end marker depending
+ on the position of new lines in the buffer (it wasn't affecting the output but still not the right thing to do!)
+- RenderText(): Some optimization for very large text buffers, useful for non-optimized builds.
+- BeginMenu(): Fixed menu popup horizontal offset being off the item in the menu bar when WindowPadding=0.0f.
+- ArrowButton(): Fixed arrow shape being horizontally misaligned by (FramePadding.y-FramePadding.x) if they are different.
+- Drag and Drop: Added GetDragDropPayload() to peek directly into the payload (if any) from anywhere. (#143)
+- ImGuiTextBuffer: Avoid heap allocation when empty.
+- ImDrawList: Fixed AddConvexPolyFilled() undefined behavior when passing points_count smaller than 3,
+ in particular, points_count==0 could lead to a memory stomp if the draw list was previously empty.
+- Examples: DirectX10, DirectX11: Removed seemingly unnecessary calls to invalidate and recreate device objects
+ in the WM_SIZE handler. (#2088) [@ice1000]
+
+
+-----------------------------------------------------------------------
+ VERSION 1.65 (Released 2018-09-06)
+-----------------------------------------------------------------------
+
+Breaking Changes:
+
+- Renamed stb_truetype.h to imstb_truetype.h, stb_textedit.h to imstb_textedit.h, and
+ stb_rect_pack.h to imstb_rectpack.h. If you were conveniently using the imgui copy of those
+ STB headers in your project, you will have to update your include paths. (#1718, #2036)
+ The reason for this change is to avoid conflicts for projects that may also be importing
+ their own copy of the STB libraries. Note that imgui's copy of stb_textedit.h is modified.
+- Renamed io.ConfigCursorBlink to io.ConfigInputTextCursorBlink. (#1427)
+
+Other Changes:
+
+- This is a minor release following the 1.64 refactor, with a little more shuffling of code.
+- Clarified and improved the source code sectioning in all files (easier to search or browse sections).
+- Nav: Removed the [Beta] tag from various descriptions of the gamepad/keyboard navigation system.
+ Although it is not perfect and will keep being improved, it is fairly functional and used by many. (#787)
+- Fixed a build issue with non-Cygwin GCC under Windows.
+- Demo: Added a "Configuration" block to make io.ConfigFlags/io.BackendFlags more prominent.
+- Examples: OpenGL3: Fixed error condition when using the GLAD loader. (#2059, #2002) [@jiri]
+
+
+-----------------------------------------------------------------------
+ VERSION 1.64 (Released 2018-08-31)
+-----------------------------------------------------------------------
+
+Changes:
+
+- Moved README, CHANGELOG and TODO files to the docs/ folder.
+ If you are updating dear imgui by copying files, take the chance to delete the old files.
+- Added imgui_widgets.cpp file, extracted and moved widgets code out of imgui.cpp into imgui_widgets.cpp.
+ Re-ordered some of the code remaining in imgui.cpp.
+ NONE OF THE FUNCTIONS HAVE CHANGED. THE CODE IS SEMANTICALLY 100% IDENTICAL, BUT _EVERY_ FUNCTIONS HAS BEEN MOVED.
+ Because of this, any local modifications to imgui.cpp will likely conflict when you update.
+ If you have any modifications to imgui.cpp, it is suggested that you first update to 1.63, then
+ isolate your patches. You can peak at imgui_widgets.cpp from 1.64 to get a sense of what is included in it,
+ then separate your changes into several patches that can more easily be applied to 1.64 on a per-file basis.
+ What I found worked nicely for me, was to open the diff of the old patches in an interactive merge/diff tool,
+ search for the corresponding function in the new code and apply the chunks manually.
+- As a reminder, if you have any change to imgui.cpp it is a good habit to discuss them on the github,
+ so a solution applicable on the Master branch can be found. If your company has changes that you cannot
+ disclose you may also contact me privately.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.63 (Released 2018-08-29)
+-----------------------------------------------------------------------
+
+Breaking Changes:
+
+- Style: Renamed ImGuiCol_ModalWindowDarkening to ImGuiCol_ModalWindowDimBg for consistency with other features. Kept redirection enum (will obsolete).
+- Changed ImGui::GetTime() return value from float to double to avoid accumulating floating point imprecision over time.
+- Removed per-window ImGuiWindowFlags_ResizeFromAnySide Beta flag in favor `io.ConfigResizeWindowsFromEdges=true` to enable the feature globally. (#1495)
+ The feature is not currently enabled by default because it is not satisfying enough, but will eventually be.
+- InputText: Renamed ImGuiTextEditCallback to ImGuiInputTextCallback, ImGuiTextEditCallbackData to ImGuiInputTextCallbackData for consistency.
+ Kept redirection types (will obsolete).
+- InputText: Removed ImGuiTextEditCallbackData::ReadOnly since it is a duplication of (ImGuiTextEditCallbackData::Flags & ImGuiInputTextFlags_ReadOnly).
+- Renamed IsItemDeactivatedAfterChange() to IsItemDeactivatedAfterEdit() for consistency with new IsItemEdited() API.
+ Kept redirection function (will obsolete soonish as IsItemDeactivatedAfterChange() is very recent).
+- Renamed io.OptCursorBlink to io.ConfigCursorBlink [-> io.ConfigInputTextCursorBlink in 1.65], io.OptMacOSXBehaviors to io.ConfigMacOSXBehaviors for consistency. (#1427, #473)
+- Removed obsolete redirection functions: CollapsingHeader() variation with 2 bools - marked obsolete in v1.49, May 2016.
+
+Other Changes:
+
+- ArrowButton: Fixed to honor PushButtonRepeat() setting (and internals' ImGuiItemFlags_ButtonRepeat).
+- ArrowButton: Setup current line text baseline so that ArrowButton() + SameLine() + Text() are aligned properly.
+- Nav: Added a CTRL+TAB window list and changed the highlight system accordingly. The change is motivated by upcoming Docking features. (#787)
+- Nav: Made CTRL+TAB skip menus + skip the current navigation window if is has the ImGuiWindow_NoNavFocus set. (#787)
+ While it was previously possible, you won't be able to CTRL-TAB out and immediately back in a window with the ImGuiWindow_NoNavFocus flag.
+- Window: Allow menu and popups windows from ignoring the style.WindowMinSize values so short menus/popups are not padded. (#1909)
+- Window: Added global io.ConfigResizeWindowsFromEdges option to enable resizing windows from their edges and from the lower-left corner. (#1495)
+- Window: Collapse button shows hovering highlight + clicking and dragging on it allows to drag the window as well.
+- Added IsItemEdited() to query if the last item modified its value (or was pressed). This is equivalent to the bool returned by most widgets.
+ It is useful in some situation e.g. using InputText() with ImGuiInputTextFlags_EnterReturnsTrue. (#2034)
+- InputText: Added support for buffer size/capacity changes via the ImGuiInputTextFlags_CallbackResize flag. (#2006, #1443, #1008).
+- InputText: Fixed not tracking the cursor horizontally when modifying the text buffer through a callback.
+- InputText: Fixed minor off-by-one issue when submitting a buffer size smaller than the initial zero-terminated buffer contents.
+- InputText: Fixed a few pathological crash cases on single-line InputText widget with multiple millions characters worth of contents.
+ Because the current text drawing function reserve for a worst-case amount of vertices and how we handle horizontal clipping,
+ we currently just avoid displaying those single-line widgets when they are over a threshold of 2 millions characters,
+ until a better solution is found.
+- Drag and Drop: Fixed an incorrect assert when dropping a source that is submitted after the target (bug introduced with 1.62 changes
+ related to the addition of IsItemDeactivated()). (#1875, #143)
+- Drag and Drop: Fixed ImGuiDragDropFlags_SourceNoDisableHover to affect hovering state prior to calling IsItemHovered() + fixed description. (#143)
+- Drag and Drop: Calling BeginTooltip() between a BeginDragSource()/EndDragSource() or BeginDropTarget()/EndDropTarget() uses adjusted tooltip
+ settings matching the one created when calling BeginDragSource() without the ImGuiDragDropFlags_SourceNoPreviewTooltip flag. (#143)
+- Drag and Drop: Payload stays available and under the mouse if the source stops being submitted, however the tooltip is replaced by "...". (#1725)
+- Drag and Drop: Added ImGuiDragDropFlags_SourceAutoExpirePayload flag to force payload to expire if the source stops being submitted. (#1725, #143).
+- IsItemHovered(): Added ImGuiHoveredFlags_AllowWhenDisabled flag to query hovered status on disabled items. (#1940, #211)
+- Selectable: Added ImGuiSelectableFlags_Disabled flag in the public API. (#211)
+- ColorEdit4: Fixed a bug when text input or drag and drop leading to unsaturated HSV values would erroneously alter the resulting color. (#2050)
+- Misc: Added optional misc/stl/imgui_stl.h wrapper to use with STL types (e.g. InputText with std::string). (#2006, #1443, #1008)
+ [*EDIT* renamed to misc/std/imgui_stdlib.h in 1.66]
+- Misc: Added IMGUI_VERSION_NUM for easy compile-time testing. (#2025)
+- Misc: Added ImGuiMouseCursor_Hand cursor enum + corresponding software cursor. (#1913, 1914) [@aiekick, @ocornut]
+- Misc: Tweaked software mouse cursor offset to match the offset of the corresponding Windows 10 cursors.
+- Made assertion more clear when trying to call Begin() outside of the NewFrame()..EndFrame() scope. (#1987)
+- Fixed assertion when transitioning from an active ID to another within a group, affecting ColorPicker (broken in 1.62). (#2023, #820, #956, #1875).
+- Fixed PushID() from keeping alive the new ID Stack top value (if a previously active widget shared the ID it would be erroneously kept alive).
+- Fixed horizontal mouse wheel not forwarding the request to the parent window if ImGuiWindowFlags_NoScrollWithMouse is set. (#1463, #1380, #1502)
+- Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276)
+- ImDrawList: Improved handling for worst-case vertices reservation policy when large amount of text (e.g. 1+ million character strings)
+ are being submitted in a single call. It would typically have crashed InputTextMultiline(). (#200)
+- OS/Windows: Fixed missing ImmReleaseContext() call in the default Win32 IME handler. (#1932) [@vby]
+- Metrics: Changed io.MetricsActiveWindows to reflect the number of active windows (!= from visible windows), which is useful
+ for lazy/idle render mechanisms as new windows are typically not visible for one frame.
+- Metrics: Added io.MetricsRenderWindow to reflect the number of visible windows.
+- Metrics: Added io.MetricsActiveAllocations, moving away from the cross-context global counters than we previously used. (#1565, #1599, #586)
+- Demo: Added basic Drag and Drop demo. (#143)
+- Demo: Modified the Console example to use InsertChars() in the input text callback instead of poking directly into the buffer.
+ Although this won't make a difference in the example itself, using InsertChars() will honor the resizing callback properly. (#2006, #1443, #1008).
+- Demo: Clarified the use of IsItemHovered()/IsItemActive() right after being in the "Active, Focused, Hovered & Focused Tests" section.
+- Examples: Tweaked the main.cpp of each example.
+- Examples: Metal: Added Metal rendering backend. (#1929, #1873) [@warrenm]
+- Examples: OSX: Added early raw OSX platform backend. (#1873) [@pagghiu, @itamago, @ocornut]
+- Examples: Added mac OSX & iOS + Metal example in example_apple_metal/. (#1929, #1873) [@warrenm]
+- Examples: Added mac OSX + OpenGL2 example in example_apple_opengl2/. (#1873)
+- Examples: OpenGL3: Added shaders more versions of GLSL. (#1938, #1941, #1900, #1513, #1466, etc.)
+- Examples: OpenGL3: Tweaked the imgui_impl_opengl3.cpp to work as-is with Emscripten + WebGL 2.0. (#1941). [@o-micron]
+- Examples: OpenGL3: Made the example app default to GL 3.0 + GLSL 130 (instead of GL 3.2 + GLSL 150) unless on Mac.
+- Examples: OpenGL3: Added error output when shaders fail to compile/link.
+- Examples: OpenGL3: Added support for glew and glad OpenGL loaders out of the box. (#2001, #2002) [@jdumas]
+- Examples: OpenGL2: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications. (#1996)
+- Examples: DirectX10, DirectX11: Fixed unreleased resources in Init and Shutdown functions. (#1944)
+- Examples: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility. (#1989) [@matt77hias]
+- Examples: Vulkan: Fixed handling of VkSurfaceCapabilitiesKHR::maxImageCount = 0 case. Tweaked present mode selections.
+- Examples: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.62 (Released 2018-06-22)
+-----------------------------------------------------------------------
+
+Breaking Changes:
+
+- TreeNodeEx(): The helper ImGuiTreeNodeFlags_CollapsingHeader flag now include ImGuiTreeNodeFlags_NoTreePushOnOpen. The flag was already set by CollapsingHeader().
+ The only difference is if you were using TreeNodeEx() manually with ImGuiTreeNodeFlags_CollapsingHeader and without ImGuiTreeNodeFlags_NoTreePushOnOpen.
+ In this case you can remove the ImGuiTreeNodeFlags_NoTreePushOnOpen flag from your call (ImGuiTreeNodeFlags_CollapsingHeader & ~ImGuiTreeNodeFlags_NoTreePushOnOpen). (#1864)
+ This also apply if you were using internal's TreeNodeBehavior() with the ImGuiTreeNodeFlags_CollapsingHeader flag directly.
+- ImFontAtlas: Renamed GetGlyphRangesChinese() to GetGlyphRangesChineseFull() to distinguish new smaller variants and discourage using the full set. (#1859)
+
+Other Changes:
+
+- Examples back-ends have been refactored to separate the platform code (e.g. Win32, Glfw, SDL2) from the renderer code (e.g. DirectX11, OpenGL3, Vulkan).
+ The "Platform" bindings are in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, etc.
+ The "Renderer" bindings are in charge of: creating the main font texture, rendering imgui draw data.
+ before: imgui_impl_dx11.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx11.cpp
+ before: imgui_impl_dx12.cpp --> after: imgui_impl_win32.cpp + imgui_impl_dx12.cpp
+ before: imgui_impl_glfw_gl3.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp
+ before: imgui_impl_glfw_vulkan.cpp --> after: imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp
+ before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl2.cpp
+ before: imgui_impl_sdl_gl3.cpp --> after: imgui_impl_sdl2.cpp + imgui_impl_opengl3.cpp etc.
+ - The idea is what we can now easily combine and maintain back-ends and reduce code redundancy. Individual files are smaller and more reusable.
+ Integration of imgui into a new/custom engine may also be easier as there is less overlap between "windowing / inputs" and "rendering" code,
+ so you may study or grab one half of the code and not the other.
+ - This change was motivated by the fact that adding support for the upcoming multi-viewport feature requires more work from the Platform and Renderer
+ back-ends, and the amount of redundancy across files was becoming too difficult to maintain. If you use default back-ends, you'll benefit from an
+ easy update path to support multi-viewports later (for future ImGui 1.7x).
+ - This is not strictly a breaking change if you keep your old bindings, but when you'll want to fully update your bindings,
+ expect to have to reshuffle a few things.
+ - Each example still has its own main.cpp which you may refer you to understand how to initialize and glue everything together.
+ - Some frameworks (such as the Allegro, Marmalade) handle both the "platform" and "rendering" part, and your custom engine may as well.
+ - Read examples/README.txt for details.
+- Added IsItemDeactivated() to query if the last item was active previously and isn't anymore. Useful for Undo/Redo patterns. (#820, #956, #1875)
+- Added IsItemDeactivatedAfterChange() [*EDIT* renamed to IsItemDeactivatedAfterEdit() in 1.63] if the last item was active previously,
+ is not anymore, and during its active state modified a value. Note that you may still get false positive (e.g. drag value and while
+ holding return on the same value). (#820, #956, #1875)
+- Nav: Added support for PageUp/PageDown (explorer-style: first aim at bottom/top most item, when scroll a page worth of contents). (#787)
+- Nav: To keep the navigated item in view we also attempt to scroll the parent window as well as the current window. (#787)
+- ColorEdit3, ColorEdit4, ColorButton: Added ImGuiColorEditFlags_NoDragDrop flag to disable ColorEditX as drag target and ColorButton as drag source. (#1826)
+- BeginDragDropSource(): Offset tooltip position so it is off the mouse cursor, but also closer to it than regular tooltips, and not clamped by viewport. (#1739)
+- BeginDragDropTarget(): Added ImGuiDragDropFlags_AcceptNoPreviewTooltip flag to request hiding the drag source tooltip from the target site. (#143)
+- BeginCombo(), BeginMainMenuBar(), BeginChildFrame(): Temporary style modification are restored at the end of BeginXXX instead of EndXXX, to not affect tooltips and child windows.
+- Popup: Improved handling of (erroneously) repeating calls to OpenPopup() to not close the popup's child popups. (#1497, #1533, #1865).
+- InputTextMultiline(): Fixed double navigation highlight when scrollbar is active. (#787)
+- InputText(): Fixed Undo corruption after pasting large amount of text (Redo will still fail when undo buffers are exhausted, but text won't be corrupted).
+- SliderFloat(): When using keyboard/gamepad and a zero precision format string (e.g. "%.0f"), always step in integer units. (#1866)
+- ImFontConfig: Added GlyphMinAdvanceX/GlyphMaxAdvanceX settings useful to make a font appears monospaced, particularly useful for icon fonts. (#1869)
+- ImFontAtlas: Added GetGlyphRangesChineseSimplifiedCommon() helper that returns a list of ~2500 most common Simplified Chinese characters. (#1859) [@JX-Master, @ocornut]
+- Examples: OSX: Added imgui_impl_osx.mm binding to be used along with e.g. imgui_impl_opengl2.cpp. (#281, #1870) [@pagghiu, @itamago, @ocornut]
+- Examples: GLFW: Made it possible to Shutdown/Init the backend again (by reseting the time storage properly). (#1827) [@ice1000]
+- Examples: Win32: Fixed handling of mouse wheel messages to support sub-unit scrolling messages (typically sent by track-pads). (#1874) [@zx64]
+- Examples: SDL+Vulkan: Added SDL+Vulkan example.
+- Examples: Allegro5: Added support for ImGuiConfigFlags_NoMouseCursorChange flag. Added clipboard support.
+- Examples: Allegro5: Unindexing buffers ourselves as Allegro indexed drawing primitives are buggy in the DirectX9 back-end (will be fixed in Allegro 5.2.5+).
+- Examples: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from ImGui_ImplDX12_NewFrame() to ImGui_ImplDX12_RenderDrawData() which makes a lots more sense. (#301)
+- Examples: Vulkan: Reordered parameters ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings, a good occasion since we refactored the code.
+- Examples: FreeGLUT: Added FreeGLUT bindings. Added FreeGLUT+OpenGL2 example. (#801)
+- Examples: The functions in imgui_impl_xxx.cpp are prefixed with IMGUI_IMPL_API (which defaults to IMGUI_API) to facilitate some uses. (#1888)
+- Examples: Fixed bindings to use ImGuiMouseCursor_COUNT instead of old name ImGuiMouseCursor_Count_ so they can compile with IMGUI_DISABLE_OBSOLETE_FUNCTIONS. (#1887)
+- Misc: Updated stb_textedit from 1.09 + patches to 1.12 + minor patches.
+- Internals: PushItemFlag() flags are inherited by BeginChild().
+
+
+-----------------------------------------------------------------------
+ VERSION 1.61 (Released 2018-05-14)
+-----------------------------------------------------------------------
+
+Breaking Changes:
+
+- DragInt(): The default compile-time format string has been changed from "%.0f" to "%d", as we are not using integers internally any more.
+ If you used DragInt() with custom format strings, make sure you change them to use %d or an integer-compatible format.
+ To honor backward-compatibility, the DragInt() code will currently parse and modify format strings to replace %*f with %d, giving time to users to upgrade their code.
+ If you have IMGUI_DISABLE_OBSOLETE_FUNCTIONS enabled, the code will instead assert! You may run a reg-exp search on your codebase for e.g. "DragInt.*%f" to you find them.
+- InputFloat(): Obsoleted InputFloat() functions taking an optional "int decimal_precision" in favor of an equivalent and more flexible "const char* format",
+ consistent with other functions. Kept redirection functions (will obsolete).
+- Misc: IM_DELETE() helper function added in 1.60 doesn't set the input pointer to NULL, more consistent with standard expectation and allows passing r-values.
+
+Other Changes:
+
+- Added DragScalar, DragScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
+- Added InputScalar, InputScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
+- Added SliderScalar, SliderScalarN: supports signed/unsigned, 32/64 bits, float/double data types. (#643, #320, #708, #1011)
+- Window: Fixed pop-ups/tooltips/menus not honoring style.DisplaySafeAreaPadding as well as it should have (part of menus displayed outside the safe area, etc.).
+- Window: Fixed windows using the ImGuiWindowFlags_NoSavedSettings flag from not using the same default position as other windows. (#1760)
+- Window: Relaxed the internal stack size checker to allow Push/Begin/Pop/.../End patterns to be used with PushStyleColor, PushStyleVar, PushFont without causing a false positive assert. (#1767)
+- Window: Fixed the default proportional item width lagging by one frame on resize.
+- Columns: Fixed a bug introduced in 1.51 where columns would affect the contents size of their container, often creating feedback loops when ImGuiWindowFlags_AlwaysAutoResize was used. (#1760)
+- Settings: Fixed saving an empty .ini file if CreateContext/DestroyContext are called without a single call to NewFrame(). (#1741)
+- Settings: Added LoadIniSettingsFromDisk(), LoadIniSettingsFromMemory(), SaveIniSettingsToDisk(), SaveIniSettingsToMemory() to manually load/save .ini settings. (#923, #993)
+- Settings: Added io.WantSaveIniSettings flag, which is set to notify the application that e.g. SaveIniSettingsToMemory() should be called. (#923, #993)
+- Scrolling: Fixed a case where using SetScrollHere(1.0f) at the bottom of a window on the same frame the window height has been growing would have the scroll clamped using the previous height. (#1804)
+- MenuBar: Made BeginMainMenuBar() honor style.DisplaySafeAreaPadding so the text can be made visible on TV settings that don't display all pixels. (#1439) [@dougbinks]
+- InputText: On Mac OS X, filter out characters when the CMD modifier is held. (#1747) [@sivu]
+- InputText: On Mac OS X, support CMD+SHIFT+Z for Redo. CMD+Y is also supported as major apps seems to default to support both. (#1765) [@lfnoise]
+- InputText: Fixed returning true when edition is cancelled with ESC and the current buffer matches the initial value.
+- InputFloat,InputFloat2,InputFloat3,InputFloat4: Added variations taking a more flexible and consistent optional "const char* format" parameter instead of "int decimal_precision".
+ This allow using custom formats to display values in scientific notation, and is generally more consistent with other API. Obsoleted functions using the optional "int decimal_precision" parameter. (#648)
+- DragFloat, DragInt: Cancel mouse tweak when current value is initially past the min/max boundaries and mouse is pushing in the same direction (keyboard/gamepad version already did this).
+- DragFloat, DragInt: Honor natural type limits (e.g. INT_MAX, FLT_MAX) instead of wrapping around. (#708, #320)
+- DragFloat, SliderFloat: Fixes to allow input of scientific notation numbers when using CTRL+Click to input the value. (~#648, #1011)
+- DragFloat, SliderFloat: Rounding-on-write uses the provided format string instead of parsing the precision from the string, which allows for finer uses of %e %g etc. (#648, #642)
+- DragFloat: Improved computation when using the power curve. Improved lost of input precision with very small steps. Added an assert than power-curve requires a min/max range. (~#642)
+- DragFloat: The 'power' parameter is only honored if the min/max parameter are also setup.
+- DragInt, SliderInt: Fixed handling of large integers (we previously passed data around internally as float, which reduced the range of valid integers).
+- ColorEdit: Fixed not being able to pass the ImGuiColorEditFlags_NoAlpha or ImGuiColorEditFlags_HDR flags to SetColorEditOptions().
+- Nav: Fixed hovering a Selectable() with the mouse so that it update the navigation cursor (as it happened in the pre-1.60 navigation branch). (#787)
+- Style: Changed default style.DisplaySafeAreaPadding values from (4,4) to (3,3) so it is smaller than FramePadding and has no effect on main menu bar on a computer. (#1439)
+- Fonts: When building font atlas, glyphs that are missing in the fonts are not using the glyph slot to render a dummy/default glyph. Saves space and allow merging fonts with
+ overlapping font ranges such as FontAwesome5 which split out the Brands separately from the Solid fonts. (#1703, #1671)
+- Misc: Added IMGUI_CHECKVERSION() macro to compare version string and data structure sizes in order to catch issues with mismatching compilation unit settings. (#1695, #1769)
+- Misc: Added IMGUI_DISABLE_MATH_FUNCTIONS in imconfig.h to make it easier to redefine wrappers for std/crt math functions.
+- Misc: Fix to allow compiling in unity builds where stb_rectpack/stb_truetype may be already included in the same compilation unit.
+- Demo: Simple Overlay: Added a context menu item to enable freely moving the window.
+- Demo: Added demo for DragScalar(), InputScalar(), SliderScalar(). (#643)
+- Examples: Calling IMGUI_CHECKVERSION() in the main.cpp of every example application.
+- Examples: Allegro 5: Added support for 32-bit indices setup via defining ImDrawIdx, to avoid an unnecessary conversion (Allegro 5 doesn't support 16-bit indices).
+- Examples: Allegro 5: Renamed bindings from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
+- Examples: DirectX 9: Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud. (#1790, #1687) [@sr-tream]
+- Examples: SDL: Fixed clipboard paste memory leak in the SDL binding code. (#1803) [@eliasdaler]
+- Various minor fixes, tweaks, refactoring, comments.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.60 (Released 2018-04-07)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.60
+
+The gamepad/keyboard navigation branch (which has been in the work since July 2016) has been merged.
+Gamepad/keyboard navigation is still marked as Beta and has to be enabled explicitly.
+Various internal refactoring have also been done, as part of the navigation work and as part of the upcoming viewport/docking work.
+
+Breaking Changes:
+
+- Obsoleted the io.RenderDrawListsFn callback, you can call your graphics engine render function after ImGui::Render().
+ e.g. with example backends, call ImDrawData* draw_data = ImGui::GetDrawData(); ImGui_ImplXXXX_RenderDrawData(draw_data).
+- Reorganized context handling to be more explicit: (#1599)
+ - YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END.
+ - removed Shutdown() function, as DestroyContext() serve this purpose. If you are using an old backend from the examples/ folder, remove the line that calls Shutdown().
+ - you may pass a ImFontAtlas* pointer to CreateContext() to share a font atlas between contexts. Otherwise CreateContext() will create its own font atlas instance.
+ - removed allocator parameters from CreateContext(), they are now setup with SetAllocatorFunctions(), and shared by all contexts.
+ - removed the default global context and font atlas instance, which were confusing for users of DLL reloading and users of multiple contexts.
+- Renamed ImGuiStyleVar_Count_ to ImGuiStyleVar_COUNT and ImGuiMouseCursor_Count_ to ImGuiMouseCursor_COUNT for consistency with other public enums.
+- Fonts: Moved sample TTF files from extra_fonts/ to misc/fonts/. If you loaded files directly from the imgui repo you may need to update your paths.
+- Fonts: changed ImFont::DisplayOffset.y to defaults to 0 instead of +1. Fixed vertical rounding of Ascent/Descent to match TrueType renderer.
+ If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
+- BeginDragDropSource(): temporarily removed the optional mouse_button=0 parameter because it is not really usable in many situations at the moment.
+- Obsoleted IsAnyWindowHovered() in favor of IsWindowHovered(ImGuiHoveredFlags_AnyWindow). Kept redirection function (will obsolete).
+- Obsoleted IsAnyWindowFocused() in favor of IsWindowFocused(ImGuiFocusedFlags_AnyWindow). Kept redirection function (will obsolete).
+- Renamed io.WantMoveMouse to io.WantSetMousePos for consistency and ease of understanding (was added in 1.52, not used by core, and honored by some binding ahead of merging the Nav branch).
+- Removed ImGuiCol_CloseButton, ImGuiCol_CloseButtonActive, ImGuiCol_CloseButtonHovered style colors as the closing cross uses regular button colors now.
+- Renamed ImGuiSizeConstraintCallback to ImGuiSizeCallback, ImGuiSizeConstraintCallbackData to ImGuiSizeCallbackData.
+- Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it should be easy to replicate on your side (you can find the code in 1.53).
+- [EDITED] Window: BeginChild() with an explicit name doesn't include the hash within the internal window name. (#1698)
+ This change was erroneously introduced, undoing the change done for #894, #713, and not documented properly in the original
+ 1.60 release Changelog. It was fixed on 2018-09-28 (1.66) and I wrote this paragraph the same day.
+
+Other Changes:
+
+- Doc: Added a Changelog file in the repository to ease comparing versions (it goes back to dear imgui 1.48), until now it was only on GitHub.
+- Navigation: merged in the gamepad/keyboard navigation (about a million changes!). (#787, #323)
+ The initial focus was to support game controllers, but keyboard is becoming increasingly and decently usable.
+- To use Gamepad Navigation:
+ - Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad to enable.
+ - Backend: Set io.BackendFlags |= ImGuiBackendFlags_HasGamepad + fill the io.NavInputs[] fields before calling NewFrame(). Read imgui.cpp for more details.
+ - See https://github.com/ocornut/imgui/issues/1599 for recommended gamepad mapping or download PNG/PSD at http://goo.gl/9LgVZW
+ - See 'enum ImGuiNavInput_' in imgui.h for a description of inputs. Read imgui.cpp for more details.
+- To use Keyboard Navigation:
+ - Set io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard to enable. NewFrame() will automatically fill io.NavInputs[] based on your io.KeysDown[] + io.KeyMap[] arrays.
+ - Basic controls: arrows to navigate, Alt to enter menus, Space to activate item, Enter to edit text, Escape to cancel/close, Ctrl-Tab to focus windows, etc.
+ - When keyboard navigation is active (io.NavActive + ImGuiConfigFlags_NavEnableKeyboard), the io.WantCaptureKeyboard flag will be set.
+ For more advanced uses, you may want to read from io.NavActive or io.NavVisible. Read imgui.cpp for more details.
+- Navigation: SetItemDefaultFocus() sets the navigation position in addition to scrolling. (#787)
+- Navigation: Added IsItemFocused(), added IsAnyItemFocused(). (#787)
+- Navigation: Added window flags: ImGuiWindowFlags_NoNav (== ImGuiWindowFlags_NoNavInputs | ImGuiWindowFlags_NoNavFocus).
+- Navigation: Style: Added ImGuiCol_NavHighlight, ImGuiCol_NavWindowingHighlight colors. (#787)
+- Navigation: TreeNode: Added ImGuiTreeNodeFlags_NavLeftJumpsBackHere flag to allow Nav Left direction to jump back to parent tree node from any of its child. (#1079)
+- Navigation: IO: Added io.ConfigFlags (input), io.NavActive (output), io.NavVisible (output). (#787)
+- Context: Removed the default global context and font atlas instances, which caused various problems to users of multiple contexts and DLL users. (#1565, #1599)
+ YOU NOW NEED TO CALL ImGui::CreateContext() AT THE BEGINNING OF YOUR APP, AND CALL ImGui::DestroyContext() AT THE END. Existing apps will assert/crash without it.
+- Context: Added SetAllocatorFunctions() to rewire memory allocators (as a replacement to previous parameters to CreateContext()). Allocators are shared by all contexts and imgui helpers. (#1565, #586, #992, #1007, #1558)
+- Context: You may pass a ImFontAtlas to CreateContext() to specify a font atlas to share. Shared font atlas are not owned by the context and not destroyed along with it. (#1599)
+- Context: Added IMGUI_DISABLE_DEFAULT_ALLOCATORS to disable linking with malloc/free. (#1565, #586, #992, #1007, #1558)
+- IO: Added io.ConfigFlags for user application to store settings for imgui and for the backend:
+ - ImGuiConfigFlags_NavEnableKeyboard: Enable keyboard navigation.
+ - ImGuiConfigFlags_NavEnableGamepad: Enable gamepad navigation (provided ImGuiBackendFlags_HasGamepad is also set by backend).
+ - ImGuiConfigFlags_NavEnableSetMousePos: Instruct navigation to move the mouse cursor. May be useful on TV/console systems where moving a virtual mouse is awkward.
+ - ImGuiConfigFlags_NoMouseCursorChange: Instruct backend to not alter mouse cursor shape and visibility (by default the example backend use mouse cursor API of the platform when available)
+ - ImGuiConfigFlags_NoMouse: Instruct imgui to clear mouse position/buttons in NewFrame(). This allows ignoring the mouse information passed by the backend.
+ - ImGuiConfigFlags_IsSRGB, ImGuiConfigFlags_IsTouchScreen: Flags for general application use.
+- IO: Added io.BackendFlags for backend to store its capabilities (currently: _HasGamepad, _HasMouseCursors, _HasSetMousePos). This will be used more in the next version.
+- IO: Added ImGuiKey_Insert, ImGuiKey_Space keys. Setup in all example bindings. (#1541)
+- IO: Added Horizontal Mouse Wheel support for horizontal scrolling. (#1463) [@tseeker]
+- IO: Added IsAnyMouseDown() helper which is helpful for bindings to handle mouse capturing.
+- Window: Clicking on a window with the ImGuiWIndowFlags_NoMove flags takes an ActiveId so we can't hover something else when dragging afterwards. (#1381, #1337)
+- Window: IsWindowHovered(): Added ImGuiHoveredFlags_AnyWindow, ImGuiFocusedFlags_AnyWindow flags (See Breaking Changes). Added to demo. (#1382)
+- Window: Added SetNextWindowBgAlpha() helper. Particularly helpful since the legacy 5-parameters version of Begin() has been marked as obsolete in 1.53. (#1567)
+- Window: Fixed SetNextWindowContentSize() with 0.0f on Y axis (or SetNextWindowContentWidth()) overwriting the contents size. Got broken on Dec 10 (1.53). (#1363)
+- ArrowButton: Added ArrowButton() given a cardinal direction (e.g. ImGuiDir_Left).
+- InputText: Added alternative clipboard shortcuts: Shift+Delete (cut), CTRL+Insert (copy), Shift+Insert (paste). (#1541)
+- InputText: Fixed losing Cursor X position when clicking outside on an item that's submitted after the InputText(). It was only noticeable when restoring focus programmatically. (#1418, #1554)
+- InputText: Added ImGuiInputTextFlags_CharsScientific flag to also allow 'e'/'E' for input of values using scientific notation. Automatically used by InputFloat.
+- Style: Default style is now StyleColorsDark(), instead of the old StyleColorsClassic(). (#707)
+- Style: Enable window border by default. (#707)
+- Style: Exposed ImGuiStyleVar_WindowTitleAlign, ImGuiStyleVar_ScrollbarSize, ImGuiStyleVar_ScrollbarRounding, ImGuiStyleVar_GrabRounding + added an assert to reduce accidental breakage. (#1181)
+- Style: Added style.MouseCursorScale help when using the software mouse cursor facility. (#939).
+- Style: Close button nows display a cross before hovering. Fixed cross positioning being a little off. Uses button colors for highlight when hovering. (#707)
+- Popup: OpenPopup() Always reopen existing pop-ups. (Removed imgui_internal.h's OpenPopupEx() which was used for this.) (#1497, #1533).
+- Popup: BeginPopupContextItem(), BeginPopupContextWindow(), BeginPopupContextVoid(), OpenPopupOnItemClick() all react on mouse release instead of mouse press. (~#439)
+- Popup: Better handling of user mistakenly calling OpenPopup() every frame (with reopen_existing option). The error will now be more visible and easier to understand. (#1497)
+- Popup: BeginPopup(): Exposed extra_flags parameter that are passed through to Begin(). (#1533)
+- Popup: BeginPopupModal: fixed the conditional test for SetNextWindowPos() which was polling the wrong window, which in practice made the test succeed all the time.
+- Tooltip: BeginTooltip() sets ImGuiWindowFlags_NoInputs flag.
+- Scrollbar: Fixed ScrollbarY enable test after ScrollbarX has been enabled being a little off (small regression from Nov 2017). (#1574)
+- Scrollbar: Fixed ScrollbarX enable test subtracting WindowPadding.x (this has been there since the addition of horizontal scroll bar!).
+- Columns: Clear offsets data when columns count changed. (#1525)
+- Columns: Fixed a memory leak of ImGuiColumnsSet's Columns vector. (#1529) [@unprompted]
+- Columns: Fixed resizing a window very small breaking some columns positioning (broken in 1.53).
+- Columns: The available column extent takes consideration of the right-most clipped pixel, so the right-most column may look a little wider but will contain the same amount of visible contents.
+- MenuBar: Fixed menu bar pushing a clipping rect outside of its allocated bound (usually unnoticeable).
+- TreeNode: nodes with the ImGuiTreeNodeFlags_Leaf flag correctly disable highlight when DragDrop is active. (#143, #581)
+- Drag and Drop: Increased payload type string to 32 characters instead of 8. (#143)
+- Drag and Drop: TreeNode as drop target displays rectangle over full frame. (#1597, #143)
+- DragFloat: Fix/workaround for backends which do not preserve a valid mouse position when dragged out of bounds. (#1559)
+- InputFloat: Allow inputing value using scientific notation e.g. "1e+10".
+- InputDouble: Added InputDouble() function. We use a format string instead of a decimal_precision parameter to also for "%e" and variants. (#1011)
+- Slider, Combo: Use ImGuiCol_FrameBgHovered color when hovered. (#1456) [@stfx]
+- Combo: BeginCombo(): Added ImGuiComboFlags_NoArrowButton to disable the arrow button and only display the wide value preview box.
+- Combo: BeginCombo(): Added ImGuiComboFlags_NoPreview to disable the preview and only display a square arrow button.
+- Combo: Arrow button isn't displayed over frame background so its blended color matches other buttons. Left side of the button isn't rounded.
+- PlotLines: plot a flat line if scale_min==scale_max. (#1621)
+- Fonts: Changed DisplayOffset.y to defaults to 0 instead of +1. Fixed rounding of Ascent/Descent to match TrueType renderer.
+ If you were adding or subtracting (not assigning) to ImFont::DisplayOffset check if your fonts are correctly aligned vertically. (#1619)
+- Fonts: Updated stb_truetype from 1.14 to stb_truetype 1.19. (w/ include fix from some platforms #1622)
+- Fonts: Added optional FreeType rasterizer in misc/freetype. Moved from imgui_club repo. (#618) [@Vuhdo, @mikesart, @ocornut]
+- Fonts: Moved extra_fonts/ to misc/fonts/.
+- ImFontAtlas: Fixed cfg.MergeMode not reusing existing glyphs if available (always overwrote).
+- ImFontAtlas: Handle stb_truetype stbtt_InitFont() and stbtt_PackBegin() possible failures more gracefully, GetTexDataAsRGBA32() won't crash during conversion. (#1527)
+- ImFontAtlas: Moved mouse cursor data out of ImGuiContext, fix drawing them with multiple contexts. Also remove the last remaining undesirable dependency on ImGui in imgui_draw.cpp. (#939)
+- ImFontAtlas: Added ImFontAtlasFlags_NoPowerOfTwoHeight flag to disable padding font height to nearest power of two. (#1613)
+- ImFontAtlas: Added ImFontAtlasFlags_NoMouseCursors flag to disable baking software mouse cursors, mostly to save texture memory on very low end hardware. (#1613)
+- ImDrawList: Fixed AddRect() with anti-aliasing disabled (lower-right corner pixel was often missing, rounding looks a little better.) (#1646)
+- ImDrawList: Added CloneOutput() helper to facilitate the cloning of ImDrawData or ImDrawList for multi-threaded rendering.
+- Misc: Functions passed to libc qsort are explicitly marked cdecl to support compiling with vectorcall as the default calling convention. (#1230, #1611) [@RandyGaul]
+- Misc: ImVec2: added [] operator. This is becoming desirable for some code working of either axes independently. Better adding it sooner than later.
+- Misc: NewFrame(): Added an assert to detect incorrect filling of the io.KeyMap[] array earlier. (#1555)
+- Misc: Added IM_OFFSETOF() helper in imgui.h (previously was in imgui_internal.h)
+- Misc: Added IM_NEW(), IM_DELETE() helpers in imgui.h (previously were in imgui_internal.h)
+- Misc: Added obsolete redirection function GetItemsLineHeightWithSpacing() (which redirects to GetFrameHeightWithSpacing()), as intended and stated in docs of 1.53.
+- Misc: Added misc/natvis/imgui.natvis for visual studio debugger users to easily visualize imgui internal types. Added to examples projects.
+- Misc: Added IMGUI_USER_CONFIG to define a custom configuration filename. (#255, #1573, #1144, #41)
+- Misc: Added IMGUI_STB_TRUETYPE_FILENAME and IMGUI_STB_RECT_PACK_FILENAME compile time directives to use another version of the stb_ files.
+- Misc: Updated stb_rect_pack from 0.10 to 0.11 (minor changes).
+ (Those flags are not used by ImGui itself, they only exists to make it easy for the engine/backend to pass information to the application in a standard manner.)
+- Metrics: Added display of Columns state.
+- Demo: Improved Selectable() examples. (#1528)
+- Demo: Tweaked the Child demos, added a menu bar to the second child to test some navigation functions.
+- Demo: Console: Using ImGuiCol_Text to be more friendly to color changes.
+- Demo: Using IM_COL32() instead of ImColor() in ImDrawList centric contexts. Trying to phase out use of the ImColor helper whenever possible.
+- Examples: Files in examples/ now include their own changelog so it is easier to occasionally update your bindings if needed.
+- Examples: Using Dark theme by default. (#707). Tweaked demo code.
+- Examples: Added support for horizontal mouse wheel for API that allows it. (#1463) [@tseeker]
+- Examples: All examples now setup the io.BackendFlags to signify they can honor mouse cursors, gamepad, etc.
+- Examples: DirectX10: Fixed erroneous call to io.Fonts->ClearInputData() + ClearTexData() that was left in DX10 example but removed in 1.47 (Nov 2015) in every other backends. (#1733)
+- Examples: DirectX12: Added DirectX 12 example. (#301) [@jdm3]
+- Examples: OpenGL3+GLFW,SDL: Changed GLSL shader version from 330 to 150. (#1466, #1504)
+- Examples: OpenGL3+GLFW,SDL: Added a way to override the GLSL version string in the Init function. (#1466, #1504).
+- Examples: OpenGL3+GLFW,SDL: Creating VAO in the render function so it can be more easily used by multiple shared OpenGL contexts. (#1217)
+- Examples: OpenGL3+GLFW: Using 3.2 context instead of 3.3. (#1466)
+- Examples: OpenGL: Setting up glPixelStorei() explicitly before uploading texture.
+- Examples: OpenGL: Calls to glPolygonMode() are casting parameters as GLEnum to not fail with more strict bindings. (#1628) [@ilia-glushchenko]
+- Examples: Win32 (DirectX9,10,11,12): Added support for mouse cursor shapes. (#1495)
+- Examples: Win32 (DirectX9,10,11,12: Support for windows using the CS_DBLCLKS class flag by handling the double-click messages (WM_LBUTTONDBLCLK etc.). (#1538, #754) [@ndandoulakis]
+- Examples: Win32 (DirectX9,10,11,12): Made the Win32 proc handlers not assert if there is no active context yet, to be more flexible with creation order. (#1565)
+- Examples: GLFW: Added support for mouse cursor shapes (the diagonal resize cursors are unfortunately not supported by GLFW at the moment. (#1495)
+- Examples: GLFW: Don't attempt to change the mouse cursor input mode if it is set to GLFW_CURSOR_DISABLED by the application. (#1202) [@PhilCK]
+- Examples: SDL: Added support for mouse cursor shapes. (#1626) [@olls]
+- Examples: SDL: Using SDL_CaptureMouse() to retrieve coordinates outside of client area when dragging (SDL 2.0.4+ only, otherwise using SDL_WINDOW_INPUT_FOCUS instead of previously SDL_WINDOW_MOUSE_FOCUS). (#1559)
+- Examples: SDL: Enabled vsync by default so people don't come at us when the examples are running at 2000 FPS and burning a CPU core.
+- Examples: SDL: Using SDL_GetPerformanceCounter() / SDL_GetPerformanceFrequency() to handle frame-rate over 1000 FPS properly. (#996)
+- Examples: SDL: Using scan-code exclusively instead of a confusing mixture of scan-codes and key-codes.
+- Examples: SDL: Visual Studio: Added .vcxproj file. Using %SDL2_DIR% in the default .vcxproj and build files instead of %SDL_DIR%, the earlier being more standard.
+- Examples: Vulkan: Visual Studio: Added .vcxproj file.
+- Examples: Apple: Fixed filenames in OSX xcode project. Various other Mac friendly fixes. [@gerryhernandez etc.]
+- Examples: Visual Studio: Disabled extraneous function-level check in Release build.
+- Various fixes, tweaks, internal refactoring, optimizations, comments.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.53 (Released 2017-12-25)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.53
+
+Breaking Changes:
+
+- Renamed the emblematic `ShowTestWindow()` function to `ShowDemoWindow()`. Kept redirection function (will obsolete).
+- Renamed `GetItemsLineHeightWithSpacing()` to `GetFrameHeightWithSpacing()` for consistency. Kept redirection function (will obsolete).
+- Renamed `ImGuiTreeNodeFlags_AllowOverlapMode` flag to `ImGuiTreeNodeFlags_AllowItemOverlap`. Kept redirection enum (will obsolete).
+- Obsoleted `IsRootWindowFocused()` in favor of using `IsWindowFocused(ImGuiFocusedFlags_RootWindow)`. Kept redirection function (will obsolete). (#1382)
+- Obsoleted `IsRootWindowOrAnyChildFocused()` in favor of using `IsWindowFocused(ImGuiFocusedFlags_RootAndChildWindows)`. Kept redirection function (will obsolete). (#1382)
+- Obsoleted `IsRootWindowOrAnyChildHovered()` in favor of using `IsWindowHovered(ImGuiHoveredFlags_RootAndChildWindows)`. Kept redirection function (will obsolete). (#1382)
+- Obsoleted `SetNextWindowContentWidth() in favor of using `SetNextWindowContentSize()`. Kept redirection function (will obsolete).
+- Renamed `ImGuiTextBuffer::append()` helper to `appendf()`, and `appendv()` to `appendfv()` for consistency. If you copied the 'Log' demo in your code, it uses appendv() so that needs to be renamed.
+- ImDrawList: Removed 'bool anti_aliased = true' final parameter of `ImDrawList::AddPolyline()` and `ImDrawList::AddConvexPolyFilled()`. Prefer manipulating ImDrawList::Flags if you need to toggle them during the frame.
+- Style, ImDrawList: Renamed `style.AntiAliasedShapes` to `style.AntiAliasedFill` for consistency and as a way to explicitly break code that manipulate those flag at runtime. You can now manipulate ImDrawList::Flags.
+- Style, Begin: Removed `ImGuiWindowFlags_ShowBorders` window flag. Borders are now fully set up in the ImGuiStyle structure (see e.g. `style.FrameBorderSize`, `style.WindowBorderSize`, `style.PopupBorderSize`).
+ Use `ImGui::ShowStyleEditor()` to look them up.
+ Please note that the style system will keep evolving (hopefully stabilizing in Q1 2018), and so custom styles will probably subtly break over time.
+ It is recommended that you use the `StyleColorsClassic()`, `StyleColorsDark()`, `StyleColorsLight()` functions. Also see `ShowStyleSelector()`.
+- Style: Removed `ImGuiCol_ComboBg` in favor of combo boxes using `ImGuiCol_PopupBg` for consistency. Combo are normal pop-ups.
+- Style: Renamed `ImGuiCol_ChildWindowBg` to `ImGuiCol_ChildBg`.
+- Style: Renamed `style.ChildWindowRounding` to `style.ChildRounding`, `ImGuiStyleVar_ChildWindowRounding` to `ImGuiStyleVar_ChildRounding`.
+- Removed obsolete redirection functions: SetScrollPosHere() - marked obsolete in v1.42, July 2015.
+- Removed obsolete redirection functions: GetWindowFont(), GetWindowFontSize() - marked obsolete in v1.48, March 2016.
+
+Other Changes:
+
+- Added `io.OptCursorBlink` option to allow disabling cursor blinking. (#1427) [renamed to io.ConfigCursorBlink in 1.63]
+- Added `GetOverlayDrawList()` helper to quickly get access to a ImDrawList that will be rendered in front of every windows.
+- Added `GetFrameHeight()` helper which returns `(FontSize + style.FramePadding.y * 2)`.
+- Drag and Drop: Added Beta API to easily use drag and drop patterns between imgui widgets.
+ - Setup a source on a widget with `BeginDragDropSource()`, `SetDragDropPayload()`, `EndDragDropSource()` functions.
+ - Receive data with `BeginDragDropTarget()`, `AcceptDragDropPayload()`, `EndDragDropTarget()`.
+ - See ImGuiDragDropFlags for various options.
+ - The ColorEdit4() and ColorButton() widgets now support Drag and Drop.
+ - The API is tagged as Beta as it still may be subject to small changes.
+- Drag and Drop: When drag and drop is active, tree nodes and collapsing header can be opened by hovering on them for 0.7 seconds.
+- Renamed io.OSXBehaviors to io.OptMacOSXBehaviors. Should not affect users as the compile-time default is usually enough. (#473, #650)
+- Style: Added StyleColorsDark() style. (#707) [@dougbinks]
+- Style: Added StyleColorsLight() style. Best used with frame borders + thicker font than the default font. (#707)
+- Style: Added style.PopupRounding setting. (#1112)
+- Style: Added style.FrameBorderSize, style.WindowBorderSize, style.PopupBorderSize. Removed ImGuiWindowFlags_ShowBorders window flag!
+ Borders are now fully set up in the ImGuiStyle structure. Use ImGui::ShowStyleEditor() to look them up. (#707, fix #819, #1031)
+- Style: Various small changes to the classic style (most noticeably, buttons are now using blue shades). (#707)
+- Style: Renamed ImGuiCol_ChildWindowBg to ImGuiCol_ChildBg.
+- Style: Renamed style.ChildWindowRounding to style.ChildRounding, ImGuiStyleVar_ChildWindowRounding to ImGuiStyleVar_ChildRounding.
+- Style: Removed ImGuiCol_ComboBg in favor of combo boxes using ImGuiCol_PopupBg for consistency. (#707)
+- Style: Made the ScaleAllSizes() helper rounds down every values so they are aligned on integers.
+- Focus: Added SetItemDefaultFocus(), which in the current (master) branch behave the same as doing `if (IsWindowAppearing()) SetScrollHere()`.
+ In the navigation branch this will also set the default focus. Prefer using this when creating combo boxes with `BeginCombo()` so your code will be forward-compatible with gamepad/keyboard navigation features. (#787)
+- Combo: Pop-up grows horizontally to accommodate for contents that is larger then the parent combo button.
+- Combo: Added BeginCombo()/EndCombo() API which allows use to submit content of any form and manage your selection state without relying on indices.
+- Combo: Added ImGuiComboFlags_PopupAlignLeft flag to BeginCombo() to prioritize keeping the pop-up on the left side (for small-button-looking combos).
+- Combo: Added ImGuiComboFlags_HeightSmall, ImGuiComboFlags_HeightLarge, ImGuiComboFlags_HeightLargest to easily provide desired pop-up height.
+- Combo: You can use SetNextWindowSizeConstraints() before BeginCombo() to specify specific pop-up width/height constraints.
+- Combo: Offset popup position by border size so that a double border isn't so visible. (#707)
+- Combo: Recycling windows by using a stack number instead of a unique id, wasting less memory (like menus do).
+- InputText: Added ImGuiInputTextFlags_NoUndoRedo flag. (#1506, #1508) [@ibachar]
+- Window: Fixed auto-resize allocating too much space for scrollbar when SizeContents is bigger than maximum window size (fixes c0547d3). (#1417)
+- Window: Child windows with MenuBar use regular WindowPadding.y so layout look consistent as child or as a regular window.
+- Window: Begin(): Fixed appending into a child window with a second Begin() from a different window stack querying the wrong window for the window->Collapsed test.
+- Window: Calling IsItemActive(), IsItemHovered() etc. after a call to Begin() provides item data for the title bar, so you can easily test if the title bar is being hovered, etc. (#823)
+- Window: Made it possible to use SetNextWindowPos() on a child window.
+- Window: Fixed a one frame glitch. When an appearing window claimed the focus themselves, the title bar wouldn't use the focused color for one frame.
+- Window: Added ImGuiWindowFlags_ResizeFromAnySide flag to resize from any borders or from the lower-left corner of a window. This requires your backend to honor GetMouseCursor() requests for full usability. (#822)
+- Window: Sizing fixes when using SetNextWindowSize() on individual axises.
+- Window: Hide new window for one frame until they calculate their size. Also fixes SetNextWindowPos() given a non-zero pivot. (#1694)
+- Window: Made mouse wheel scrolling accommodate better to windows that are smaller than the scroll step.
+- Window: SetNextWindowContentSize() adjust for the size of decorations (title bar/menu bar), but _not_ for borders are we consistently make borders not affect layout.
+ If you need a non-child window of an exact size with border enabled but zero window padding, you'll need to accommodate for the border size yourself.
+- Window: Using the ImGuiWindowFlags_NoScrollWithMouse flag on a child window forwards the mouse wheel event to the parent window, unless either ImGuiWindowFlags_NoInputs or ImGuiWindowFlags_NoScrollbar are also set. (#1380, #1502)
+- Window: Active Modal window always set the WantCaptureKeyboard flag. (#744)
+- Window: Moving window doesn't use accumulating MouseDelta so straying out of imgui boundaries keeps moved imgui window at the same cursor-relative position.
+- IsWindowFocused(): Added ImGuiFocusedFlags_ChildWindows flag to include child windows in the focused test. (#1382).
+- IsWindowFocused(): Added ImGuiFocusedFlags_RootWindow flag to start focused test from the root (top-most) window. Obsolete IsRootWindowFocused(). (#1382)
+- IsWindowHovered(): Added ImGuiHoveredFlags_ChildWindows flag to include child windows in the hovered test. (#1382).
+- IsWindowHovered(): Added ImGuiHoveredFlags_RootWindow flag to start hovered test from the root (top-most) window. The combination of both flags obsoletes IsRootWindowOrAnyChildHovered(). (#1382)
+- IsWindowHovered(): Fixed return value when an item is active to use the same logic as IsItemHovered(). (#1382, #1404)
+- IsWindowHovered(): Always return true when current window is being moved. (#1382)
+- Scrollbar: Fixed issues with vertical scrollbar flickering/appearing, typically when manually resizing and using a pattern of filling available height (e.g. full sized BeginChild).
+- Scrollbar: Minor graphical fix for when scrollbar don't have enough visible space to display the full grab.
+- Scrolling: Fixed padding and scrolling asymmetry where lower/right sides of a window wouldn't use WindowPadding properly + causing minor scrolling glitches.
+- Tree: TreePush with zero arguments was ambiguous. Resolved by making it call TreePush(const void*). [@JasonWilkins]
+- Tree: Renamed ImGuiTreeNodeFlags_AllowOverlapMode to ImGuiTreeNodeFlags_AllowItemOverlap. (#600, #1330)
+- MenuBar: Fixed minor rendering issues on the right size when resizing a window very small and using rounded window corners.
+- MenuBar: better software clipping to handle small windows, in particular child window don't have minimum constraints so we need to render clipped menus better.
+- BeginMenu(): Tweaked the Arrow/Triangle displayed on child menu items.
+- Columns: Clipping columns borders on Y axis on CPU because some Linux GPU drivers appears to be unhappy with triangle spanning large regions. (#125)
+- Columns: Added ImGuiColumnsFlags_GrowParentContentsSize to internal API to restore old content sizes behavior (may be obsolete). (#1444, #125)
+- Columns: Columns width is no longer lost when dragging a column to the right side of the window, until releasing the mouse button you have a chance to save them. (#1499, #125). [@ggtucker]
+- Columns: Fixed dragging when using a same of columns multiple times in the frame. (#125)
+- Indent(), Unindent(): Allow passing negative values.
+- ColorEdit4(): Made IsItemActive() return true when picker pop-up is active. (#1489)
+- ColorEdit4(): Tweaked tooltip so that the color button aligns more correctly with text.
+- ColorEdit4(): Support drag and drop. Color buttons can be used as drag sources, and ColorEdit widgets as drag targets. (#143)
+- ColorPicker4(): Fixed continuously returning true when holding mouse button on the sat/value/alpha locations. We only return true on value change. (#1489)
+- NewFrame(): using literal strings in the most-frequently firing IM_ASSERT expressions to increase the odd of programmers seeing them (especially those who don't use a debugger).
+- NewFrame() now asserts if neither Render or EndFrame have been called. Exposed EndFrame(). Made it legal to call EndFrame() more than one. (#1423)
+- ImGuiStorage: Added BuildSortByKey() helper to rebuild storage from scratch.
+- ImFont: Added GetDebugName() helper.
+- ImFontAtlas: Added missing Thai punctuation in the GetGlyphRangesThai() ranges. (#1396) [@nProtect]
+- ImDrawList: Removed 'bool anti_aliased = true' final parameter of ImDrawList::AddPolyline() and ImDrawList::AddConvexPolyFilled(). Anti-aliasing is controlled via the regular style.AntiAliased flags.
+- ImDrawList: Added ImDrawList::AddImageRounded() helper. (#845) [@thedmd]
+- ImDrawList: Refactored to make ImDrawList independent of ImGui. Removed static variable in PathArcToFast() which caused linking issues to some.
+- ImDrawList: Exposed ImDrawCornerFlags, replaced occurrences of ~0 with an explicit ImDrawCornerFlags_All. NB: Inversed BotLeft (prev 1<<3, now 1<<2) and BotRight (prev 1<<2, now 1<<3).
+- ImVector: Added ImVector::push_front() helper.
+- ImVector: Added ImVector::contains() helper.
+- ImVector: insert() uses grow_capacity() instead of using grow policy inconsistent with push_back().
+- Internals: Remove requirement to define IMGUI_DEFINE_PLACEMENT_NEW to use the IM_PLACEMENT_NEW macro. (#1103)
+- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_NoHoldingActiveID flag from incorrectly setting the ActiveIdClickOffset field.
+ This had no known effect within imgui code but could have affected custom drag and drop patterns. And it is more correct this way! (#1418)
+- Internals: ButtonBehavior: Fixed ImGuiButtonFlags_AllowOverlapMode to avoid temporarily activating widgets on click before they have been correctly double-hovered. (#319, #600)
+- Internals: Added SplitterBehavior() helper. (#319)
+- Internals: Added IM_NEW(), IM_DELETE() helpers. (#484, #504, #1517)
+- Internals: Basic refactor of the settings API which now allows external elements to be loaded/saved.
+- Demo: Added ShowFontSelector() showing loaded fonts.
+- Demo: Added ShowStyleSelector() to select among default styles. (#707)
+- Demo: Renamed the emblematic ShowTestWindow() function to ShowDemoWindow().
+- Demo: Style Editor: Added a "Simplified settings" sections with check-boxes for border size and frame rounding. (#707, #1019)
+- Demo: Style Editor: Added combo box to select stock styles and select current font when multiple are loaded. (#707)
+- Demo: Style Editor: Using local storage so Save/Revert button makes more sense without code passing its storage. Added horizontal scroll bar. Fixed Save/Revert button to be always accessible. (#1211)
+- Demo: Console: Fixed context menu issue. (#1404)
+- Demo: Console: Fixed incorrect positioning which was hidden by a minor scroll issue (this would affect people who copied the Console code as is).
+- Demo: Constrained Resize: Added more test cases. (#1417)
+- Demo: Custom Rendering: Fixed clipping rectangle extruding out of parent window.
+- Demo: Layout: Removed unnecessary and misleading BeginChild/EndChild calls.
+- Demo: The "Color Picker with Palette" demo supports drag and drop. (#143)
+- Demo: Display better mouse cursor info for debugging backends.
+- Demo: Stopped using rand() function in demo code.
+- Examples: Added a handful of extra comments (about fonts, third-party libraries used in the examples, etc.).
+- Examples: DirectX9: Handle loss of D3D9 device (D3DERR_DEVICELOST). (#1464)
+- Examples: Added null_example/ which is helpful for quick testing on multiple compilers/settings without relying on graphics library.
+- Fix for using alloca() in "Clang with Microsoft Codechain" mode.
+- Various fixes, optimizations, comments.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.52 (2017-10-27)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.52
+
+Breaking Changes:
+
+- IO: `io.MousePos` needs to be set to ImVec2(-FLT_MAX,-FLT_MAX) when mouse is unavailable/missing, instead of ImVec2(-1,-1) as previously) This is needed so we can clear `io.MouseDelta` field when the mouse is made available again.
+- Renamed `AlignFirstTextHeightToWidgets()` to `AlignTextToFramePadding()`. Kept inline redirection function (will obsolete).
+- Obsoleted the legacy 5 parameters version of Begin(). Please avoid using it. If you need a transparent window background, uses `PushStyleColor()`. The old size parameter there was also misleading and equivalent to calling `SetNextWindowSize(size, ImGuiCond_FirstTimeEver)`. Kept inline redirection function (will obsolete).
+- Obsoleted `IsItemHoveredRect()`, `IsMouseHoveringWindow()` in favor of using the newly introduced flags of `IsItemHovered()` and `IsWindowHovered()`. Kept inline redirection function (will obsolete). (#1382)
+- Obsoleted 'SetNextWindowPosCenter()' in favor of using 1SetNextWindowPos()` with a pivot value which allows to do the same and more. Keep inline redirection function.
+- Removed `IsItemRectHovered()`, `IsWindowRectHovered()` recently introduced in 1.51 which were merely the more consistent/correct names for the above functions which are now obsolete anyway. (#1382)
+- Changed `IsWindowHovered()` default parameters behavior to return false if an item is active in another window (e.g. click-dragging item from another window to this window). You can use the newly introduced IsWindowHovered() flags to requests this specific behavior if you need it. (#1382)
+- Renamed imconfig.h's `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS` to `IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS`/`IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS` for consistency.
+
+Other Changes:
+
+- ProgressBar: fixed rendering when straddling rounded area. (#1296)
+- SliderFloat, DragFloat: Using scientific notation e.g. "%.1e" in the displayed format string doesn't mistakenly trigger rounding of the value. [@MomentsInGraphics]
+- Combo, InputFloat, InputInt: Made the small button on the right side align properly with the equivalent colored button of ColorEdit4().
+- IO: Tweaked logic for `io.WantCaptureMouse` so it now outputs false when e.g. hovering over void while an InputText() is active. (#621) [@pdoane]
+- IO: Fixed `io.WantTextInput` from mistakenly outputting true when an activated Drag or Slider was previously turned into an InputText(). (#1317)
+- Misc: Added flags to `IsItemHovered()`, `IsWindowHovered()` to access advanced hovering-test behavior. Generally useful for pop-ups and drag and drop behaviors: (relates to ~#439, #1013, #143, #925)
+ - `ImGuiHoveredFlags_AllowWhenBlockedByPopup`
+ - `ImGuiHoveredFlags_AllowWhenBlockedByActiveItem`
+ - `ImGuiHoveredFlags_AllowWhenOverlapped`
+ - `ImGuiHoveredFlags_RectOnly`
+- Input: Added `IsMousePosValid()` helper.
+- Input: Added `GetKeyPressedAmount()` to easily measure press count when the repeat rate is faster than the frame rate.
+- Input/Focus: Disabled TAB and Shift+TAB when CTRL key is held.
+- CheckBox: Now rendering a tick mark instead of a full square.
+- ColorEdit4: Added "Copy as..." option in context menu. (#346)
+- ColorPicker: Improved ColorPicker hue wheel color interpolation. (#1313) [@thevaber]
+- ColorButton: Reduced bordering artifact that would be particularly visible with an opaque Col_FrameBg and FrameRounding enabled.
+- ColorButton: Fixed rendering color button with a checkerboard if the transparency comes from the global style.Alpha and not from the actual source color.
+- TreeNode: Added `ImGuiTreeNodeFlags_FramePadding` flag to conveniently create a tree node with full padding at the beginning of a line, without having to call `AlignTextToFramePadding()`.
+- Trees: Fixed calling `SetNextTreeNodeOpen()` on a collapsed window leaking to the first tree node item of the next frame.
+- Layout: Horizontal layout is automatically enforced in a menu bar, so you can use non-MenuItem elements without calling SameLine().
+- Separator: Output a vertical separator when used inside a menu bar (or in general when horizontal layout is active, but that isn't exposed yet!).
+- Window: Added `IsWindowAppearing()` helper (helpful e.g. as a condition before initializing some of your own things.).
+- Window: Added pivot parameter to `SetNextWindowPos()`, making it possible to center or right align a window. Obsoleted `SetNextWindowPosCenter()`.
+- Window: Fixed title bar color of top-most window under a modal window.
+- Window: Fixed not being able to move a window by clicking on one of its child window. (#1337, #635)
+- Window: Fixed `Begin()` auto-fit calculation code that predict the presence of a scrollbar so it works better when window size constraints are used.
+- Window: Fixed calling `Begin()` more than once per frame setting `window_just_activated_by_user` which in turn would set enable the Appearing condition for that frame.
+- Window: The implicit "Debug" window now uses a "Debug##Default" identifier instead of "Debug" to allow user creating a window called "Debug" without losing their custom flags.
+- Window: Made the `ImGuiWindowFlags_NoMove` flag properly inherited from parent to child. In a setup with ParentWindow (no flag) -> Child (NoMove) -> SubChild (no flag), the user won't be able to move the parent window by clicking on SubChild. (#1381)
+- Popups: Pop-ups can be closed with a right-click anywhere, without altering focus under the pop-up. (~#439)
+- Popups: `BeginPopupContextItem()`, `BeginPopupContextWindow()` are now setup to allow reopening a context menu by right-clicking again. (~#439)
+- Popups: `BeginPopupContextItem()` now supports a NULL string identifier and uses the last item ID if available.
+- Popups: Added `OpenPopupOnItemClick()` helper which mimic `BeginPopupContextItem()` but doesn't do the BeginPopup().
+- MenuItem: Only activating on mouse release. [@Urmeli0815] (was already fixed in nav branch).
+- MenuItem: Made tick mark thicker (thick mark?).
+- MenuItem: Tweaks to be usable inside a menu bar (nb: it looks like a regular menu and thus is misleading, prefer using Button() and regular widgets in menu bar if you need to). (#1387)
+- ImDrawList: Fixed a rare draw call merging bug which could lead to undisplayed triangles. (#1172, #1368)
+- ImDrawList: Fixed a rare bug in `ChannelsMerge()` when all contents has been clipped, leading to an extraneous draw call being created. (#1172, #1368)
+- ImFont: Added `AddGlyph()` building helper for use by custom atlas builders.
+- ImFontAtlas: Added support for CustomRect API to submit custom rectangles to be packed into the atlas. You can map them as font glyphs, or use them for custom purposes.
+ After the atlas is built you can query the position of your rectangles in the texture and then copy your data there. You can use this features to create e.g. full color font-mapped icons.
+- ImFontAtlas: Fixed fall-back handling when merging fonts, if a glyph was missing from the second font input it could have used a glyph from the first one. (#1349) [@inolen]
+- ImFontAtlas: Fixed memory leak on build failure case when stbtt_InitFont failed (generally due to incorrect or supported font type). (#1391) (@Moka42)
+- ImFontConfig: Added `RasterizerMultiply` option to alter the brightness of individual fonts at rasterization time, which may help increasing readability for some.
+- ImFontConfig: Added `RasterizerFlags` to pass options to custom rasterizer (e.g. the [imgui_freetype](https://github.com/ocornut/imgui_club/tree/master/imgui_freetype) rasterizer in imgui_club has such options).
+- ImVector: added resize() variant with initialization value.
+- Misc: Changed the internal name formatting of child windows identifier to use slashes (instead of dots) as separator, more readable.
+- Misc: Fixed compilation with `IMGUI_DISABLE_OBSOLETE_FUNCTIONS` defined.
+- Misc: Marked all format+va_list functions with format attribute so GCC/Clang can warn about misuses.
+- Misc: Fixed compilation on NetBSD due to missing alloca.h (#1319) [@RyuKojiro]
+- Misc: Improved warnings compilation for newer versions of Clang. (#1324) (@waywardmonkeys)
+- Misc: Added `io.WantMoveMouse flags` (from Nav branch) and honored in Examples applications. Currently unused but trying to spread Examples applications code that supports it.
+- Misc: Added `IMGUI_DISABLE_FORMAT_STRING_FUNCTIONS` support in imconfig.h to allow user reimplementing the `ImFormatString()` functions e.g. to use stb_printf(). (#1038)
+- Misc: [Windows] Fixed default Win32 `SetClipboardText()` handler leaving the Win32 clipboard handler unclosed on failure. [@pdoane]
+- Style: Added `ImGuiStyle::ScaleAllSizes(float)` helper to make it easier to have application transition e.g. from low to high DPI with a matching style.
+- Metrics: Draw window bounding boxes when hovering Pos/Size; List all draw layers; Trimming empty commands like Render() does.
+- Examples: OpenGL3: Save and restore sampler state. (#1145) [@nlguillemot]
+- Examples: OpenGL2, OpenGL3: Save and restore polygon mode. (#1307) [@JJscott]
+- Examples: DirectX11: Allow creating device with feature level 10 since we don't really need much for that example. (#1333)
+- Examples: DirectX9/10/12: Using the Win32 SetCapture/ReleaseCapture API to read mouse coordinates when they are out of bounds. (#1375) [@Gargaj, @ocornut]
+- Tools: Fixed binary_to_compressed_c tool to return 0 when successful. (#1350) [@benvanik]
+- Internals: Exposed more helpers and unfinished features in imgui_internal.h. (use at your own risk!).
+- Internals: A bunch of internal refactoring, hopefully haven't broken anything! Merged a bunch of internal changes from the upcoming Navigation branch.
+- Various tweaks, fixes and documentation changes.
+
+Beta Navigation Branch:
+(Lots of work has been done toward merging the Beta Gamepad/Keyboard Navigation branch (#787) in master.)
+(Please note that this branch is always kept up to date with master. If you are using the navigation branch, some of the changes include:)
+- Nav: Added `#define IMGUI_HAS_NAV` in imgui.h to ease sharing code between both branches. (#787)
+- Nav: MainMenuBar now releases focus when user gets out of the menu layer. (#787)
+- Nav: When applying focus to a window with only menus, the menu layer is automatically activated. (#787)
+- Nav: Added `ImGuiNavInput_KeyMenu` (~Alt key) aside from ImGuiNavInput_PadMenu input as it is one differentiator of pad vs keyboard that was detrimental to the keyboard experience. Although isn't officially supported, it makes the current experience better. (#787)
+- Nav: Move requests now wrap vertically inside Menus and Pop-ups. (#787)
+- Nav: Allow to collapse tree nodes with NavLeft and open them with NavRight. (#787, #1079).
+- Nav: It's now possible to navigate sibling of a menu-bar while navigating inside one of their child. If a Left<>Right navigation request fails to find a match we forward the request to the root menu. (#787, #126)
+- Nav: Fixed `SetItemDefaultFocus` from stealing default focus when we are initializing default focus for a menu bar layer. (#787)
+- Nav: Support for fall-back horizontal scrolling with PadLeft/PadRight (nb: fall-back scrolling is only used to navigate windows that have no interactive items). (#787)
+- Nav: Fixed tool-tip from being selectable in the window selection list. (#787)
+- Nav: `CollapsingHeader(bool*)` variant: fixed for `IsItemHovered()` not working properly in the nav branch. (#600, #787)
+- Nav: InputText: Fixed using Up/Down history callback feature when Nav is enabled. (#787)
+- Nav: InputTextMultiline: Fixed navigation/selection. Disabled selecting all when activating a multi-line text editor. (#787)
+- Nav: More consistently drawing a (thin) navigation rectangle hover filled frames such as tree nodes, collapsing header, menus. (#787)
+- Nav: Various internal refactoring.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.51 (2017-08-24)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.51
+
+Breaking Changes:
+
+Work on dear imgui has been gradually resuming. It means that fixes and new features should be tackled at a faster rate than last year. However, in order to move forward with the library and get rid of some cruft, I have taken the liberty to be a little bit more aggressive than usual with API breaking changes. Read the details below and search for those names in your code! In the grand scheme of things, those changes are small and should not affect everyone, but this is technically our most aggressive release so far in term of API breakage. If you want to be extra forward-facing, you can enable `#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS` in your imconfig.h to disable the obsolete names/redirection.
+
+- Renamed `IsItemHoveredRect()` to `IsItemRectHovered()`. Kept inline redirection function (will obsolete).
+- Renamed `IsMouseHoveringWindow()` to `IsWindowRectHovered()` for consistency. Kept inline redirection function (will obsolete).
+- Renamed `IsMouseHoveringAnyWindow()` to `IsAnyWindowHovered()` for consistency. Kept inline redirection function (will obsolete).
+- Renamed `ImGuiCol_Columns***` enums to `ImGuiCol_Separator***`. Kept redirection enums (will obsolete).
+- Renamed `ImGuiSetCond***` types and enums to `ImGuiCond***`. Kept redirection enums (will obsolete).
+- Renamed `GetStyleColName()` to `GetStyleColorName()` for consistency. Unlikely to be used by end-user!
+- Added `PushStyleColor(ImGuiCol idx, ImU32 col)` overload, which _might_ cause an "ambiguous call" compilation error if you are using ImColor() with implicit cast. Cast to ImU32 or ImVec4 explicitly to fix.
+- Marked the weird `IMGUI_ONCE_UPON_A_FRAME` helper macro as obsolete. Prefer using the more explicit `ImGuiOnceUponAFrame`.
+- Changed `ColorEdit4(const char* label, float col[4], bool show_alpha = true)` signature to `ColorEdit4(const char* label, float col[4], ImGuiColorEditFlags flags = 0)`, where flags 0x01 is a safe no-op (hello dodgy backward compatibility!). The new `ColorEdit4`/`ColorPicker4` functions have lots of available flags! Check and run the demo window, under "Color/Picker Widgets", to understand the various new options.
+- Changed signature of `ColorButton(ImVec4 col, bool small_height = false, bool outline_border = true)` to `ColorButton(const char* desc_id, ImVec4 col, ImGuiColorEditFlags flags = 0, ImVec2 size = ImVec2(0,0))`. This function was rarely used and was very dodgy (no explicit ID!).
+- Changed `BeginPopupContextWindow(bool also_over_items=true, const char* str_id=NULL, int mouse_button=1)` signature to `(const char* str_id=NULL, int mouse_button=1, bool also_over_items=true)`. This is perhaps the most aggressive change in this update, but note that the majority of users relied on default parameters completely, so this will affect only a fraction of users of this already rarely used function.
+- Removed `IsPosHoveringAnyWindow()`, which was partly broken and misleading. In the vast majority of cases, people using that function wanted to use `io.WantCaptureMouse` flag. Replaced with IM_ASSERT + comment redirecting user to `io.WantCaptureMouse`. (#1237)
+- Removed the old `ValueColor()` helpers, they are equivalent to calling `Text(label)` + `SameLine()` + `ColorButton()`.
+- Removed `ColorEditMode()` and `ImGuiColorEditMode` type in favor of `ImGuiColorEditFlags` and parameters to the various Color*() functions. The `SetColorEditOptions()` function allows to initialize default but the user can still change them with right-click context menu. Commenting out your old call to `ColorEditMode()` may just be fine!
+
+Other Changes:
+
+- Added flags to `ColorEdit3()`, `ColorEdit4()`. The color edit widget now has a context-menu and access to the color picker. (#346)
+- Added flags to `ColorButton()`. (#346)
+- Added `ColorPicker3()`, `ColorPicker4()`. The API along with those of the updated `ColorEdit4()` was designed so you may use them in various situation and hopefully compose your own picker if required. There are a bunch of available flags, check the Demo window and comment for `ImGuiColorEditFlags_`. Some of the options it supports are: two color picker types (hue bar + sat/val rectangle, hue wheel + rotating sat/val triangle), display as u8 or float, lifting 0.0..1.0 constraints (currently rgba only), context menus, alpha bar, background checkerboard options, preview tooltip, basic revert. For simple use, calling the existing `ColorEdit4()` function as you did before will be enough, as you can now open the color picker from there. (#346) [@r-lyeh, @nem0, @thennequin, @dariomanesku and @ocornut]
+- Added `SetColorEditOptions()` to set default color options (e.g. if you want HSV over RGBA, float over u8, select a default picker mode etc. at startup time without a user intervention. Note that the user can still change options with the context menu unless disabled with `ImGuiColorFlags_NoOptions` or explicitly enforcing a display type/picker mode etc.).
+- Added user-facing `IsPopupOpen()` function. (#891) [@mkeeter]
+- Added `GetColorU32(u32)` variant that perform the style alpha multiply without a floating-point round trip, and helps makes code more consistent when using ImDrawList APIs.
+- Added `PushStyleColor(ImGuiCol idx, ImU32 col)` overload.
+- Added `GetStyleColorVec4(ImGuiCol idx)` which is equivalent to accessing `ImGui::GetStyle().Colors[idx]` (aka return the raw style color without alpha alteration).
+- ImFontAtlas: Added `GlyphRangesBuilder` helper class, which makes it easier to build custom glyph ranges from your app/game localization data, or add into existing glyph ranges.
+- ImFontAtlas: Added `TexGlyphPadding` option. (#1282) [@jadwallis]
+- ImFontAtlas: Made it possible to override size of AddFontDefault() (even if it isn't really recommended!).
+- ImDrawList: Added `GetClipRectMin()`, `GetClipRectMax()` helpers.
+- Fixed Ini saving crash if the ImGuiWindowFlags_NoSavedSettings gets removed from a window after its creation (unlikely!). (#1000)
+- Fixed `PushID()`/`PopID()` from marking parent window as Accessed (which needlessly woke up the root "Debug" window when used outside of a regular window). (#747)
+- Fixed an assert when calling `CloseCurrentPopup()` twice in a row. [@nem0]
+- Window size can be loaded from .ini data even if ImGuiWindowFlags_NoResize flag is set. (#1048, #1056)
+- Columns: Added `SetColumnWidth()`. (#913) [@ggtucker]
+- Columns: Dragging a column preserve its width by default. (#913) [@ggtucker]
+- Columns: Fixed first column appearing wider than others. (#1266)
+- Columns: Fixed allocating space on the right-most side with the assumption of a vertical scrollbar. The space is only allocated when needed. (#125, #913, #893, #1138)
+- Columns: Fixed the right-most column from registering its content width to the parent window, which led to various issues when using auto-resizing window or e.g. horizontal scrolling. (#519, #125, #913)
+- Columns: Refactored some of the columns code internally toward a better API (not yet exposed) + minor optimizations. (#913) [@ggtucker, @ocornut]
+- Popups: Most pop-ups windows can be moved by the user after appearing (if they don't have explicit positions provided by caller, or e.g. sub-menu pop-up). The previous restriction was totally arbitrary. (#1252)
+- Tooltip: `SetTooltip()` is expanded immediately into a window, honoring current font / styling setting. Add internal mechanism to override tooltips. (#862)
+- PlotHistogram: bars are drawn based on zero-line, so negative values are going under. (#828)
+- Scrolling: Fixed return values of `GetScrollMaxX()`, `GetScrollMaxY()` when both scrollbars were enabled. Tweak demo to display more data. (#1271) [@degracode]
+- Scrolling: Fixes for Vertical Scrollbar not automatically getting enabled if enabled Horizontal Scrollbar straddle the vertical limit. (#1271, #246)
+- Scrolling: `SetScrollHere()`, `SetScrollFromPosY()`: Fixed Y scroll aiming when Horizontal Scrollbar is enabled. (#665).
+- [Windows] Clipboard: Fixed not closing Win32 clipboard on early open failure path. (#1264)
+- Removed an unnecessary dependency on int64_t which failed on some older compilers.
+- Demo: Rearranged everything under Widgets in a more consistent way.
+- Demo: Columns: Added Horizontal Scrolling demo. Tweaked another Columns demo. (#519, #125, #913)
+- Examples: OpenGL: Various makefiles for MINGW, Linux. (#1209, #1229, #1209) [@fr500, @acda]
+- Examples: Enabled vsync by default in example applications, so it doesn't confuse people that the sample run at 2000+ fps and waste an entire CPU. (#1213, #1151).
+- Various other small fixes, tweaks, comments, optimizations.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.50 (2017-06-02)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.50
+
+Breaking Changes:
+
+- Added a void* user_data parameter to Clipboard function handlers. (#875)
+- SameLine(x) with x>0.0f is now relative to left of column/group if any, and not always to left of window. This was sort of always the intent and hopefully breakage should be minimal.
+- Renamed ImDrawList::PathFill() - rarely used directly - to ImDrawList::PathFillConvex() for clarity and consistency.
+- Removed ImFontConfig::MergeGlyphCenterV in favor of a more multipurpose ImFontConfig::GlyphOffset.
+- Style: style.WindowTitleAlign is now a ImVec2 (ImGuiAlign enum was removed). set to (0.5f,0.5f) for horizontal+vertical centering, (0.0f,0.0f) for upper-left, etc.
+- BeginChild(const char*) now applies the stack id to the provided label, consistently with other functions as it should always have been. It shouldn't affect you unless (extremely unlikely) you were appending multiple times to a same child from different locations of the stack id. If that's the case, generate an id with GetId() and use it instead of passing string to BeginChild().
+
+Other Changes:
+
+- InputText(): Added support for CTRL+Backspace (delete word).
+- InputText(): OSX uses Super+Arrows for home/end. Add Shortcut+Backspace support. (#650) [@michaelbartnett]
+- InputText(): Got rid of individual OSX-specific options in ImGuiIO, added a single io.OSXBehaviors flag. (#473, #650)
+- InputText(): Fixed pressing home key on last character when it isn't a trailing \n (#588, #815)
+- InputText(): Fixed state corruption/crash bug in stb_textedit.h redo logic when exhausting undo/redo char buffer. (#715. #681)
+- InputTextMultiline(): Fixed CTRL+DownArrow moving scrolling out of bounds.
+- InputTextMultiline(): Scrollbar fix for when input and latched internal buffers differs in a way that affects vertical scrollbar existence. (#725)
+- ImFormatString(): Fixed an overflow handling bug with implementation of vsnprintf() that do not return -1. (#793)
+- BeginChild(const char*) now applies stack id to provided label, consistent with other widgets. (#894, #713)
+- SameLine() with explicit X position is relative to left of group/columns. (ref #746, #125, #630)
+- SliderInt(), SliderFloat() supports reverse direction (where v_min > v_max). (#854)
+- SliderInt(), SliderFloat() better support for when v_min==v_max. (#919)
+- SliderInt(), SliderFloat() enforces writing back value when interacting, to be consistent with other widgets. (#919)
+- SliderInt, SliderFloat(): Fixed edge case where style.GrabMinSize being bigger than slider width can lead to a division by zero. (#919)
+- Added IsRectVisible() variation with explicit start-end positions. (#768) [@thedmd]
+- Fixed TextUnformatted() clipping bug in the large-text path when horizontal scroll has been applied. (#692, #246)
+- Fixed minor text clipping issue in window title when using font straying above usual line. (#699)
+- Fixed SetCursorScreenPos() fixed not adjusting CursorMaxPos as well.
+- Fixed scrolling offset when using SetScrollY(), SetScrollFromPosY(), SetScrollHere() with menu bar.
+- Fixed using IsItemActive() after EndGroup() or any widget using groups. (#840, #479)
+- Fixed IsItemActive() lagging by one frame on initial widget activation. (#840)
+- Fixed Separator() zero-height bounding box resulting in clipping when laying exactly on top line of clipping rectangle (#860)
+- Fixed PlotLines() PlotHistogram() calling with values_count == 0.
+- Fixed clicking on a window's void while staying still overzealously marking .ini settings as dirty. (#923)
+- Fixed assert triggering when a window has zero rendering but has a callback. (#810)
+- Scrollbar: Fixed rendering when sizes are negative to reduce glitches (which can happen with certain style settings and zero WindowMinSize).
+- EndGroup(): Made IsItemHovered() work when an item was activated within the group. (#849)
+- BulletText(): Fixed stopping to display formatted string after the '##' mark.
+- Closing the focused window restore focus to the first active root window in descending z-order .(part of #727)
+- Word-wrapping: Fixed a bug where we never wrapped after a 1 character word. [@sronsse]
+- Word-wrapping: Fixed TextWrapped() overriding wrap position if one is already set. (#690)
+- Word-wrapping: Fixed incorrect testing for negative wrap coordinates, they are perfectly legal. (#706)
+- ImGuiListClipper: Fixed automatic-height calc path dumbly having user display element 0 twice. (#661, #716)
+- ImGuiListClipper: Fix to behave within column. (#661, #662, #716)
+- ImDrawList: Renamed ImDrawList::PathFill() to ImDrawList::PathFillConvex() for clarity. (BREAKING API)
+- Columns: End() avoid calling Columns(1) if no columns set is open, not sure why it wasn't the case already (pros: faster, cons: exercise less code).
+- ColorButton(): Fix ColorButton showing wrong hex value for alpha. (#1068) [@codecat]
+- ColorEdit4(): better preserve inputting value out of 0..255 range, display then clamped in Hexadecimal form.
+- Shutdown() clear out some remaining pointers for sanity. (#836)
+- Added IMGUI_USE_BGRA_PACKED_COLOR option in imconfig.h (#767, #844) [@thedmd]
+- Style: Removed the inconsistent shadow under RenderCollapseTriangle() (~#707)
+- Style: Added ButtonTextAlign, ImGuiStyleVar_ButtonTextAlign. (#842)
+- ImFont: Allowing to use up to 0xFFFE glyphs in same font (increased from previous 0x8000).
+- ImFont: Added GetGlyphRangesThai() helper. [@nProtect]
+- ImFont: CalcWordWrapPositionA() fixed font scaling with fallback character.
+- ImFont: Calculate and store the approximate texture surface to get an idea of how costly each source font is.
+- ImFontConfig: Added GlyphOffset to explicitly offset glyphs at font build time, useful for merged fonts. Removed MergeGlyphCenterV. (BREAKING API)
+- Clarified asserts in CheckStacksSize() when there is a stack mismatch.
+- Context: Support for #define-ing GImGui and IMGUI_SET_CURRENT_CONTEXT_FUNC to enable custom thread-based hackery (#586)
+- Updated stb_truetype.h to 1.14 (added OTF support, removed warnings). (#883, #976)
+- Updated stb_rect_pack.h to 0.10 (removed warnings). (#883)
+- Added ImGuiMouseCursor_None enum value for convenient usage by app/binding.
+- Clipboard: Added a void* user_data parameter to Clipboard function handlers. (#875) (BREAKING API)
+- Internals: Refactor internal text alignment options to use ImVec2, removed ImGuiAlign. (#842, #222)
+- Internals: Renamed ImLoadFileToMemory to ImFileLoadToMemory to be consistent with ImFileOpen + fix mismatching .h name. (#917)
+- OS/Windows: Fixed Windows default clipboard handler leaving its buffer unfreed on application's exit. (#714)
+- OS/Windows: No default IME handler when compiling for Windows using GCC. (#738)
+- OS/Windows: Now using _wfopen() instead of fopen() to allow passing in paths/filenames with UTF-8 characters. (#917)
+- Tools: binary_to_compressed_c: Avoid ?? trigraphs sequences in string outputs which break some older compilers. (#839)
+- Demo: Added an extra 3-way columns demo.
+- Demo: ShowStyleEditor: show font character map / grid in more details.
+- Demo: Console: Fixed a completion bug when multiple candidates are equals and match until the end.
+- Demo: Fixed 1-byte off overflow in the ShowStyleEditor() combo usage. (#783) [@bear24rw]
+- Examples: Accessing ImVector fields directly, feel less stl-ey. (#810)
+- Examples: OpenGL*: Saving/restoring existing scissor rectangle for completeness. (#807)
+- Examples: OpenGL*: Saving/restoring active texture number (the value modified by glActiveTexture). (#1087, #1088, #1116)
+- Examples: OpenGL*: Saving/restoring separate color/alpha blend functions correctly. (#1120) [@greggman]
+- Examples: OpenGL2: Uploading font texture as RGBA32 to increase compatibility with users shaders for beginners. (#824)
+- Examples: Vulkan: Countless fixes and improvements. (#785, #804, #910, #1017, #1039, #1041, #1042, #1043, #1080) [@martty, @Loftilus, @ParticlePeter, @SaschaWillems]
+- Examples: DirectX9/10/10: Only call SetCursor(NULL) is io.MouseDrawCursor is set. (#585, #909)
+- Examples: DirectX9: Explicitly setting viewport to match that other examples are doing. (#937)
+- Examples: GLFW+OpenGL3: Fixed Shutdown() calling GL functions with NULL parameters if NewFrame was never called. (#800)
+- Examples: GLFW+OpenGL2: Renaming opengl_example/ to opengl2_example/ for clarity.
+- Examples: SDL+OpenGL: explicitly setting GL_UNPACK_ROW_LENGTH to reduce issues because SDL changes it. (#752)
+- Examples: SDL2: Added build .bat files for Win32.
+- Added various links to language/engine bindings.
+- Various other minor fixes, tweaks, comments, optimizations.
+
+
+-----------------------------------------------------------------------
+ VERSION 1.49 (2016-05-09)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.49
+
+Breaking Changes:
+
+- Renamed `SetNextTreeNodeOpened()` to `SetNextTreeNodeOpen()` for consistency, no redirection.
+- Removed confusing set of `GetInternalState()`, `GetInternalStateSize()`, `SetInternalState()` functions. Now using `CreateContext()`, `DestroyContext()`, `GetCurrentContext()`, `SetCurrentContext()`. If you were using multiple contexts the change should be obvious and trivial.
+- Obsoleted old signature of `CollapsingHeader(const char* label, const char* str_id = NULL, bool display_frame = true, bool default_open = false)`, as extra parameters were badly designed and rarely used. Most uses were using 1 parameter and shouldn't affect you. You can replace the "default_open = true" flag in new API with `CollapsingHeader(label, ImGuiTreeNodeFlags_DefaultOpen)`.
+- Changed `ImDrawList::PushClipRect(ImVec4 rect)` to `ImDraw::PushClipRect(ImVec2 min,ImVec2 max,bool intersect_with_current_clip_rect=false)`. Note that higher-level `ImGui::PushClipRect()` is preferable because it will clip at logic/widget level, whereas `ImDrawList::PushClipRect()` only affect your renderer.
+- Title bar (using ImGuiCol_TitleBg/ImGuiCol_TitleBgActive colors) isn't rendered over a window background (ImGuiCol_WindowBg color) anymore (see #655). If your TitleBg/TitleBgActive alpha was 1.0f or you are using the default theme it will not affect you. However if your TitleBg/TitleBgActive alpha was <1.0f you need to tweak your custom theme to readjust for the fact that we don't draw a WindowBg background behind the title bar.
+ This helper function will convert an old TitleBg/TitleBgActive color into a new one with the same visual output, given the OLD color and the OLD WindowBg color. (Or If this is confusing, just pick the RGB value from title bar from an old screenshot and apply this as TitleBg/TitleBgActive. Or you may just create TitleBgActive from a tweaked TitleBg color.)
+
+ ImVec4 ConvertTitleBgCol(const ImVec4& win_bg_col, const ImVec4& title_bg_col)
+ {
+ float new_a = 1.0f - ((1.0f - win_bg_col.w) * (1.0f - title_bg_col.w));
+ float k = title_bg_col.w / new_a;
+ return ImVec4((win_bg_col.x * win_bg_col.w + title_bg_col.x) * k, (win_bg_col.y * win_bg_col.w + title_bg_col.y) * k, (win_bg_col.z * win_bg_col.w + title_bg_col.z) * k, new_a);
+ }
+
+Other changes:
+
+- New version of ImGuiListClipper helper calculates item height automatically. See comments and demo code. (#662, #661, #660)
+- Added SetNextWindowSizeConstraints() to enable basic min/max and programmatic size constraints on window. Added demo. (#668)
+- Added PushClipRect()/PopClipRect() (previously part of imgui_internal.h). Changed ImDrawList::PushClipRect() prototype. (#610)
+- Added IsRootWindowOrAnyChildHovered() helper. (#615)
+- Added TreeNodeEx() functions. (#581, #600, #190)
+- Added ImGuiTreeNodeFlags_Selected flag to display TreeNode as "selected". (#581, #190)
+- Added ImGuiTreeNodeFlags_AllowOverlapMode flag. (#600)
+- Added ImGuiTreeNodeFlags_NoTreePushOnOpen flag (#590).
+- Added ImGuiTreeNodeFlags_NoAutoOpenOnLog flag (previously private).
+- Added ImGuiTreeNodeFlags_DefaultOpen flag (previously private).
+- Added ImGuiTreeNodeFlags_OpenOnDoubleClick flag.
+- Added ImGuiTreeNodeFlags_OpenOnArrow flag.
+- Added ImGuiTreeNodeFlags_Leaf flag, always opened, no arrow, for convenience. For simple use case prefer using TreeAdvanceToLabelPos()+Text().
+- Added ImGuiTreeNodeFlags_Bullet flag, to add a bullet to Leaf node or replace Arrow with a bullet.
+- Added TreeAdvanceToLabelPos(), GetTreeNodeToLabelSpacing() helpers. (#581, #324)
+- Added CreateContext()/DestroyContext()/GetCurrentContext()/SetCurrentContext(). Obsoleted nearly identical GetInternalState()/SetInternalState() functions. (#586, #269)
+- Added NewLine() to undo a SameLine() and as a shy reminder that horizontal layout support hasn't been implemented yet.
+- Added IsItemClicked() helper. (#581)
+- Added CollapsingHeader() variant with close button. (#600)
+- Fixed MenuBar missing lower border when borders are enabled.
+- InputText(): Fixed clipping of cursor rendering in case it gets out of the box (which can be forced w/ ImGuiInputTextFlags_NoHorizontalScroll. (#601)
+- Style: Changed default IndentSpacing from 22 to 21. (#581, #324)
+- Style: Fixed TitleBg/TitleBgActive color being rendered above WindowBg color, which was inconsistent and causing visual artifact. (#655)
+ This broke the meaning of TitleBg and TitleBgActive. Only affect values where Alpha<1.0f. Fixed default theme. Read comments in "API BREAKING CHANGES" section to convert.
+- Relative rendering of order of Child windows creation is preserved, to allow more control with overlapping children. (#595)
+- Fixed GetWindowContentRegionMax() being off by ScrollbarSize amount when explicit SizeContents is set.
+- Indent(), Unindent(): optional non-default indenting width. (#324, #581)
+- Bullet(), BulletText(): Slightly bigger. Less polygons.
+- ButtonBehavior(): fixed subtle old bug when a repeating button would also return true on mouse release (barely noticeable unless RepeatRate is set to be very slow). (#656)
+- BeginMenu(): a menu that becomes disabled while open gets closed down, facilitate user's code. (#126)
+- BeginGroup(): fixed using within Columns set. (#630)
+- Fixed a lag in reading the currently hovered window when dragging a window. (#635)
+- Obsoleted 4 parameters version of CollapsingHeader(). Refactored code into TreeNodeBehavior. (#600, #579)
+- Scrollbar: minor fix for top-right rounding of scrollbar background when window has menu bar but no title bar.
+- MenuItem(): the check mark renders in disabled color when menu item is disabled.
+- Fixed clipping rectangle floating point representation to ensure renderer-side float point operations yield correct results in typical DirectX/GL settings. (#582, 597)
+- Fixed GetFrontMostModalRootWindow(), fixing missing fade-out when a combo pop was used stacked over a modal window. (#604)
+- ImDrawList: Added AddQuad(), AddQuadFilled() helpers.
+- ImDrawList: AddText() refactor, moving some code to ImFont, reserving less unused vertices when large vertical clipping occurs.
+- ImFont: Added RenderChar() helper.
+- ImFont: Added AddRemapChar() helper. (#609)
+- ImFontConfig: Clarified persistence requirement of GlyphRanges array. (#651)
+- ImGuiStorage: Added bool helper functions for completeness.
+- AddFontFromMemoryCompressedTTF(): Fix ImFontConfig propagation. (#587)
+- Renamed majority of use of the word "opened" to "open" for clarity. Renamed SetNextTreeNodeOpened() to SetNextTreeNodeOpen(). (#625, #579)
+- Examples: OpenGL3: Saving/restoring glActiveTexture() state. (#602)
+- Examples: DirectX9: save/restore all device state.
+- Examples: DirectX9: Removed dependency on d3dx9.h, d3dx9.lib, dxguid.lib so it can be used in a DirectXMath.h only environment. (#611)
+- Examples: DirectX10/X11: Apply depth-stencil state (no use of depth buffer). (#640, #636)
+- Examples: DirectX11/X11: Added comments on removing dependency on D3DCompiler. (#638)
+- Examples: SDL: Initialize video+timer subsystem only.
+- Examples: Apple/iOS: lowered XCode project deployment target from 10.7 to 10.11. (#598, #575)
+
+
+-----------------------------------------------------------------------
+ VERSION 1.48 (2016-04-09)
+-----------------------------------------------------------------------
+
+Decorated log: https://github.com/ocornut/imgui/releases/tag/v1.48
+
+Breaking Changes:
+
+- Consistently honoring exact width passed to PushItemWidth() (when positive), previously it would add extra FramePadding.x*2 over that width. Some hand-tuned layout may be affected slightly. (#346)
+- Style: removed `style.WindowFillAlphaDefault` which was confusing and redundant, baked alpha into `ImGuiCol_WindowBg` color. If you had a custom WindowBg color but didn't change WindowFillAlphaDefault, multiply WindowBg alpha component by 0.7. Renamed `ImGuiCol_TooltipBg` to `ImGuiCol_PopupBG`, applies to other types of pop-ups. `bg_alpha` parameter of 5-parameters version of Begin() is an override. (#337)
+- InputText(): Added BufTextLen field in ImGuiTextEditCallbackData. Requesting user to update it if the buffer is modified in the callback. Added a temporary length-check assert to minimize panic for the 3 people using the callback. (#541)
+- Renamed GetWindowFont() to GetFont(), GetWindowFontSize() to GetFontSize(). Kept inline redirection function (will obsolete). (#340)
+
+Other Changes:
+
+- Consistently honoring exact width passed to PushItemWidth(), previously it would add extra FramePadding.x*2 over that width. Some hand-tuned layout may be affected slightly. (#346)
+- Fixed clipping of child windows within parent not taking account of child outer clipping boundaries (including scrollbar, etc.). (#506)
+- TextUnformatted(): Fixed rare crash bug with large blurb of text (2k+) not finished with a '\n' and fully above the clipping Y line. (#535)
+- IO: Added 'KeySuper' field to hold CMD keyboard modifiers for OS X. Updated all examples accordingly. (#473)
+- Added ImGuiWindowFlags_ForceVerticalScrollbar, ImGuiWindowFlags_ForceHorizontalScrollbar flags. (#476)
+- Added IM_COL32 macros to generate a U32 packed color, convenient for direct use of ImDrawList api. (#346)
+- Added GetFontTexUvWhitePixel() helper, convenient for direct use of ImDrawList api.
+- Selectable(): Added ImGuiSelectableFlags_AllowDoubleClick flag to allow user reacting on double-click. (@zapolnov) (#516)
+- Begin(): made the close button explicitly set the boolean to false instead of toggling it. (#499)
+- BeginChild()/EndChild(): fixed incorrect layout to allow widgets submitted after an auto-fitted child window. (#540)
+- BeginChild(): Added ImGuiWindowFlags_AlwaysUseWindowPadding flag to ensure non-bordered child window uses window padding. (#462)
+- Fixed InputTextMultiLine(), ListBox(), BeginChildFrame(), ProgressBar(): outer frame not honoring bordering. (#462, #503)
+- Fixed Image(), ImageButtion() rendering a rectangle 1 px too large on each axis. (#457)
+- SetItemAllowOverlap(): Promoted from imgui_internal.h to public imgui.h api. (#517)
+- Combo(): Right-most button stays highlighted when pop-up is open.
+- Combo(): Display pop-up above if there's isn't enough space below / or select largest side. (#505)
+- DragFloat(), SliderFloat(), InputFloat(): fixed cases of erroneously returning true repeatedly after a text input modification (e.g. "0.0" --> "0.000" would keep returning true). (#564)
+- DragFloat(): Always apply value when mouse is held/widget active, so that an always-reseting variable (e.g. non saved local) can be passed.
+- InputText(): OS X friendly behaviors: Word movement uses ALT key; Shortcuts uses CMD key; Double-clicking text select a single word; Jumping to next word sets cursor to end of current word instead of beginning of current word. (@zhiayang), (#473)
+- InputText(): Added BufTextLen in ImGuiTextEditCallbackData. Requesting user to maintain it if buffer is modified. Zero-ing structure properly before use. (#541)
+- CheckboxFlags(): Added support for testing/setting multiple flags at the same time. (@DMartinek) (#555)
+- TreeNode(), CollapsingHeader() fixed not being able to use "##" sequence in a formatted label.
+- ColorEdit4(): Empty label doesn't add InnerSpacing.x, matching behavior of other widgets. (#346)
+- ColorEdit4(): Removed unnecessary calls to scanf() when idle in hexadecimal edit mode.
+- BeginPopupContextItem(), BeginPopupContextWindow(): added early out optimization.
+- CaptureKeyboardFromApp() / CaptureMouseFromApp(): added argument to allow clearing the capture flag. (#533)
+- ImDrawList: Fixed index-overflow check broken by AddText() casting current index back to ImDrawIdx. (#514)
+- ImDrawList: Fixed incorrect removal of trailing draw command if it is a callback command.
+- ImDrawList: Allow windows with only a callback only to be functional. (#524)
+- ImDrawList: Fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis. (#457)
+- ImDrawList: Fixed ImDrawList::AddCircle() to fit precisely within bounding box like AddCircleFilled() and AddRectFilled(). (#457)
+- ImDrawList: AddCircle(), AddRect() takes optional thickness parameter.
+- ImDrawList: Added AddTriangle().
+- ImDrawList: Added PrimQuadUV() helper to ease custom rendering of textured quads (require primitive reserve).
+- ImDrawList: Allow AddText(ImFont\* font, float font_size, ...) variant to take NULL/0.0f as default.
+- ImFontAtlas: heuristic increase default texture width up for large number of glyphs. (#491)
+- ImTextBuffer: Fixed empty() helper which was utterly broken.
+- Metrics: allow to inspect individual triangles in draw calls.
+- Demo: added more draw primitives in the Custom Rendering example. (#457)
+- Demo: extra comments and example for PushItemWidth(-1) patterns.
+- Demo: InputText password demo filters out blanks. (#515)
+- Demo: Fixed malloc/free mismatch and leak when destructing demo console, if it has been used. (@fungos) (#536)
+- Demo: plot code doesn't use ImVector to avoid heap allocation and be more friendly to custom allocator users. (#538)
+- Fixed compilation on DragonFly BSD (@mneumann) (#563)
+- Examples: Vulkan: Added a Vulkan example (@Loftilus) (#549)
+- Examples: DX10, DX11: Saving/restoring most device state so dropping render function in your codebase shouldn't have DX device side-effects. (#570)
+- Examples: DX10, DX11: Fixed ImGui_ImplDX??_NewFrame() from recreating device objects if render isn't called (g_pVB not set).
+- Examples: OpenGL3: Fix BindVertexArray/BindBuffer order. (@nlguillemot) (#527)
+- Examples: OpenGL: skip rendering and calling glViewport() if we have zero-fixed buffer. (#486)
+- Examples: SDL2+OpenGL3: Fix context creation options. Made ImGui_ImplSdlGL3_NewFrame() signature match GL2 one. (#468, #463)
+- Examples: SDL2+OpenGL2/3: Fix for high-dpi displays. (@nickgravelyn)
+- Various extra comments and clarification in the code.
+- Various other fixes and optimizations.
+
+-----------------------------------------------------------------------
+
+For older version, see https://github.com/ocornut/imgui/releases
+
diff --git a/3rdparty/imgui/docs/README.md b/3rdparty/imgui/docs/README.md
new file mode 100644
index 00000000..74ec20cd
--- /dev/null
+++ b/3rdparty/imgui/docs/README.md
@@ -0,0 +1,335 @@
+dear imgui,
+=====
+[](https://travis-ci.org/ocornut/imgui)
+[](https://scan.coverity.com/projects/4720)
+
+_(This library is free but needs your support to sustain its development. There are many desirable features and maintenance ahead. If you are an individual using dear imgui, please consider donating via Patreon or PayPal. If your company is using dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development). I can invoice for technical support, custom development etc. Email: omarcornut at gmail)._
+
+Monthly donations via Patreon:
+
[](http://www.patreon.com/imgui)
+
+One-off donations via PayPal:
+
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5Q73FPZ9C526U)
+
+Dear ImGui is a bloat-free graphical user interface library for C++. It outputs optimized vertex buffers that you can render anytime in your 3D-pipeline enabled application. It is fast, portable, renderer agnostic and self-contained (no external dependencies).
+
+Dear ImGui is designed to enable fast iterations and to empower programmers to create content creation tools and visualization / debug tools (as opposed to UI for the average end-user). It favors simplicity and productivity toward this goal, and lacks certain features normally found in more high-level libraries.
+
+Dear ImGui is particularly suited to integration in games engine (for tooling), real-time 3D applications, fullscreen applications, embedded applications, or any applications on consoles platforms where operating system features are non-standard.
+
+Dear ImGui is self-contained within a few files that you can easily copy and compile into your application/engine:
+- imgui.cpp
+- imgui.h
+- imgui_demo.cpp
+- imgui_draw.cpp
+- imgui_widgets.cpp
+- imgui_internal.h
+- imconfig.h (empty by default, user-editable)
+- imstb_rectpack.h
+- imstb_textedit.h
+- imstb_truetype.h
+
+No specific build process is required. You can add the .cpp files to your project or #include them from an existing file.
+
+### Usage
+
+Your code passes mouse/keyboard/gamepad inputs and settings to Dear ImGui (see example applications for more details). After Dear ImGui is setup, you can use it from \_anywhere\_ in your program loop:
+
+Code:
+```cpp
+ImGui::Text("Hello, world %d", 123);
+if (ImGui::Button("Save"))
+{
+ // do stuff
+}
+ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
+ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
+```
+Result:
+

+
_(settings: Dark style (left), Light style (right) / Font: Roboto-Medium, 16px / Rounding: 5)_
+
+Code:
+```cpp
+// Create a window called "My First Tool", with a menu bar.
+ImGui::Begin("My First Tool", &my_tool_active, ImGuiWindowFlags_MenuBar);
+if (ImGui::BeginMenuBar())
+{
+ if (ImGui::BeginMenu("File"))
+ {
+ if (ImGui::MenuItem("Open..", "Ctrl+O")) { /* Do stuff */ }
+ if (ImGui::MenuItem("Save", "Ctrl+S")) { /* Do stuff */ }
+ if (ImGui::MenuItem("Close", "Ctrl+W")) { my_tool_active = false; }
+ ImGui::EndMenu();
+ }
+ ImGui::EndMenuBar();
+}
+
+// Edit a color (stored as ~4 floats)
+ImGui::ColorEdit4("Color", my_color);
+
+// Plot some values
+const float my_values[] = { 0.2f, 0.1f, 1.0f, 0.5f, 0.9f, 2.2f };
+ImGui::PlotLines("Frame Times", my_values, IM_ARRAYSIZE(my_values));
+
+// Display contents in a scrolling region
+ImGui::TextColored(ImVec4(1,1,0,1), "Important Stuff");
+ImGui::BeginChild("Scrolling");
+for (int n = 0; n < 50; n++)
+ ImGui::Text("%04d: Some text", n);
+ImGui::EndChild();
+ImGui::End();
+```
+Result:
+

+
+### How it works
+
+Check out the References section if you want to understand the core principles behind the IMGUI paradigm. An IMGUI tries to minimize state duplication, state synchronization and state storage from the user's point of view. It is less error prone (less code and less bugs) than traditional retained-mode interfaces, and lends itself to create dynamic user interfaces.
+
+Dear ImGui outputs vertex buffers and command lists that you can easily render in your application. The number of draw calls and state changes is typically very small. Because it doesn't know or touch graphics state directly, you can call ImGui commands anywhere in your code (e.g. in the middle of a running algorithm, or in the middle of your own rendering process). Refer to the sample applications in the examples/ folder for instructions on how to integrate dear imgui with your existing codebase.
+
+_A common misunderstanding is to mistake immediate mode gui for immediate mode rendering, which usually implies hammering your driver/GPU with a bunch of inefficient draw calls and state changes as the gui functions are called. This is NOT what Dear ImGui does. Dear ImGui outputs vertex buffers and a small list of draw calls batches. It never touches your GPU directly. The draw call batches are decently optimal and you can render them later, in your app or even remotely._
+
+Dear ImGui allows you create elaborate tools as well as very short-lived ones. On the extreme side of short-liveness: using the Edit&Continue (hot code reload) feature of modern compilers you can add a few widgets to tweaks variables while your application is running, and remove the code a minute later! Dear ImGui is not just for tweaking values. You can use it to trace a running algorithm by just emitting text commands. You can use it along with your own reflection data to browse your dataset live. You can use it to expose the internals of a subsystem in your engine, to create a logger, an inspection tool, a profiler, a debugger, an entire game making editor/framework, etc.
+
+Demo Binaries
+-------------
+
+You should be able to build the examples from sources (tested on Windows/Mac/Linux). If you don't, let me know! If you want to have a quick look at some Dear ImGui features, you can download Windows binaries of the demo app here:
+- [imgui-demo-binaries-20181008.zip](http://www.miracleworld.net/imgui/binaries/imgui-demo-binaries-20181008.zip) (Windows binaries, Dear ImGui 1.66 WIP built 2018/10/08, master branch, 5 executables)
+
+The demo applications are unfortunately not yet DPI aware so expect some blurriness on a 4K screen. For DPI awareness you can load/reload your font at different scale, and scale your Style with `style.ScaleAllSizes()`.
+
+Bindings
+--------
+
+Integrating Dear ImGui within your custom engine is a matter of 1) wiring mouse/keyboard/gamepad inputs 2) uploading one texture to your GPU/render engine 3) providing a render function that can bind textures and render textured triangles. The [examples/](https://github.com/ocornut/imgui/tree/master/examples) folder is populated with applications doing just that. If you are an experienced programmer and at ease with those concepts, it should take you less than an hour to integrate Dear ImGui in your custom engine, but make sure to spend time reading the FAQ, the comments and other documentation!
+
+_NB: those third-party bindings may be more or less maintained, more or less close to the original API (as people who create language bindings sometimes haven't used the C++ API themselves.. for the good reason that they aren't C++ users). Dear ImGui was designed with C++ in mind and some of the subtleties may be lost in translation with other languages. If your language supports it, I would suggest replicating the function overloading and default parameters used in the original, else the API may be harder to use. In doubt, please check the original C++ version first!_
+
+Languages: (third-party bindings)
+- C: [cimgui](https://github.com/cimgui/cimgui) (new 2018 auto-generated version!)
+- C#/.Net: [ImGui.NET](https://github.com/mellinoe/ImGui.NET)
+- ChaiScript: [imgui-chaiscript](https://github.com/JuJuBoSc/imgui-chaiscript)
+- D: [DerelictImgui](https://github.com/Extrawurst/DerelictImgui)
+- Go: [imgui-go](https://github.com/inkyblackness/imgui-go) or [go-imgui](https://github.com/Armored-Dragon/go-imgui)
+- Haxe/hxcpp: [linc_imgui](https://github.com/Aidan63/linc_imgui)
+- Java: [jimgui](https://github.com/ice1000/jimgui)
+- JavaScript: [imgui-js](https://github.com/flyover/imgui-js)
+- Lua: [LuaJIT-ImGui](https://github.com/sonoro1234/LuaJIT-ImGui), [imgui_lua_bindings](https://github.com/patrickriordan/imgui_lua_bindings) or [lua-ffi-bindings](https://github.com/thenumbernine/lua-ffi-bindings)
+- Odin: [odin-dear_imgui](https://github.com/ThisDrunkDane/odin-dear_imgui)
+- Pascal: [imgui-pas](https://github.com/dpethes/imgui-pas)
+- PureBasic: [pb-cimgui](https://github.com/hippyau/pb-cimgui)
+- Python [CyImGui](https://github.com/chromy/cyimgui) or [pyimgui](https://github.com/swistakm/pyimgui)
+- Rust: [imgui-rs](https://github.com/Gekkio/imgui-rs)
+- Swift [swift-imgui](https://github.com/mnmly/Swift-imgui)
+
+Frameworks:
+- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, Metal, OpenGL2, OpenGL3+/ES2/ES3, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Platform: GLFW, SDL, Win32, OSX, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Framework: Allegro 5, Marmalade: [examples/](https://github.com/ocornut/imgui/tree/master/examples)
+- Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336)
+- Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421)
+- Unmerged PR: ORX: [#1843](https://github.com/ocornut/imgui/pull/1843)
+- Cinder: [Cinder-ImGui](https://github.com/simongeilfus/Cinder-ImGui)
+- Cocos2d-x: [imguix](https://github.com/c0i/imguix), [#551](https://github.com/ocornut/imgui/issues/551)
+- Flexium: [FlexGUI](https://github.com/DXsmiley/FlexGUI)
+- GML/GameMakerStudio2: [ImGuiGML](https://marketplace.yoyogames.com/assets/6221/imguigml)
+- Irrlicht: [IrrIMGUI](https://github.com/ZahlGraf/IrrIMGUI)
+- Ogre: [ogreimgui](https://bitbucket.org/LMCrashy/ogreimgui/src)
+- OpenFrameworks: [ofxImGui](https://github.com/jvcleave/ofxImGui)
+- OpenSceneGraph/OSG: [gist](https://gist.github.com/fulezi/d2442ca7626bf270226014501357042c)
+- LÖVE+Lua: [love-imgui](https://github.com/slages/love-imgui)
+- Magnum: [magnum-imgui](https://github.com/lecopivo/magnum-imgui), [MagnumImguiPort](https://github.com/lecopivo/MagnumImguiPort)
+- NanoRT: [syoyo/imgui](https://github.com/syoyo/imgui/tree/nanort)
+- Qt3d: [imgui-qt3d](https://github.com/alpqr/imgui-qt3d), QOpenGLWindow [qtimgui](https://github.com/ocornut/imgui/issues/1910)
+- SFML: [imgui-sfml](https://github.com/EliasD/imgui-sfml)
+- Software renderer: [imgui_software_renderer](https://github.com/emilk/imgui_software_renderer)
+- Unreal Engine 4: [segross/UnrealImGui](https://github.com/segross/UnrealImGui) or [sronsse/UnrealEngine_ImGui](https://github.com/sronsse/UnrealEngine_ImGui)
+
+For other bindings: see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings/). Also see [Wiki](https://github.com/ocornut/imgui/wiki) for more links and ideas.
+
+Roadmap
+-------
+Some of the goals for 2018-2019 are:
+- Finish work on gamepad/keyboard controls. (see [#787](https://github.com/ocornut/imgui/issues/787))
+- Finish work on docking, tabs. (see [#2109](https://github.com/ocornut/imgui/issues/2109))
+- Finish work on viewports and multiple OS windows management. (see [#1542](https://github.com/ocornut/imgui/issues/1542))
+- Make Columns better. (they are currently pretty terrible!)
+- Make the examples look better, improve styles, improve font support, make the examples hi-DPI aware.
+
+Gallery
+-------
+User screenshots:
+
[Gallery Part 1](https://github.com/ocornut/imgui/issues/123) (Feb 2015 to Feb 2016)
+
[Gallery Part 2](https://github.com/ocornut/imgui/issues/539) (Feb 2016 to Aug 2016)
+
[Gallery Part 3](https://github.com/ocornut/imgui/issues/772) (Aug 2016 to Jan 2017)
+
[Gallery Part 4](https://github.com/ocornut/imgui/issues/973) (Jan 2017 to Aug 2017)
+
[Gallery Part 5](https://github.com/ocornut/imgui/issues/1269) (Aug 2017 to Feb 2018)
+
[Gallery Part 6](https://github.com/ocornut/imgui/issues/1607) (Feb 2018 to June 2018)
+
[Gallery Part 7](https://github.com/ocornut/imgui/issues/1902) (June 2018 onward)
+
Also see the [Mega screenshots](https://github.com/ocornut/imgui/issues/1273) for an idea of the available features.
+
+Various tools
+[](https://cloud.githubusercontent.com/assets/8225057/20628927/33e14cac-b329-11e6-80f6-9524e93b048a.png)
+
+[](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v160/editor_white.png)
+
+
+
+[](https://raw.githubusercontent.com/wiki/ocornut/imgui/web/v148/profiler.png)
+
+Dear ImGui can load TTF/OTF fonts. UTF-8 is supported for text display and input. Here using Arial Unicode font to display Japanese. Initialize custom font with:
+Code:
+```cpp
+ImGuiIO& io = ImGui::GetIO();
+io.Fonts->AddFontFromFileTTF("NotoSansCJKjp-Medium.otf", 20.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+```
+```cpp
+ImGui::Text(u8"こんにちは!テスト %d", 123);
+if (ImGui::Button(u8"ロード"))
+{
+ // do stuff
+}
+ImGui::InputText("string", buf, IM_ARRAYSIZE(buf));
+ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
+```
+Result:
+

+
_(settings: Dark style (left), Light style (right) / Font: NotoSansCJKjp-Medium, 20px / Rounding: 5)_
+
+References
+----------
+
+The Immediate Mode GUI paradigm may at first appear unusual to some users. This is mainly because "Retained Mode" GUIs have been so widespread and predominant. The following links can give you a better understanding about how Immediate Mode GUIs works.
+- [Johannes 'johno' Norneby's article](http://www.johno.se/book/imgui.html).
+- [A presentation by Rickard Gustafsson and Johannes Algelind](http://www.cse.chalmers.se/edu/year/2011/course/TDA361/Advanced%20Computer%20Graphics/IMGUI.pdf).
+- [Jari Komppa's tutorial on building an ImGui library](http://iki.fi/sol/imgui/).
+- [Casey Muratori's original video that popularized the concept](https://mollyrocket.com/861).
+- [Nicolas Guillemot's CppCon'16 flash-talk about Dear ImGui](https://www.youtube.com/watch?v=LSRJ1jZq90k).
+- [Thierry Excoffier's Zero Memory Widget](http://perso.univ-lyon1.fr/thierry.excoffier/ZMW/).
+
+See the [Wiki](https://github.com/ocornut/imgui/wiki) for more references and [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to different languages and frameworks.
+
+Support Forums
+--------------
+
+If you have issues with: compiling, linking, adding fonts, running or displaying Dear ImGui, or wiring inputs: please post on the Discourse forum: https://discourse.dearimgui.org/c/getting-started.
+
+For any other questions, bug reports, requests, feedback, you may post on https://github.com/ocornut/imgui/issues.
+
+Frequently Asked Question (FAQ)
+-------------------------------
+
+**Where is the documentation?**
+
+- The documentation is at the top of imgui.cpp + effectively imgui.h.
+- Example code is in imgui_demo.cpp and particularly the ImGui::ShowDemoWindow() function. It covers most features of ImGui so you can read the code and call the function itself to see its output.
+- Standalone example applications using e.g. OpenGL/DirectX are provided in the examples/ folder.
+- We obviously needs better documentation! Consider contributing or becoming a [Patron](http://www.patreon.com/imgui) to promote this effort.
+- Your programming IDE is your friend, find the type or function declaration to find comments associated to it.
+
+**Which version should I get?**
+
+I occasionally tag [Releases](https://github.com/ocornut/imgui/releases) but it is generally safe and recommended to sync to master/latest. The library is fairly stable and regressions tend to be fixed fast when reported.
+
+You may also peak at the [Multi-Viewport](https://github.com/ocornut/imgui/issues/1542) and [Docking](https://github.com/ocornut/imgui/issues/2109) branches. Even though they are marked beta, several projects are using them and they are kept in sync with master regularly.
+
+**Who uses Dear ImGui?**
+
+See the [Software using dear imgui page](https://github.com/ocornut/imgui/wiki/Software-using-dear-imgui) for an (incomplete) list of games/software which are publicly known to use dear imgui. Please add yours if you can!
+
+**Why the odd dual naming, "dear imgui" vs "ImGui"?**
+
+The library started its life and is best known as "ImGui" only due to the fact that I didn't give it a proper name when I released it. However, the term IMGUI (immediate-mode graphical user interface) was coined before and is being used in variety of other situations. It seemed confusing and unfair to hog the name. To reduce the ambiguity without affecting existing codebases, I have decided on an alternate, longer name "dear imgui" that people can use to refer to this specific library in ambiguous situations.
+
+**How can I tell whether to dispatch mouse/keyboard to imgui or to my application?**
+
**How can I display an image? What is ImTextureID, how does it works?**
+
**How can I have multiple widgets with the same label or without a label? A primer on labels and the ID Stack.**
+
**How can I use my own math types instead of ImVec2/ImVec4?**
+
**How can I load a different font than the default?**
+
**How can I easily use icons in my application?**
+
**How can I load multiple fonts?**
+
**How can I display and input non-latin characters such as Chinese, Japanese, Korean, Cyrillic?**
+
**How can I use the drawing facilities without an Dear ImGui window? (using ImDrawList API)**
+
**I integrated Dear ImGui in my engine and the text or lines are blurry..**
+
**I integrated Dear ImGui in my engine and some elements are disappearing when I move windows around..**
+
**How can I help?**
+
+See the FAQ in imgui.cpp for answers.
+
+**How do you use Dear ImGui on a platform that may not have a mouse or keyboard?**
+
+You can control Dear ImGui with a gamepad, see the explanation in imgui.cpp about how to use the navigation feature (short version: map your gamepad inputs into the `io.NavInputs[]` array and set `io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad`).
+
+You can share your computer mouse seamlessly with your console/tablet/phone using [Synergy](http://synergy-project.org). This is the preferred solution for developer productivity. In particular, their [micro-synergy-client](https://github.com/symless/micro-synergy-client) repo there is _uSynergy.c_ sources for a small embeddable that you can use on any platform to connect to your host PC using Synergy 1.x. You may also use a third party solution such as [Remote ImGui](https://github.com/JordiRos/remoteimgui).
+
+For touch inputs, you can increase the hit box of widgets (via the _style.TouchPadding_ setting) to accommodate a little for the lack of precision of touch inputs, but it is recommended you use a mouse or gamepad to allow optimizing for screen real-estate and precision.
+
+**Can you create elaborate/serious tools with Dear ImGui?**
+
+Yes. People have written game editors, data browsers, debuggers, profilers and all sort of non-trivial tools with the library. In my experience the simplicity of the API is very empowering. Your UI runs close to your live data. Make the tools always-on and everybody in the team will be inclined to create new tools (as opposed to more "offline" UI toolkits where only a fraction of your team effectively creates tools). The list of sponsors below is also an indicator that serious game teams have been using the library.
+
+Dear ImGui is very programmer centric and the immediate-mode GUI paradigm might requires you to readjust some habits before you can realize its full potential. Dear ImGui is about making things that are simple, efficient and powerful.
+
+**Can you reskin the look of Dear ImGui?**
+
+You can alter the look of the interface to some degree: changing colors, sizes, padding, rounding, fonts. However, as Dear ImGui is designed and optimized to create debug tools, the amount of skinning you can apply is limited. There is only so much you can stray away from the default look and feel of the interface. Below is a screenshot from [LumixEngine](https://github.com/nem0/LumixEngine) with custom colors + a docking/tabs extension (both of which you can find in the Issues section and will eventually be merged):
+
+
+
+**Why using C++ (as opposed to C)?**
+
+Dear ImGui takes advantage of a few C++ languages features for convenience but nothing anywhere Boost-insanity/quagmire. Dear ImGui does NOT require C++11 so it can be used with most old C++ compilers. Dear ImGui doesn't use any C++ header file. Language-wise, function overloading and default parameters are used to make the API easier to use and code more terse. Doing so I believe the API is sitting on a sweet spot and giving up on those features would make the API more cumbersome. Other features such as namespace, constructors and templates (in the case of the ImVector<> class) are also relied on as a convenience.
+
+There is an auto-generated [c-api for Dear ImGui (cimgui)](https://github.com/cimgui/cimgui) by Sonoro1234 and Stephan Dilly. This is designed for binding other languages. If possible, I would suggest using your target language functionalities to try replicating the function overloading and default parameters used in C++ else the API may be harder to use. Also see [Bindings](https://github.com/ocornut/imgui/wiki/Bindings) for third-party bindings to other languages.
+
+Support dear imgui
+------------------
+
+**How can I help financing further development of Dear ImGui?**
+
+Your contributions are keeping the library alive. If you are an individual using dear imgui, please consider donating to enable me to spend more time improving the library.
+
+Monthly donations via Patreon:
+
[](http://www.patreon.com/imgui)
+
+One-off donations via PayPal:
+
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=5Q73FPZ9C526U)
+
+Ongoing dear imgui development is financially supported on [**Patreon**](http://www.patreon.com/imgui) and by private sponsors.
+If your company uses dear imgui, please consider financial support (e.g. sponsoring a few weeks/months of development. I can also invoice for private support, custom development etc. contact me for details: omarcornut at gmail). Thanks!
+
+**Platinum-chocolate sponsors**
+- Blizzard Entertainment.
+
+**Double-chocolate sponsors**
+- Media Molecule, Mobigame, Insomniac Games, Aras Pranckevičius, Lizardcube, Greggman, DotEmu, Nadeo, Supercell, Runner, Friendly Shade.
+
+**Salty caramel supporters**
+- Jetha Chan, Wild Sheep Studio, Pastagames, Mārtiņš Možeiko, Daniel Collin, Recognition Robotics, Chris Genova, ikrima, Glenn Fiedler, Geoffrey Evans, Dakko Dakko, Mercury Labs, Singularity Demo Group, Mischa Alff, Sebastien Ronsse, Lionel Landwerlin, Nikolay Ivanov, Ron Gilbert, Brandon Townsend, Nikhil Deshpande, Cort Stratton, drudru, Harfang 3D, Jeff Roberts.
+
+**Caramel supporters**
+- Michel Courtine, César Leblic, Dale Kim, Alex Evans, Rui Figueira, Paul Patrashcu, Jerome Lanquetot, Ctrl Alt Ninja, Paul Fleming, Neil Henning, Stephan Dilly, Neil Blakey-Milner, Aleksei, NeiloGD, Justin Paver, FiniteSol, Vincent Pancaldi, James Billot, Robin Hübner, furrtek, Eric, Simon Barratt, Game Atelier, Julian Bosch, Simon Lundmark, Vincent Hamm, Farhan Wali, Matt Reyer, Colin Riley, Victor Martins, Josh Simmons, Garrett Hoofman, Sergio Gonzales, Andrew Berridge, Roy Eltham, Game Preservation Society, Kit framework, Josh Faust, Martin Donlon, Quinton, Felix, Andrew Belt, Codecat, Cort Stratton, Claudio Canepa, Doug McNabb, Emmanuel Julien, Guillaume Chereau, Jeffrey Slutter, Jeremiah Deckard, r-lyeh, Roger Clark, Nekith, Joshua Fisher, Malte Hoffmann, Mustafa Karaalioglu, Merlyn Morgan-Graham, Per Vognsen, Fabian Giesen, Jan Staubach, Matt Hargett, John Shearer, Jesse Chounard, kingcoopa, Miloš Tošić, Jonas Bernemann, Johan Andersson, Nathan Hartman, Michael Labbe, Tomasz Golebiowski, Louis Schnellbach, Felipe Alfonso, Jimmy Andrews, Bojan Endrovski, Robin Berg Pettersen, Rachel Crawford, Edsel Malasig, Andrew Johnson, Sean Hunter, Jordan Mellow, Nefarius Software Solutions, Laura Wieme, Robert Nix, Mick Honey, Astrofra, Jonas Lehmann, Steven Kah Hien Wong, Bartosz Bielecki, Oscar Penas, A M, Liam Moynihan, Artometa.
+
+And all other supporters; THANK YOU!
+(Please contact me if you would like to be added or removed from this list)
+
+Credits
+-------
+
+Developed by [Omar Cornut](http://www.miracleworld.net) and every direct or indirect contributors to the GitHub. The early version of this library was developed with the support of [Media Molecule](http://www.mediamolecule.com) and first used internally on the game [Tearaway](http://tearaway.mediamolecule.com).
+
+I first discovered imgui principles at [Q-Games](http://www.q-games.com) where Atman had dropped his own simple imgui implementation in the codebase, which I spent quite some time improving and thinking about. It turned out that Atman was exposed to the concept directly by working with Casey. When I moved to Media Molecule I rewrote a new library trying to overcome the flaws and limitations of the first one I've worked with. It became this library and since then I have spent an unreasonable amount of time iterating on it.
+
+Embeds [ProggyClean.ttf](http://upperbounds.net) font by Tristan Grimmer (MIT license).
+
+Embeds [stb_textedit.h, stb_truetype.h, stb_rectpack.h](https://github.com/nothings/stb/) by Sean Barrett (public domain).
+
+Inspiration, feedback, and testing for early versions: Casey Muratori, Atman Binstock, Mikko Mononen, Emmanuel Briney, Stefan Kamoda, Anton Mikhailov, Matt Willis. And everybody posting feedback, questions and patches on the GitHub.
+
+License
+-------
+
+Dear ImGui is licensed under the MIT License, see LICENSE for more information.
diff --git a/3rdparty/imgui/docs/TODO.txt b/3rdparty/imgui/docs/TODO.txt
new file mode 100644
index 00000000..2b760243
--- /dev/null
+++ b/3rdparty/imgui/docs/TODO.txt
@@ -0,0 +1,315 @@
+dear imgui
+ISSUES & TODO LIST
+
+Issue numbers (#) refer to github issues listed at https://github.com/ocornut/imgui/issues/XXXX
+The list below consist mostly of ideas noted down before they are requested/discussed by users (at which point they usually exist on the github issue tracker).
+It's mostly a bunch of personal notes, probably incomplete. Feel free to query if you have any questions.
+
+ - doc/test: add a proper documentation+regression testing system (#435)
+ - doc/test: checklist app to verify binding/integration of imgui (test inputs, rendering, callback, etc.).
+ - doc/tips: tips of the day: website? applet in imgui_club?
+ - project: folder or separate repository with maintained helpers (e.g. imgui_memory_editor.h, imgui_stl.h, maybe imgui_dock would be there?)
+
+ - window: calling SetNextWindowSize() every frame with <= 0 doesn't do anything, may be useful to allow (particularly when used for a single axis). (#690)
+ - window: add a way for very transient windows (non-saved, temporary overlay over hundreds of objects) to "clean" up from the global window list. perhaps a lightweight explicit cleanup pass.
+ - window: auto-fit feedback loop when user relies on any dynamic layout (window width multiplier, column) appears weird to end-user. clarify.
+ - window: allow resizing of child windows (possibly given min/max for each axis?.)
+ - window: background options for child windows, border option (disable rounding).
+ - window: resizing from any sides? done. > need backends to honor mouse cursors properly. (#822)
+ - window: resize from borders: support some form of outer padding to make it easier to grab borders. (#822)
+ - window: fix resize glitch when collapsing an AlwaysAutoResize window.
+ - window: begin with *p_open == false could return false.
+ - window: get size/pos helpers given names (see discussion in #249)
+ - window: a collapsed window can be stuck behind the main menu bar?
+ - window: when window is very small, prioritize resize button over close button.
+ - window: detect extra End() call that pop the "Debug" window out and assert at End() call site instead of at end of frame.
+ - window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd.
+ - window: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon?
+ - window: expose contents size. (#1045)
+ - window: using SetWindowPos() inside Begin() and moving the window with the mouse reacts a very ugly glitch. We should just defer the SetWindowPos() call.
+ - window: GetWindowSize() returns (0,0) when not calculated? (#1045)
+ - window: freeze window flag: if not focused/hovered, return false, render with previous ImDrawList. and/or reduce refresh rate.
+ - window: investigate better auto-positioning for new windows.
+ - scrolling: allow immediately effective change of scroll after Begin() if we haven't appended items yet.
+ - scrolling/clipping: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y). (2017-08-20: can't repro)
+ - scrolling/style: shadows on scrollable areas to denote that there is more contents
+
+ - drawdata: make it easy to clone (or swap?) a ImDrawData so user can easily save that data if they use threaded rendering.
+ - drawlist: end-user probably can't call Clear() directly because we expect a texture to be pushed in the stack.
+ - drawlist: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command).
+ - drawlist: primitives/helpers to manipulate vertices post submission, so e.g. a quad/rect can be resized to fit later submitted content, _without_ using the ChannelSplit api
+ - drawlist: make it easier to toggle AA per primitive, so we can use e.g. non-AA fill + AA borders more naturally
+ - drawlist: non-AA strokes have gaps between points (#593, #288), especially RenderCheckmark().
+ - drawlist: would be good to be able to deep copy of ImDrawData (we have a deep copy of ImDrawList now).
+ - drawlist: rendering: provide a way for imgui to output to a single/global vertex buffer, re-order indices only at the end of the frame (ref: https://gist.github.com/floooh/10388a0afbe08fce9e617d8aefa7d302)
+ - drawlist: callback: add an extra void* in ImDrawCallback to allow passing render-local data to the callback (would break API).
+ - drawlist/opt: store rounded corners in texture to use 1 quad per corner (filled and wireframe) to lower the cost of rounding. (#1962)
+ - drawlist/opt: AddRect() axis aligned pixel aligned (no-aa) could use 8 triangles instead of 16 and no normal calculation.
+
+ - main: considering adding an Init() function? some constructs are awkward in the implementation because of the lack of them.
+ - main: find a way to preserve relative orders of multiple reappearing windows (so an app toggling between "modes" e.g. fullscreen vs all tools) won't lose relative ordering.
+ - main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
+ - main: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode?
+ - main: rename the main "Debug" window to avoid ID collision with user who may want to use "Debug" with specific flags.
+
+ - widgets: display mode: widget-label, label-widget (aligned on column or using fixed size), label-newline-tab-widget etc. (#395)
+ - widgets: clean up widgets internal toward exposing everything and stabilizing imgui_internals.h.
+ - widgets: add visuals for Disabled/ReadOnly mode and expose publicly (#211)
+ - widgets: add always-allow-overlap mode.
+ - widgets: start exposing PushItemFlag() and ImGuiItemFlags
+ - widgets: alignment options in style (e.g. center Selectable, Right-Align within Button, etc.) #1260
+ - widgets: activate by identifier (trigger button, focus given id)
+ - widgets: a way to represent "mixed" values, so e.g. all values replaced with **, including check-boxes, colors, etc. with support for multi-components widgets (e.g. SliderFloat3, make only "Y" mixed)
+
+ - input text: clean up the mess caused by converting UTF-8 <> wchar. the code is rather inefficient right now and super fragile.
+ - input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
+ - input text: expose CursorPos in char filter event (#816)
+ - input text: access public fields via a non-callback API e.g. InputTextGetState("xxx") that may return NULL if not active.
+ - input text: flag to disable live update of the user buffer (also applies to float/int text input) (#701)
+ - input text: hover tooltip could show unclamped text
+ - input text: option to Tab after an Enter validation.
+ - input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
+ - input text: easier ways to update buffer (from source char*) while owned. preserve some sort of cursor position for multi-line text.
+ - input text: add discard flag (e.g. ImGuiInputTextFlags_DiscardActiveBuffer) or make it easier to clear active focus for text replacement during edition (#725)
+ - input text: display bug when clicking a drag/slider after an input text in a different window has all-selected text (order dependent). actually a very old bug but no one appears to have noticed it.
+ - input text: allow centering/positioning text so that ctrl+clicking Drag or Slider keeps the textual value at the same pixel position.
+ - input text: what's the easiest way to implement a nice IP/Mac address input editor?
+ - input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
+ - input text multi-line: support for cut/paste without selection (cut/paste the current line)
+ - input text multi-line: line numbers? status bar? (follow up on #200)
+ - input text multi-line: behave better when user changes input buffer while editing is active (even though it is illegal behavior). namely, the change of buffer can create a scrollbar glitch (#725)
+ - input text multi-line: better horizontal scrolling support (#383, #1224)
+ - input text multi-line: single call to AddText() should be coarse clipped on InputTextEx() end.
+ - input number: optional range min/max for Input*() functions
+ - input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
+ - input number: use mouse wheel to step up/down
+ - input number: applying arithmetics ops (+,-,*,/) messes up with text edit undo stack.
+
+ - layout: helper or a way to express ImGui::SameLine(ImGui::GetCursorStartPos().x + ImGui::CalcItemWidth() + ImGui::GetStyle().ItemInnerSpacing.x); in a simpler manner.
+ - layout: generalization of the above: a concept equivalent to word processor ruler tab stop ~ mini columns (position in X, no clipping implied) (vaguely relate to #267, #395, also what is used internally for menu items)
+ - layout: horizontal layout helper (#97)
+ - layout: horizontal flow until no space left (#404)
+ - layout: more generic alignment state (left/right/centered) for single items?
+ - layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
+ - layout: BeginGroup() needs a border option. (~#1496)
+ - layout: vertical alignment of mixed height items (e.g. buttons) within a same line (#1284)
+
+ - columns: sizing policy (e.g. for each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
+ - columns: add a conditional parameter to SetColumnOffset() (#513, #125)
+ - columns: headers. reorderable. (#513, #125)
+ - columns: optional sorting modifiers (up/down), sort list so sorting can be done multi-criteria. notify user when sort order changed.
+ - columns: option to alternate background colors on odd/even scanlines.
+ - columns: allow columns to recurse.
+ - columns: allow a same columns set to be interrupted by e.g. CollapsingHeader and resume with columns in sync when moving them.
+ - columns: separator function or parameter that works within the column (currently Separator() bypass all columns) (#125)
+ - columns: flag to add horizontal separator above/below?
+ - columns/layout: setup minimum line height (equivalent of automatically calling AlignFirstTextHeightToWidgets)
+
+!- color: the color conversion helpers/types are a mess and needs sorting out.
+ - color: (api breaking) ImGui::ColorConvertXXX functions should be loose ImColorConvertXX to match imgui_internals.h
+
+ - plot: full featured plot/graph api w/ scrolling, zooming etc. all bell & whistle. why not!
+ - plot: PlotLines() should use the polygon-stroke facilities, less vertices (currently issues with averaging normals)
+ - plot: make it easier for user to draw extra stuff into the graph (e.g: draw basis, highlight certain points, 2d plots, multiple plots)
+ - plot: "smooth" automatic scale over time, user give an input 0.0(full user scale) 1.0(full derived from value)
+ - plot: option/feature: draw the zero line
+ - plot: option/feature: draw grid, vertical markers
+ - plot: option/feature: draw unit
+ - plot: add a helper e.g. Plot(char* label, float value, float time_span=2.0f) that stores values and Plot them for you - probably another function name. and/or automatically allow to plot ANY displayed value (more reliance on stable ID)
+
+ - clipper: ability to force display 1 item in the list would be convenient (for patterns where we need to set active id etc.)
+ - clipper: ability to disable the clipping through a simple flag/bool.
+ - clipper: ability to run without knowing full count in advance.
+
+ - splitter/separator: formalize the splitter idiom into an official api (we want to handle n-way split) (#319)
+
+ - dock: docking extension
+ - dock: dock out from a collapsing header? would work nicely but need emitting window to keep submitting the code.
+
+ - tabs: re-ordering, close buttons, context menu, persistent order (#261, #351)
+
+ - ext: stl-ish friendly extension (imgui_stl.h) that has wrapper for std::string, std::vector etc.
+
+ - button: provide a button that looks framed.
+ - image/image button: misalignment on padded/bordered button?
+ - image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that?
+ - image button: not taking an explicit id is odd.
+ - slider: allow using the [-]/[+] buttons used by InputFloat()/InputInt()
+ - slider: initial absolute click is imprecise. change to relative movement slider (same as scrollbar). (#1946)
+ - slider: add dragging-based widgets to edit values with mouse (on 2 axises), saving screen real-estate.
+ - slider: tint background based on value (e.g. v_min -> v_max, or use 0.0f either side of the sign)
+ - slider: relative dragging? + precision dragging
+ - slider: step option (#1183)
+ - slider style: fill % of the bar instead of positioning a drag.
+ - knob: rotating knob widget (#942)
+ - drag float: up/down axis
+ - drag float: added leeway on edge (e.g. a few invisible steps past the clamp limits)
+
+ - combo: use clipper: make it easier to disable clipper with a single flag.
+ - combo: flag for BeginCombo to not return true when unchanged (#1182)
+ - combo: a way/helper to customize the combo preview (#1658)
+ - combo/listbox: keyboard control. need InputText-like non-active focus + key handling. considering keyboard for custom listbox (pr #203)
+ - listbox: refactor and clean the begin/end api
+ - listbox: multiple selection.
+ - listbox: unselect option (#1208)
+ - listbox: make it easier/more natural to implement range-select (need some sort of info/ref about the last clicked/focused item that user can translate to an index?) (wip stash)
+ - listbox: user may want to initial scroll to focus on the one selected value?
+ - listbox: expose hovered item for a basic ListBox
+ - listbox: keyboard navigation.
+ - listbox: scrolling should track modified selection.
+
+!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402)
+ - popups/modal: make modal title bar blink when trying to click outside the modal
+ - popups: reopening context menu at new position should be the behavior by default? (equivalent to internal OpenPopupEx() with reopen_existing=true) (~#1497)
+ - popups: if the popup functions took explicit ImGuiID it would allow the user to manage the scope of those ID. (#331)
+ - popups: clicking outside (to close popup) and holding shouldn't drag window below.
+ - popups: add variant using global identifier similar to Begin/End (#402)
+ - popups: border options. richer api like BeginChild() perhaps? (#197)
+ - tooltip: drag and drop with tooltip near monitor edges lose/changes its last direction instead of locking one. The drag and drop tooltip should always follow without changing direction.
+ - tooltip: tooltip that doesn't fit in entire screen seems to lose their "last preferred direction" and may teleport when moving mouse.
+ - tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
+ - tooltip: tooltips with delay timers? or general timer policy? (instantaneous vs timed): IsItemHovered() with timer + implicit aabb-id for items with no ID. (#1485)
+
+ - menus: calling BeginMenu() twice with a same name doesn't append as Begin() does for regular windows (#1207)
+ - menus: menu bars inside modal windows are acting weird.
+ - status-bar: add a per-window status bar helper similar to what menu-bar does.
+ - shortcuts: local-style shortcut api, e.g. parse "&Save"
+ - shortcuts,menus: global-style shortcut api e.g. "Save (CTRL+S)" -> explicit flag for recursing into closed menu
+ - shortcuts: programmatically access shortcuts "Focus("&Save"))
+ - menus: menu-bar: main menu-bar could affect clamping of windows position (~ akin to modifying DisplayMin)
+ - menus: hovering from menu to menu on a menu-bar has 1 frame without any menu, which is a little annoying. ideally either 0 either longer.
+
+ - text: selectable text (for copy) as a generic feature (ItemFlags?)
+ - text: proper alignment options in imgui_internal.h
+ - text wrapped: figure out better way to use TextWrapped() in an always auto-resize context (tooltip, etc.) (#249)
+ - text: it's currently impossible to have a window title with "##". perhaps an official workaround would be nice. \ style inhibitor? non-visible ascii code to insert between #?
+ - text: provided a framed text helper, e.g. https://pastebin.com/1Laxy8bT
+ - text link/url button: underlined. should api expose an ID or use text contents as ID? which colors enum to use?
+
+ - tree node / optimization: avoid formatting when clipped.
+ - tree node: tree-node/header right-most side doesn't take account of horizontal scrolling.
+ - tree node: add treenode/treepush int variants? not there because (void*) cast from int warns on some platforms/settings?
+ - tree node: try to apply scrolling at time of TreePop() if node was just opened and end of node is past scrolling limits?
+ - tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer)
+ - tree node: tweak color scheme to distinguish headers from selected tree node (#581)
+ - tree node: leaf/non-leaf highlight mismatch.
+
+ - settings: write more decent code to allow saving/loading new fields: columns, selected tree nodes?
+ - settings: api for per-tool simple persistent data (bool,int,float,columns sizes,etc.) in .ini file (#437)
+ - stb: add defines to disable stb implementations
+
+!- style: better default styles. (#707)
+ - style: add a highlighted text color (for headers, etc.)
+ - style: border types: out-screen, in-screen, etc. (#447)
+ - style: add window shadow (fading away from the window. Paint-style calculation of vertices alpha after drawlist would be easier)
+ - style: a concept of "compact style" that the end-user can easily rely on (e.g. PushStyleCompact()?) that maps to other settings? avoid implementing duplicate helpers such as SmallCheckbox(), etc.
+ - style: try to make PushStyleVar() more robust to incorrect parameters (to be more friendly to edit & continues situation).
+ - style: global scale setting.
+ - style: WindowPadding needs to be EVEN as the 0.5 multiplier used on this value probably have a subtle effect on clip rectangle
+ - style: have a more global HSV setter (e.g. alter hue on all elements). consider replacing active/hovered by offset in HSV space? (#438, #707, #1223)
+ - style: gradients fill (#1223) ~ 2 bg colors for each fill? tricky with rounded shapes and using textures for corners.
+ - style editor: color child window height expressed in multiple of line height.
+
+ - log: LogButtons() options for specifying depth and/or hiding depth slider
+ - log: have more control over the log scope (e.g. stop logging when leaving current tree node scope)
+ - log: be able to log anything (e.g. right-click on a window/tree-node, shows context menu? log into tty/file/clipboard)
+ - log: let user copy any window content to clipboard easily (CTRL+C on windows? while moving it? context menu?). code is commented because it fails with multiple Begin/End pairs.
+
+ - filters: set a current filter that tree node can automatically query to hide themselves
+ - filters: handle wild-cards (with implicit leading/trailing *), reg-exprs
+ - filters: fuzzy matches (may use code at blog.forrestthewoods.com/4cffeed33fdb)
+
+ - drag and drop: have some way to know when a drag begin from BeginDragDropSource() pov.
+ - drag and drop: allow preview tooltip to be submitted from a different place than the drag source. (#1725)
+ - drag and drop: allow using with other mouse buttons (where activeid won't be set). (#1637)
+ - drag and drop: make it easier and provide a demo to have tooltip both are source and target site, with a more detailed one on target site (tooltip ordering problem)
+ - drag and drop: test with reordering nodes (in a list, or a tree node). (#143)
+ - drag and drop: test integrating with os drag and drop (make it easy to do a naive WM_DROPFILE integration)
+ - drag and drop: make payload optional? (#143)
+ - drag and drop: feedback when hovering a modal (cursor?)
+ - node/graph editor (#306)
+ - pie menus patterns (#434)
+ - markup: simple markup language for color change? (#902)
+
+!- font: need handling of missing glyphs by not packing/rasterizing glyph 0 of a given font.
+ - font: MergeMode: flags to select overwriting or not.
+ - font: MergeMode: duplicate glyphs are stored in the atlas texture which is suboptimal.
+ - font: free the Alpha buffer if user only requested RGBA.
+!- font: better CalcTextSizeA() API, at least for simple use cases. current one is horrible (perhaps have simple vs extended versions).
+ - font: a CalcTextHeight() helper could run faster than CalcTextSize().y
+ - font: enforce monospace through ImFontConfig (for icons?) + create dual ImFont output from same input, reusing rasterized data but with different glyphs/AdvanceX
+ - font: finish CustomRectRegister() to allow mapping Unicode codepoint to custom texture data
+ - font: PushFontSize API (#1018)
+ - font: MemoryTTF taking ownership confusing/not obvious, maybe default should be opposite?
+ - font/atlas: add a missing Glyphs.reserve()
+ - font/atlas: incremental updates
+ - font/atlas: dynamic font atlas to avoid baking huge ranges into bitmap and make scaling easier.
+ - font/atlas: allow user to submit its own primitive to be rectpacked, and allow to map them on a Unicode point.
+ - font/draw: vertical and/or rotated text renderer (#705) - vertical is easier clipping wise
+ - font/draw: need to be able to specify wrap start position.
+ - font/draw: better reserve policy for large horizontal block of text (shouldn't reserve for all clipped lines)
+ - font: imgui_freetype.h alternative renderer (#618)
+ - font: optimization: for monospace font (like the default one) we can trim IndexXAdvance as long as trailing value is == FallbackXAdvance (need to make sure TAB is still correct).
+ - font: add support for kerning, probably optional. A) perhaps default to (32..128)^2 matrix ~ 9K entries = 36KB, then hash for non-ascii?. B) or sparse lookup into per-char list?
+ - font: add a simpler CalcTextSizeA() api? current one ok but not welcome if user needs to call it directly (without going through ImGui::CalcTextSize)
+ - font: fix AddRemapChar() to work before font has been built.
+ - font: (api breaking) removed "TTF" from symbol names. also because it now supports OTF.
+
+ - nav: wrap around logic to allow e.g. grid based layout (pressing NavRight on the right-most element would go to the next row, etc.). see internal's NavMoveRequestTryWrapping().
+ - nav: patterns to make it possible for arrows key to update selection
+ - nav: restore/find nearest navid when current one disappear (e.g. pressed a button that disappear, or perhaps auto restoring when current button change name)
+ - nav: SetItemDefaultFocus() level of priority, so widget like Selectable when inside a popup could claim a low-priority default focus on the first selected iem
+ - nav: allow input system to be be more tolerant of io.DeltaTime=0.0f
+ - nav: ESC within a menu of a child window seems to exit the child window.
+ - nav: NavFlattened: ESC on a flattened child should select something.
+ - nav: NavFlattened: broken: in typical usage scenario, the items of a fully clipped child are currently not considered to enter into a NavFlattened child.
+ - nav: NavFlattened: init request doesn't select items that are part of a NavFlattened child
+ - nav: NavFlattened: cannot access menu-bar of a flattened child window with Alt/menu key (not a very common use case..).
+ - nav: Left within a tree node block as a fallback (ImGuiTreeNodeFlags_NavLeftJumpsBackHere by default?)
+ - nav: menus: pressing left-right on a vertically clipped menu bar tends to jump to the collapse/close buttons.
+ - nav: menus: allow pressing Menu to leave a sub-menu.
+ - nav: simulate right-click or context activation? (SHIFT+F10)
+ - nav: tabs should go through most/all widgets (in submission order?).
+ - nav: when CTRL-Tab/windowing is active, the HoveredWindow detection doesn't take account of the window display re-ordering.
+ - nav: esc/enter default behavior for popups, e.g. be able to mark an "ok" or "cancel" button that would get triggered by those keys.
+ - nav: when activating a button that changes label (without a static ID) or disappear, can we somehow automatically recover into a nearest highlight item?
+ - nav: there's currently no way to completely clear focus with the keyboard. depending on patterns used by the application to dispatch inputs, it may be desirable.
+ - nav: configuration flag to disable global shortcuts (currently only CTRL-tab) ?
+ - focus: preserve ActiveId/focus stack state, e.g. when opening a menu and close it, previously selected InputText() focus gets restored (#622)
+ - focus: SetKeyboardFocusHere() on with >= 0 offset could be done on same frame (else latch and modulate on beginning of next frame)
+ - focus: unable to use SetKeyboardFocusHere() on clipped widgets. (#787)
+
+ - inputs: we need an explicit flag about whether the imgui window is focused, to be able to distinguish focused key releases vs alt-tabbing all release behaviors.
+ - inputs: rework IO system to be able to pass actual ordered/timestamped events. use an event queue? (~#335, #71)
+ - inputs: support track pad style scrolling & slider edit.
+ - inputs/io: backspace and arrows in the context of a text input could use system repeat rate.
+ - inputs/io: clarify/standardize/expose repeat rate and repeat delays (#1808)
+
+ - misc: idle refresh: expose cursor blink animation timer for backend to be able to lower framerate.
+ - misc: make the ImGuiCond values linear (non-power-of-two). internal storage for ImGuiWindow can use integers to combine into flags (Why?)
+ - misc: provide a way to compile out the entire implementation while providing a dummy API (e.g. #define IMGUI_DUMMY_IMPL)
+ - misc: PushItemFlag(): add a flag to disable keyboard capture when used with mouse? (#1682)
+ - misc: use more size_t in public api?
+ - misc: ImVector: erase_unsorted() helper
+ - misc: imgui_cpp: perhaps a misc/ header file with more friendly helper (e.g. type-infer versions of DragScalar, vector<> variants if appropriate for some functions).
+
+ - backend: bgfx? https://gist.github.com/RichardGale/6e2b74bc42b3005e08397236e4be0fd0
+ - web/emscriptem: refactor some examples to facilitate integration with emscripten main loop system. (#1713, #336)
+ - web/emscriptem: with refactored examples, we could provide a direct imgui_impl_emscripten platform layer (see eg. https://github.com/floooh/sokol-samples/blob/master/html5/imgui-emsc.cc#L42)
+
+ - remote: make a system like RemoteImGui first-class citizen/project (#75)
+
+ - demo: find a way to demonstrate textures in the examples application, as it such a a common issue for new users.
+ - demo: add vertical separator demo
+ - demo: add virtual scrolling example?
+ - demo: demonstration Plot offset
+ - examples: window minimize, maximize (#583)
+ - examples: provide a zero frame-rate/idle example.
+ - examples: apple: example_apple should be using modern GL3.
+ - examples: glfw: could go idle when minimized? if (glfwGetWindowAttrib(window, GLFW_ICONIFIED)) { glfwWaitEvents(); continue; } // issue: DeltaTime will be super high on resume, perhaps provide a way to let impl know (#440)
+ - optimization: replace vsnprintf with stb_printf? or enable the defines/infrastructure to allow it (#1038)
+ - optimization: add clipping for multi-component widgets (SliderFloatX, ColorEditX, etc.). one problem is that nav branch can't easily clip parent group when there is a move request.
+ - optimization: add a flag to disable most of rendering, for the case where the user expect to skip it (#335)
+ - optimization: use another hash function than crc32, e.g. FNV1a
+ - optimization/render: merge command-lists with same clip-rect into one even if they aren't sequential? (as long as in-between clip rectangle don't overlap)?
+ - optimization: turn some the various stack vectors into statically-sized arrays
diff --git a/3rdparty/imgui/examples/.gitignore b/3rdparty/imgui/examples/.gitignore
new file mode 100644
index 00000000..b9e1bb62
--- /dev/null
+++ b/3rdparty/imgui/examples/.gitignore
@@ -0,0 +1,38 @@
+build/*
+*/Debug/*
+*/Release/*
+*/x64/*
+*.o
+*.obj
+*.exe
+
+## Visual Studio cruft
+.vs/*
+*/ipch/*
+*.opensdf
+*.log
+*.pdb
+*.ilk
+*.user
+*.sdf
+*.suo
+*.VC.db
+*.VC.VC.opendb
+
+## Xcode cruft
+.DS_Store
+project.xcworkspace
+xcuserdata
+
+## Emscripten output
+*.out.js
+*.out.wasm
+
+## Unix executables
+example_glfw_opengl2/example_glfw_opengl2
+example_glfw_opengl3/example_glfw_opengl3
+example_sdl_opengl2/example_sdl_opengl2
+example_sdl_opengl3/example_sdl_opengl3
+
+## Dear ImGui Ini files
+imgui.ini
diff --git a/3rdparty/imgui/examples/README.txt b/3rdparty/imgui/examples/README.txt
new file mode 100644
index 00000000..1ee91492
--- /dev/null
+++ b/3rdparty/imgui/examples/README.txt
@@ -0,0 +1,230 @@
+-----------------------------------------------------------------------
+ examples/README.txt
+ (This is the README file for the examples/ folder. See docs/ for more documentation)
+-----------------------------------------------------------------------
+
+Dear ImGui is highly portable and only requires a few things to run and render:
+
+ - Providing mouse/keyboard inputs
+ - Uploading the font atlas texture into graphics memory
+ - Providing a render function to render indexed textured triangles
+ - Optional: clipboard support, mouse cursor supports, Windows IME support, etc.
+
+This is essentially what the example bindings in this folder are providing + obligatory portability cruft.
+
+It is important to understand the difference between the core Dear ImGui library (files in the root folder)
+and examples bindings which we are describing here (examples/ folder).
+You should be able to write bindings for pretty much any platform and any 3D graphics API. With some extra
+effort you can even perform the rendering remotely, on a different machine than the one running the logic.
+
+This folder contains two things:
+
+ - Example bindings for popular platforms/graphics API, which you can use as is or adapt for your own use.
+ They are the imgui_impl_XXXX files found in the examples/ folder.
+
+ - Example applications (standalone, ready-to-build) using the aforementioned bindings.
+ They are the in the XXXX_example/ sub-folders.
+
+You can find binaries of some of those example applications at:
+ http://www.miracleworld.net/imgui/binaries
+
+
+---------------------------------------
+ MISC COMMENTS AND SUGGESTIONS
+---------------------------------------
+
+ - Please read 'PROGRAMMER GUIDE' in imgui.cpp for notes on how to setup Dear ImGui in your codebase.
+ Please read the comments and instruction at the top of each file.
+
+ - If you are using of the backend provided here, so you can copy the imgui_impl_xxx.cpp/h files
+ to your project and use them unmodified. Each imgui_impl_xxxx.cpp comes with its own individual
+ ChangeLog at the top of the .cpp files, so if you want to update them later it will be easier to
+ catch up with what changed.
+
+ - Dear ImGui has 0 to 1 frame of lag for most behaviors, at 60 FPS your experience should be pleasant.
+ However, consider that OS mouse cursors are typically drawn through a specific hardware accelerated path
+ and will feel smoother than common GPU rendered contents (including Dear ImGui windows).
+ You may experiment with the io.MouseDrawCursor flag to request Dear ImGui to draw a mouse cursor itself,
+ to visualize the lag between a hardware cursor and a software cursor. However, rendering a mouse cursor
+ at 60 FPS will feel slow. It might be beneficial to the user experience to switch to a software rendered
+ cursor only when an interactive drag is in progress.
+ Note that some setup or GPU drivers are likely to be causing extra lag depending on their settings.
+ If you feel that dragging windows feels laggy and you are not sure who to blame: try to build an
+ application drawing a shape directly under the mouse cursor.
+
+
+---------------------------------------
+ EXAMPLE BINDINGS
+---------------------------------------
+
+Most the example bindings are split in 2 parts:
+
+ - The "Platform" bindings, in charge of: mouse/keyboard/gamepad inputs, cursor shape, timing, windowing.
+ Examples: Windows (imgui_impl_win32.cpp), GLFW (imgui_impl_glfw.cpp), SDL2 (imgui_impl_sdl.cpp)
+
+ - The "Renderer" bindings, in charge of: creating the main font texture, rendering imgui draw data.
+ Examples: DirectX11 (imgui_impl_dx11.cpp), GL3 (imgui_impl_opengl3.cpp), Vulkan (imgui_impl_vulkan.cpp)
+
+ - The example _applications_ usually combine 1 platform + 1 renderer binding to create a working program.
+ Examples: the example_win32_directx11/ application combines imgui_impl_win32.cpp + imgui_impl_dx11.cpp.
+
+ - Some bindings for higher level frameworks carry both "Platform" and "Renderer" parts in one file.
+ This is the case for Allegro 5 (imgui_impl_allegro5.cpp), Marmalade (imgui_impl_marmalade5.cpp).
+
+ - If you use your own engine, you may decide to use some of existing bindings and/or rewrite some using
+ your own API. As a recommendation, if you are new to Dear ImGui, try using the existing binding as-is
+ first, before moving on to rewrite some of the code. Although it is tempting to rewrite both of the
+ imgui_impl_xxxx files to fit under your coding style, consider that it is not necessary!
+ In fact, if you are new to Dear ImGui, rewriting them will almost always be harder.
+
+ Example: your engine is built over Windows + DirectX11 but you have your own high-level rendering
+ system layered over DirectX11.
+ Suggestion: step 1: try using imgui_impl_win32.cpp + imgui_impl_dx11.cpp first.
+ Once this work, _if_ you want you can replace the imgui_impl_dx11.cpp code with a custom renderer
+ using your own functions, etc.
+ Please consider using the bindings to the lower-level platform/graphics API as-is.
+
+ Example: your engine is multi-platform (consoles, phones, etc.), you have high-level systems everywhere.
+ Suggestion: step 1: try using a non-portable binding first (e.g. win32 + underlying graphics API)!
+ This is counter-intuitive, but this will get you running faster! Once you better understand how imgui
+ works and is bound, you can rewrite the code using your own systems.
+
+ - Road-map: Dear ImGui 1.70 (WIP currently in the "viewport" branch) will allows imgui windows to be
+ seamlessly detached from the main application window. This is achieved using an extra layer to the
+ platform and renderer bindings, which allows imgui to communicate platform-specific requests.
+ If you decide to use unmodified imgui_impl_xxxx.cpp files, you will automatically benefit from
+ improvements and fixes related to viewports and platform windows without extra work on your side.
+
+
+List of Platforms Bindings in this repository:
+
+ imgui_impl_glfw.cpp ; GLFW (Windows, macOS, Linux, etc.) http://www.glfw.org/
+ imgui_impl_osx.mm ; macOS native API
+ imgui_impl_sdl.cpp ; SDL2 (Windows, macOS, Linux, iOS, Android) https://www.libsdl.org
+ imgui_impl_win32.cpp ; Win32 native API (Windows)
+ imgui_impl_freeglut.cpp ; FreeGLUT (if you really miss the 90's)
+
+List of Renderer Bindings in this repository:
+
+ imgui_impl_dx9.cpp ; DirectX9
+ imgui_impl_dx10.cpp ; DirectX10
+ imgui_impl_dx11.cpp ; DirectX11
+ imgui_impl_dx12.cpp ; DirectX12
+ imgui_impl_metal.mm ; Metal (with ObjC)
+ imgui_impl_opengl2.cpp ; OpenGL2 (legacy, fixed pipeline <- don't use with modern OpenGL context)
+ imgui_impl_opengl3.cpp ; OpenGL3, OpenGL ES 2, OpenGL ES 3 (modern programmable pipeline)
+ imgui_impl_vulkan.cpp ; Vulkan
+
+List of high-level Frameworks Bindings in this repository: (combine Platform + Renderer)
+
+ imgui_impl_allegro5.cpp
+ imgui_impl_marmalade.cpp
+
+Third-party framework, graphics API and languages bindings are listed at:
+
+ https://github.com/ocornut/imgui/wiki/Bindings
+
+ Languages: C, C#, ChaiScript, D, Go, Haxe, Java, Lua, Odin, Pascal, PureBasic, Python, Rust, Swift...
+ Frameworks: Cinder, Cocoa (OSX), Cocos2d-x, Emscripten, SFML, GML/GameMaker Studio, Irrlicht, Ogre,
+ OpenSceneGraph, openFrameworks, LOVE, NanoRT, Nim Game Lib, Qt3d, SFML, Unreal Engine 4...
+ Miscellaneous: Software Renderer, RemoteImgui, etc.
+
+
+---------------------------------------
+ EXAMPLE APPLICATIONS
+---------------------------------------
+
+Building:
+ Unfortunately in 2018 it is still tedious to create and maintain portable build files using external
+ libraries (the kind we're using here to create a window and render 3D triangles) without relying on
+ third party software. For most examples here I choose to provide:
+ - Makefiles for Linux/OSX
+ - Batch files for Visual Studio 2008+
+ - A .sln project file for Visual Studio 2010+
+ - Xcode project files for the Apple examples
+ Please let me know if they don't work with your setup!
+ You can probably just import the imgui_impl_xxx.cpp/.h files into your own codebase or compile those
+ directly with a command-line compiler.
+
+
+example_win32_directx9/
+ DirectX9 example, Windows only.
+ = main.cpp + imgui_impl_win32.cpp + imgui_impl_dx9.cpp
+
+example_win32_directx10/
+ DirectX10 example, Windows only.
+ = main.cpp + imgui_impl_win32.cpp + imgui_impl_dx10.cpp
+
+example_win32_directx11/
+ DirectX11 example, Windows only.
+ = main.cpp + imgui_impl_win32.cpp + imgui_impl_dx11.cpp
+
+example_win32_directx12/
+ DirectX12 example, Windows only.
+ This is quite long and tedious, because: DirectX12.
+ = main.cpp + imgui_impl_win32.cpp + imgui_impl_dx12.cpp
+
+example_apple_metal/
+ OSX & iOS + Metal.
+ It is based on the "cross-platform" game template provided with Xcode as of Xcode 9.
+ (NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.)
+ = game template + imgui_impl_osx.mm + imgui_impl_metal.mm
+
+example_apple_opengl2/
+ OSX + OpenGL2.
+ (NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.)
+ = main.mm + imgui_impl_osx.mm + imgui_impl_opengl2.cpp
+
+example_glfw_opengl2/
+ **DO NOT USE OPENGL2 CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
+ **Prefer using OPENGL3 code (with gl3w/glew/glad, you can replace the OpenGL function loader)**
+ GLFW + OpenGL2 example (legacy, fixed pipeline).
+ This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
+ If your code is using GL3+ context or any semi modern OpenGL calls, using this renderer is likely to
+ make things more complicated, will require your code to reset many OpenGL attributes to their initial
+ state, and might confuse your GPU driver. One star, not recommended.
+ = main.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl2.cpp
+
+example_glfw_opengl3/
+ GLFW (Win32, Mac, Linux) + OpenGL3+/ES2/ES3 example (programmable pipeline, binding modern functions with GL3W).
+ This uses more modern OpenGL calls and custom shaders.
+ Prefer using that if you are using modern OpenGL in your application (anything with shaders).
+ = main.cpp + imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
+
+example_glfw_vulkan/
+ GLFW (Win32, Mac, Linux) + Vulkan example.
+ This is quite long and tedious, because: Vulkan.
+ = main.cpp + imgui_impl_glfw.cpp + imgui_impl_vulkan.cpp
+
+example_sdl_opengl2/
+ **DO NOT USE OPENGL2 CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
+ **Prefer using OPENGL3 code (with gl3w/glew/glad, you can replace the OpenGL function loader)**
+ SDL2 (Win32, Mac, Linux etc.) + OpenGL example (legacy, fixed pipeline).
+ This code is mostly provided as a reference to learn about Dear ImGui integration, because it is shorter.
+ If your code is using GL3+ context or any semi modern OpenGL calls, using this renderer is likely to
+ make things more complicated, will require your code to reset many OpenGL attributes to their initial
+ state, and might confuse your GPU driver. One star, not recommended.
+ = main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl2.cpp
+
+example_sdl_opengl3/
+ SDL2 (Win32, Mac, Linux, etc.) + OpenGL3+/ES2/ES3 example.
+ This uses more modern OpenGL calls and custom shaders.
+ Prefer using that if you are using modern OpenGL in your application (anything with shaders).
+ = main.cpp + imgui_impl_sdl.cpp + imgui_impl_opengl3.cpp
+
+example_sdl_vulkan/
+ SDL2 (Win32, Mac, Linux, etc.) + Vulkan example.
+ This is quite long and tedious, because: Vulkan.
+ = main.cpp + imgui_impl_sdl.cpp + imgui_impl_vulkan.cpp
+
+example_allegro5/
+ Allegro 5 example.
+ = main.cpp + imgui_impl_allegro5.cpp
+
+example_freeglut_opengl2/
+ FreeGLUT + OpenGL2.
+ = main.cpp + imgui_impl_freeglut.cpp + imgui_impl_opengl2.cpp
+
+example_marmalade/
+ Marmalade example using IwGx.
+ = main.cpp + imgui_impl_marmalade.cpp
diff --git a/3rdparty/imgui/examples/example_allegro5/README.md b/3rdparty/imgui/examples/example_allegro5/README.md
new file mode 100644
index 00000000..5fdcc504
--- /dev/null
+++ b/3rdparty/imgui/examples/example_allegro5/README.md
@@ -0,0 +1,23 @@
+
+# Configuration
+
+Dear ImGui outputs 16-bit vertex indices by default.
+Allegro doesn't support them natively, so we have two solutions: convert the indices manually in imgui_impl_allegro5.cpp, or compile imgui with 32-bit indices.
+You can either modify imconfig.h that comes with Dear ImGui (easier), or set a C++ preprocessor option IMGUI_USER_CONFIG to find to a filename.
+We are providing `imconfig_allegro5.h` that enables 32-bit indices.
+Note that the back-end supports _BOTH_ 16-bit and 32-bit indices, but 32-bit indices will be slightly faster as they won't require a manual conversion.
+
+# How to Build
+
+- On Ubuntu 14.04+
+
+```bash
+g++ -DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" -I .. -I ../.. main.cpp ..\imgui_impl_allegro5.cpp ../../imgui*.cpp -lallegro -lallegro_primitives -o allegro5_example
+```
+
+- On Windows with Visual Studio's CLI
+
+```
+set ALLEGRODIR=path_to_your_allegro5_folder
+cl /Zi /MD /I %ALLEGRODIR%\include /DIMGUI_USER_CONFIG=\"examples/example_allegro5/imconfig_allegro5.h\" /I .. /I ..\.. main.cpp ..\imgui_impl_allegro5.cpp ..\..\imgui*.cpp /link /LIBPATH:%ALLEGRODIR%\lib allegro-5.0.10-monolith-md.lib user32.lib
+```
diff --git a/3rdparty/imgui/examples/example_allegro5/example_allegro5.vcxproj b/3rdparty/imgui/examples/example_allegro5/example_allegro5.vcxproj
new file mode 100644
index 00000000..b0792697
--- /dev/null
+++ b/3rdparty/imgui/examples/example_allegro5/example_allegro5.vcxproj
@@ -0,0 +1,174 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {2AE17FDE-F7F3-4CAC-ADAB-0710EDA4F741}
+ example_allegro5
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %(AdditionalLibraryDirectories)
+ opengl32.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters b/3rdparty/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters
new file mode 100644
index 00000000..8019ebfd
--- /dev/null
+++ b/3rdparty/imgui/examples/example_allegro5/example_allegro5.vcxproj.filters
@@ -0,0 +1,55 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_allegro5/imconfig_allegro5.h b/3rdparty/imgui/examples/example_allegro5/imconfig_allegro5.h
new file mode 100644
index 00000000..35afa67f
--- /dev/null
+++ b/3rdparty/imgui/examples/example_allegro5/imconfig_allegro5.h
@@ -0,0 +1,11 @@
+//-----------------------------------------------------------------------------
+// COMPILE-TIME OPTIONS FOR DEAR IMGUI ALLEGRO 5 EXAMPLE
+// See imconfig.h for the full template
+// Because Allegro doesn't support 16-bit vertex indices, we enable the compile-time option of imgui to use 32-bit indices
+//-----------------------------------------------------------------------------
+
+#pragma once
+
+// Use 32-bit vertex indices because Allegro doesn't support 16-bit ones
+// This allows us to avoid converting vertices format at runtime
+#define ImDrawIdx int
diff --git a/3rdparty/imgui/examples/example_allegro5/main.cpp b/3rdparty/imgui/examples/example_allegro5/main.cpp
new file mode 100644
index 00000000..a5998b64
--- /dev/null
+++ b/3rdparty/imgui/examples/example_allegro5/main.cpp
@@ -0,0 +1,133 @@
+// dear imgui: standalone example application for Allegro 5
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include
+#include
+#include
+#include "imgui.h"
+#include "imgui_impl_allegro5.h"
+
+int main(int, char**)
+{
+ // Setup Allegro
+ al_init();
+ al_install_keyboard();
+ al_install_mouse();
+ al_init_primitives_addon();
+ al_set_new_display_flags(ALLEGRO_RESIZABLE);
+ ALLEGRO_DISPLAY* display = al_create_display(1280, 720);
+ al_set_window_title(display, "Dear ImGui Allegro 5 example");
+ ALLEGRO_EVENT_QUEUE* queue = al_create_event_queue();
+ al_register_event_source(queue, al_get_display_event_source(display));
+ al_register_event_source(queue, al_get_keyboard_event_source());
+ al_register_event_source(queue, al_get_mouse_event_source());
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+ ImGui_ImplAllegro5_Init(display);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ bool running = true;
+ while (running)
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ ALLEGRO_EVENT ev;
+ while (al_get_next_event(queue, &ev))
+ {
+ ImGui_ImplAllegro5_ProcessEvent(&ev);
+ if (ev.type == ALLEGRO_EVENT_DISPLAY_CLOSE)
+ running = false;
+ if (ev.type == ALLEGRO_EVENT_DISPLAY_RESIZE)
+ {
+ ImGui_ImplAllegro5_InvalidateDeviceObjects();
+ al_acknowledge_resize(display);
+ ImGui_ImplAllegro5_CreateDeviceObjects();
+ }
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplAllegro5_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ al_clear_to_color(al_map_rgba_f(clear_color.x, clear_color.y, clear_color.z, clear_color.w));
+ ImGui_ImplAllegro5_RenderDrawData(ImGui::GetDrawData());
+ al_flip_display();
+ }
+
+ // Cleanup
+ ImGui_ImplAllegro5_Shutdown();
+ ImGui::DestroyContext();
+ al_destroy_event_queue(queue);
+ al_destroy_display(display);
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_apple_metal/README.md b/3rdparty/imgui/examples/example_apple_metal/README.md
new file mode 100644
index 00000000..4f620327
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/README.md
@@ -0,0 +1,8 @@
+# iOS / OSX Metal example
+
+## Introduction
+
+This example shows how to integrate Dear ImGui with Metal. It is based on the "cross-platform" game template provided with Xcode as of Xcode 9.
+
+(NB: you may still want to use GLFW or SDL which will also support Windows, Linux along with OSX.)
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/AppDelegate.h b/3rdparty/imgui/examples/example_apple_metal/Shared/AppDelegate.h
new file mode 100644
index 00000000..c4632b1f
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/AppDelegate.h
@@ -0,0 +1,19 @@
+
+#import
+
+#if TARGET_OS_IPHONE
+
+#import
+
+@interface AppDelegate : UIResponder
+@property (strong, nonatomic) UIWindow *window;
+@end
+
+#else
+
+#import
+
+@interface AppDelegate : NSObject
+@end
+
+#endif
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/AppDelegate.m b/3rdparty/imgui/examples/example_apple_metal/Shared/AppDelegate.m
new file mode 100644
index 00000000..eabb44c1
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/AppDelegate.m
@@ -0,0 +1,12 @@
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+#if TARGET_OS_OSX
+- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender {
+ return YES;
+}
+#endif
+
+@end
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/Renderer.h b/3rdparty/imgui/examples/example_apple_metal/Shared/Renderer.h
new file mode 100644
index 00000000..f324915c
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/Renderer.h
@@ -0,0 +1,9 @@
+
+#import
+
+@interface Renderer : NSObject
+
+-(nonnull instancetype)initWithView:(nonnull MTKView *)view;
+
+@end
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/Renderer.mm b/3rdparty/imgui/examples/example_apple_metal/Shared/Renderer.mm
new file mode 100644
index 00000000..95218eae
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/Renderer.mm
@@ -0,0 +1,132 @@
+
+#import "Renderer.h"
+#import
+
+#include "imgui.h"
+#include "imgui_impl_metal.h"
+
+#if TARGET_OS_OSX
+#include "imgui_impl_osx.h"
+#endif
+
+@interface Renderer ()
+@property (nonatomic, strong) id device;
+@property (nonatomic, strong) id commandQueue;
+@end
+
+@implementation Renderer
+
+-(nonnull instancetype)initWithView:(nonnull MTKView *)view;
+{
+ self = [super init];
+ if(self)
+ {
+ _device = view.device;
+ _commandQueue = [_device newCommandQueue];
+
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ (void)ImGui::GetIO();
+
+ ImGui_ImplMetal_Init(_device);
+
+ ImGui::StyleColorsDark();
+ }
+
+ return self;
+}
+
+- (void)drawInMTKView:(MTKView *)view
+{
+ ImGuiIO &io = ImGui::GetIO();
+ io.DisplaySize.x = view.bounds.size.width;
+ io.DisplaySize.y = view.bounds.size.height;
+
+#if TARGET_OS_OSX
+ CGFloat framebufferScale = view.window.screen.backingScaleFactor ?: NSScreen.mainScreen.backingScaleFactor;
+#else
+ CGFloat framebufferScale = view.window.screen.scale ?: UIScreen.mainScreen.scale;
+#endif
+ io.DisplayFramebufferScale = ImVec2(framebufferScale, framebufferScale);
+
+ io.DeltaTime = 1 / float(view.preferredFramesPerSecond ?: 60);
+
+ id commandBuffer = [self.commandQueue commandBuffer];
+
+ static bool show_demo_window = true;
+ static bool show_another_window = false;
+ static float clear_color[4] = { 0.28f, 0.36f, 0.5f, 1.0f };
+
+ MTLRenderPassDescriptor *renderPassDescriptor = view.currentRenderPassDescriptor;
+ if (renderPassDescriptor != nil)
+ {
+ renderPassDescriptor.colorAttachments[0].clearColor = MTLClearColorMake(clear_color[0], clear_color[1], clear_color[2], clear_color[3]);
+
+ // Here, you could do additional rendering work, including other passes as necessary.
+
+ id renderEncoder = [commandBuffer renderCommandEncoderWithDescriptor:renderPassDescriptor];
+ [renderEncoder pushDebugGroup:@"ImGui demo"];
+
+ // Start the Dear ImGui frame
+ ImGui_ImplMetal_NewFrame(renderPassDescriptor);
+#if TARGET_OS_OSX
+ ImGui_ImplOSX_NewFrame(view);
+#endif
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ ImDrawData *drawData = ImGui::GetDrawData();
+ ImGui_ImplMetal_RenderDrawData(drawData, commandBuffer, renderEncoder);
+
+ [renderEncoder popDebugGroup];
+ [renderEncoder endEncoding];
+
+ [commandBuffer presentDrawable:view.currentDrawable];
+ }
+
+ [commandBuffer commit];
+}
+
+- (void)mtkView:(MTKView *)view drawableSizeWillChange:(CGSize)size
+{
+}
+
+@end
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/ViewController.h b/3rdparty/imgui/examples/example_apple_metal/Shared/ViewController.h
new file mode 100644
index 00000000..a8aade13
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/ViewController.h
@@ -0,0 +1,20 @@
+
+#import
+#import
+#import "Renderer.h"
+
+#if TARGET_OS_IPHONE
+
+#import
+
+@interface ViewController : UIViewController
+@end
+
+#else
+
+#import
+
+@interface ViewController : NSViewController
+@end
+
+#endif
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/ViewController.mm b/3rdparty/imgui/examples/example_apple_metal/Shared/ViewController.mm
new file mode 100644
index 00000000..427c0928
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/ViewController.mm
@@ -0,0 +1,130 @@
+
+#import "ViewController.h"
+#import "Renderer.h"
+#include "imgui.h"
+
+#if TARGET_OS_OSX
+#include "imgui_impl_osx.h"
+#endif
+
+@interface ViewController ()
+@property (nonatomic, readonly) MTKView *mtkView;
+@property (nonatomic, strong) Renderer *renderer;
+@end
+
+@implementation ViewController
+
+- (MTKView *)mtkView {
+ return (MTKView *)self.view;
+}
+
+- (void)viewDidLoad
+{
+ [super viewDidLoad];
+
+ self.mtkView.device = MTLCreateSystemDefaultDevice();
+
+ if (!self.mtkView.device) {
+ NSLog(@"Metal is not supported");
+ abort();
+ }
+
+ self.renderer = [[Renderer alloc] initWithView:self.mtkView];
+
+ [self.renderer mtkView:self.mtkView drawableSizeWillChange:self.mtkView.bounds.size];
+
+ self.mtkView.delegate = self.renderer;
+
+#if TARGET_OS_OSX
+ // Add a tracking area in order to receive mouse events whenever the mouse is within the bounds of our view
+ NSTrackingArea *trackingArea = [[NSTrackingArea alloc] initWithRect:NSZeroRect
+ options:NSTrackingMouseMoved | NSTrackingInVisibleRect | NSTrackingActiveAlways
+ owner:self
+ userInfo:nil];
+ [self.view addTrackingArea:trackingArea];
+
+ // If we want to receive key events, we either need to be in the responder chain of the key view,
+ // or else we can install a local monitor. The consequence of this heavy-handed approach is that
+ // we receive events for all controls, not just Dear ImGui widgets. If we had native controls in our
+ // window, we'd want to be much more careful than just ingesting the complete event stream, though we
+ // do make an effort to be good citizens by passing along events when Dear ImGui doesn't want to capture.
+ NSEventMask eventMask = NSEventMaskKeyDown | NSEventMaskKeyUp | NSEventMaskFlagsChanged | NSEventTypeScrollWheel;
+ [NSEvent addLocalMonitorForEventsMatchingMask:eventMask handler:^NSEvent * _Nullable(NSEvent *event) {
+ BOOL wantsCapture = ImGui_ImplOSX_HandleEvent(event, self.view);
+ if (event.type == NSEventTypeKeyDown && wantsCapture) {
+ return nil;
+ } else {
+ return event;
+ }
+
+ }];
+
+ ImGui_ImplOSX_Init();
+#endif
+}
+
+#if TARGET_OS_OSX
+
+- (void)mouseMoved:(NSEvent *)event {
+ ImGui_ImplOSX_HandleEvent(event, self.view);
+}
+
+- (void)mouseDown:(NSEvent *)event {
+ ImGui_ImplOSX_HandleEvent(event, self.view);
+}
+
+- (void)mouseUp:(NSEvent *)event {
+ ImGui_ImplOSX_HandleEvent(event, self.view);
+}
+
+- (void)mouseDragged:(NSEvent *)event {
+ ImGui_ImplOSX_HandleEvent(event, self.view);
+}
+
+- (void)scrollWheel:(NSEvent *)event {
+ ImGui_ImplOSX_HandleEvent(event, self.view);
+}
+
+#elif TARGET_OS_IOS
+
+// This touch mapping is super cheesy/hacky. We treat any touch on the screen
+// as if it were a depressed left mouse button, and we don't bother handling
+// multitouch correctly at all. This causes the "cursor" to behave very erratically
+// when there are multiple active touches. But for demo purposes, single-touch
+// interaction actually works surprisingly well.
+- (void)updateIOWithTouchEvent:(UIEvent *)event {
+ UITouch *anyTouch = event.allTouches.anyObject;
+ CGPoint touchLocation = [anyTouch locationInView:self.view];
+ ImGuiIO &io = ImGui::GetIO();
+ io.MousePos = ImVec2(touchLocation.x, touchLocation.y);
+
+ BOOL hasActiveTouch = NO;
+ for (UITouch *touch in event.allTouches) {
+ if (touch.phase != UITouchPhaseEnded && touch.phase != UITouchPhaseCancelled) {
+ hasActiveTouch = YES;
+ break;
+ }
+ }
+ io.MouseDown[0] = hasActiveTouch;
+}
+
+- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
+ [self updateIOWithTouchEvent:event];
+}
+
+- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
+ [self updateIOWithTouchEvent:event];
+}
+
+- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event {
+ [self updateIOWithTouchEvent:event];
+}
+
+- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event {
+ [self updateIOWithTouchEvent:event];
+}
+
+#endif
+
+@end
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/Shared/main.m b/3rdparty/imgui/examples/example_apple_metal/Shared/main.m
new file mode 100644
index 00000000..cd8468a7
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/Shared/main.m
@@ -0,0 +1,23 @@
+
+#import
+
+#if TARGET_OS_IPHONE
+
+#import
+#import "AppDelegate.h"
+
+int main(int argc, char * argv[]) {
+ @autoreleasepool {
+ return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
+ }
+}
+
+#else
+
+#import
+
+int main(int argc, const char * argv[]) {
+ return NSApplicationMain(argc, argv);
+}
+
+#endif
diff --git a/3rdparty/imgui/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj b/3rdparty/imgui/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..71eca965
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/example_apple_metal.xcodeproj/project.pbxproj
@@ -0,0 +1,549 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 48;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 07A82ED82139413D0078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82ED72139413C0078D120 /* imgui_widgets.cpp */; };
+ 07A82ED92139418F0078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82ED72139413C0078D120 /* imgui_widgets.cpp */; };
+ 8307E7CC20E9F9C900473790 /* ViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7CB20E9F9C900473790 /* ViewController.mm */; };
+ 8307E7CF20E9F9C900473790 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8307E7CD20E9F9C900473790 /* Main.storyboard */; };
+ 8307E7DE20E9F9C900473790 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7DD20E9F9C900473790 /* AppDelegate.m */; };
+ 8307E7E420E9F9C900473790 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 8307E7E220E9F9C900473790 /* Main.storyboard */; };
+ 8307E7E720E9F9C900473790 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7E620E9F9C900473790 /* main.m */; };
+ 8307E7E820E9F9C900473790 /* Renderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7BC20E9F9C700473790 /* Renderer.mm */; };
+ 8307E7E920E9F9C900473790 /* Renderer.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7BC20E9F9C700473790 /* Renderer.mm */; };
+ 836D2A2E20EE208E0098E909 /* imgui_impl_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 836D2A2D20EE208E0098E909 /* imgui_impl_osx.mm */; };
+ 836D2A3020EE4A180098E909 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 836D2A2F20EE4A180098E909 /* Default-568h@2x.png */; };
+ 836D2A3220EE4A900098E909 /* Launch Screen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 836D2A3120EE4A900098E909 /* Launch Screen.storyboard */; };
+ 83BBE9DE20EB3FFC00295997 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7E620E9F9C900473790 /* main.m */; };
+ 83BBE9DF20EB40AE00295997 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7DD20E9F9C900473790 /* AppDelegate.m */; };
+ 83BBE9E020EB42D000295997 /* ViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 8307E7CB20E9F9C900473790 /* ViewController.mm */; };
+ 83BBE9E520EB46B900295997 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E420EB46B900295997 /* Metal.framework */; };
+ 83BBE9E720EB46BD00295997 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E620EB46BD00295997 /* MetalKit.framework */; };
+ 83BBE9E920EB46C100295997 /* ModelIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9E820EB46C100295997 /* ModelIO.framework */; };
+ 83BBE9EC20EB471700295997 /* MetalKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EA20EB471700295997 /* MetalKit.framework */; };
+ 83BBE9ED20EB471700295997 /* Metal.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EB20EB471700295997 /* Metal.framework */; };
+ 83BBE9EF20EB471C00295997 /* ModelIO.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 83BBE9EE20EB471C00295997 /* ModelIO.framework */; };
+ 83BBE9FE20EB54D800295997 /* imgui_impl_metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83BBE9FD20EB54D800295997 /* imgui_impl_metal.mm */; };
+ 83BBE9FF20EB54D800295997 /* imgui_impl_metal.mm in Sources */ = {isa = PBXBuildFile; fileRef = 83BBE9FD20EB54D800295997 /* imgui_impl_metal.mm */; };
+ 83BBEA0520EB54E700295997 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0120EB54E700295997 /* imgui_draw.cpp */; };
+ 83BBEA0620EB54E700295997 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0120EB54E700295997 /* imgui_draw.cpp */; };
+ 83BBEA0720EB54E700295997 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0220EB54E700295997 /* imgui_demo.cpp */; };
+ 83BBEA0820EB54E700295997 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0220EB54E700295997 /* imgui_demo.cpp */; };
+ 83BBEA0920EB54E700295997 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0320EB54E700295997 /* imgui.cpp */; };
+ 83BBEA0A20EB54E700295997 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 83BBEA0320EB54E700295997 /* imgui.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 07A82ED62139413C0078D120 /* imgui_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_internal.h; path = ../../imgui_internal.h; sourceTree = ""; };
+ 07A82ED72139413C0078D120 /* imgui_widgets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_widgets.cpp; path = ../../imgui_widgets.cpp; sourceTree = ""; };
+ 8307E7BB20E9F9C700473790 /* Renderer.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Renderer.h; sourceTree = ""; };
+ 8307E7BC20E9F9C700473790 /* Renderer.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = Renderer.mm; sourceTree = ""; };
+ 8307E7C420E9F9C900473790 /* example_apple_metal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_apple_metal.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8307E7CA20E9F9C900473790 /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
+ 8307E7CB20E9F9C900473790 /* ViewController.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = ViewController.mm; sourceTree = ""; };
+ 8307E7CE20E9F9C900473790 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 8307E7D320E9F9C900473790 /* Info-iOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-iOS.plist"; sourceTree = ""; };
+ 8307E7DA20E9F9C900473790 /* example_apple_metal.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = example_apple_metal.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 8307E7DC20E9F9C900473790 /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
+ 8307E7DD20E9F9C900473790 /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
+ 8307E7E320E9F9C900473790 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 8307E7E520E9F9C900473790 /* Info-macOS.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Info-macOS.plist"; sourceTree = ""; };
+ 8307E7E620E9F9C900473790 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
+ 836D2A2C20EE208D0098E909 /* imgui_impl_osx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_osx.h; path = ../../imgui_impl_osx.h; sourceTree = ""; };
+ 836D2A2D20EE208E0098E909 /* imgui_impl_osx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_osx.mm; path = ../../imgui_impl_osx.mm; sourceTree = ""; };
+ 836D2A2F20EE4A180098E909 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; };
+ 836D2A3120EE4A900098E909 /* Launch Screen.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = "Launch Screen.storyboard"; sourceTree = ""; };
+ 83BBE9E420EB46B900295997 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/Metal.framework; sourceTree = DEVELOPER_DIR; };
+ 83BBE9E620EB46BD00295997 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/MetalKit.framework; sourceTree = DEVELOPER_DIR; };
+ 83BBE9E820EB46C100295997 /* ModelIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModelIO.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS11.4.sdk/System/Library/Frameworks/ModelIO.framework; sourceTree = DEVELOPER_DIR; };
+ 83BBE9EA20EB471700295997 /* MetalKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MetalKit.framework; path = System/Library/Frameworks/MetalKit.framework; sourceTree = SDKROOT; };
+ 83BBE9EB20EB471700295997 /* Metal.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Metal.framework; path = System/Library/Frameworks/Metal.framework; sourceTree = SDKROOT; };
+ 83BBE9EE20EB471C00295997 /* ModelIO.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ModelIO.framework; path = System/Library/Frameworks/ModelIO.framework; sourceTree = SDKROOT; };
+ 83BBE9FC20EB54D800295997 /* imgui_impl_metal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_metal.h; path = ../../imgui_impl_metal.h; sourceTree = ""; };
+ 83BBE9FD20EB54D800295997 /* imgui_impl_metal.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_metal.mm; path = ../../imgui_impl_metal.mm; sourceTree = ""; };
+ 83BBEA0020EB54E700295997 /* imgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui.h; path = ../../imgui.h; sourceTree = ""; };
+ 83BBEA0120EB54E700295997 /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
+ 83BBEA0220EB54E700295997 /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../imgui_demo.cpp; sourceTree = ""; };
+ 83BBEA0320EB54E700295997 /* imgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui.cpp; path = ../../imgui.cpp; sourceTree = ""; };
+ 83BBEA0420EB54E700295997 /* imconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imconfig.h; path = ../../imconfig.h; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8307E7C120E9F9C900473790 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 83BBE9E920EB46C100295997 /* ModelIO.framework in Frameworks */,
+ 83BBE9E720EB46BD00295997 /* MetalKit.framework in Frameworks */,
+ 83BBE9E520EB46B900295997 /* Metal.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8307E7D720E9F9C900473790 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 83BBE9EF20EB471C00295997 /* ModelIO.framework in Frameworks */,
+ 83BBE9EC20EB471700295997 /* MetalKit.framework in Frameworks */,
+ 83BBE9ED20EB471700295997 /* Metal.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 8307E7B520E9F9C700473790 = {
+ isa = PBXGroup;
+ children = (
+ 83BBE9F020EB544400295997 /* imgui */,
+ 8307E7BA20E9F9C700473790 /* Shared */,
+ 8307E7C620E9F9C900473790 /* iOS */,
+ 8307E7DB20E9F9C900473790 /* macOS */,
+ 8307E7C520E9F9C900473790 /* Products */,
+ 83BBE9E320EB46B800295997 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 8307E7BA20E9F9C700473790 /* Shared */ = {
+ isa = PBXGroup;
+ children = (
+ 83BBE9FC20EB54D800295997 /* imgui_impl_metal.h */,
+ 83BBE9FD20EB54D800295997 /* imgui_impl_metal.mm */,
+ 836D2A2C20EE208D0098E909 /* imgui_impl_osx.h */,
+ 836D2A2D20EE208E0098E909 /* imgui_impl_osx.mm */,
+ 8307E7DC20E9F9C900473790 /* AppDelegate.h */,
+ 8307E7DD20E9F9C900473790 /* AppDelegate.m */,
+ 8307E7BB20E9F9C700473790 /* Renderer.h */,
+ 8307E7BC20E9F9C700473790 /* Renderer.mm */,
+ 8307E7CA20E9F9C900473790 /* ViewController.h */,
+ 8307E7CB20E9F9C900473790 /* ViewController.mm */,
+ 8307E7E620E9F9C900473790 /* main.m */,
+ );
+ path = Shared;
+ sourceTree = "";
+ };
+ 8307E7C520E9F9C900473790 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8307E7C420E9F9C900473790 /* example_apple_metal.app */,
+ 8307E7DA20E9F9C900473790 /* example_apple_metal.app */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 8307E7C620E9F9C900473790 /* iOS */ = {
+ isa = PBXGroup;
+ children = (
+ 836D2A2F20EE4A180098E909 /* Default-568h@2x.png */,
+ 8307E7CD20E9F9C900473790 /* Main.storyboard */,
+ 8307E7D320E9F9C900473790 /* Info-iOS.plist */,
+ 836D2A3120EE4A900098E909 /* Launch Screen.storyboard */,
+ );
+ path = iOS;
+ sourceTree = "";
+ };
+ 8307E7DB20E9F9C900473790 /* macOS */ = {
+ isa = PBXGroup;
+ children = (
+ 8307E7E220E9F9C900473790 /* Main.storyboard */,
+ 8307E7E520E9F9C900473790 /* Info-macOS.plist */,
+ );
+ path = macOS;
+ sourceTree = "";
+ };
+ 83BBE9E320EB46B800295997 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 83BBE9EE20EB471C00295997 /* ModelIO.framework */,
+ 83BBE9EB20EB471700295997 /* Metal.framework */,
+ 83BBE9EA20EB471700295997 /* MetalKit.framework */,
+ 83BBE9E820EB46C100295997 /* ModelIO.framework */,
+ 83BBE9E620EB46BD00295997 /* MetalKit.framework */,
+ 83BBE9E420EB46B900295997 /* Metal.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+ 83BBE9F020EB544400295997 /* imgui */ = {
+ isa = PBXGroup;
+ children = (
+ 83BBEA0420EB54E700295997 /* imconfig.h */,
+ 83BBEA0320EB54E700295997 /* imgui.cpp */,
+ 83BBEA0020EB54E700295997 /* imgui.h */,
+ 83BBEA0220EB54E700295997 /* imgui_demo.cpp */,
+ 83BBEA0120EB54E700295997 /* imgui_draw.cpp */,
+ 07A82ED62139413C0078D120 /* imgui_internal.h */,
+ 07A82ED72139413C0078D120 /* imgui_widgets.cpp */,
+ );
+ name = imgui;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8307E7C320E9F9C900473790 /* example_apple_metal_ios */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 8307E7F020E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_ios" */;
+ buildPhases = (
+ 8307E7C020E9F9C900473790 /* Sources */,
+ 8307E7C120E9F9C900473790 /* Frameworks */,
+ 8307E7C220E9F9C900473790 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = example_apple_metal_ios;
+ productName = "imguiex iOS";
+ productReference = 8307E7C420E9F9C900473790 /* example_apple_metal.app */;
+ productType = "com.apple.product-type.application";
+ };
+ 8307E7D920E9F9C900473790 /* example_apple_metal_macos */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 8307E7F320E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_macos" */;
+ buildPhases = (
+ 8307E7D620E9F9C900473790 /* Sources */,
+ 8307E7D720E9F9C900473790 /* Frameworks */,
+ 8307E7D820E9F9C900473790 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = example_apple_metal_macos;
+ productName = "imguiex macOS";
+ productReference = 8307E7DA20E9F9C900473790 /* example_apple_metal.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 8307E7B620E9F9C700473790 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0940;
+ ORGANIZATIONNAME = "Warren Moore";
+ TargetAttributes = {
+ 8307E7C320E9F9C900473790 = {
+ CreatedOnToolsVersion = 9.4.1;
+ };
+ 8307E7D920E9F9C900473790 = {
+ CreatedOnToolsVersion = 9.4.1;
+ };
+ };
+ };
+ buildConfigurationList = 8307E7B920E9F9C700473790 /* Build configuration list for PBXProject "example_apple_metal" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 8307E7B520E9F9C700473790;
+ productRefGroup = 8307E7C520E9F9C900473790 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8307E7C320E9F9C900473790 /* example_apple_metal_ios */,
+ 8307E7D920E9F9C900473790 /* example_apple_metal_macos */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8307E7C220E9F9C900473790 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 836D2A3220EE4A900098E909 /* Launch Screen.storyboard in Resources */,
+ 8307E7CF20E9F9C900473790 /* Main.storyboard in Resources */,
+ 836D2A3020EE4A180098E909 /* Default-568h@2x.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8307E7D820E9F9C900473790 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8307E7E420E9F9C900473790 /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8307E7C020E9F9C900473790 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8307E7E820E9F9C900473790 /* Renderer.mm in Sources */,
+ 8307E7CC20E9F9C900473790 /* ViewController.mm in Sources */,
+ 83BBEA0520EB54E700295997 /* imgui_draw.cpp in Sources */,
+ 83BBE9DF20EB40AE00295997 /* AppDelegate.m in Sources */,
+ 83BBEA0920EB54E700295997 /* imgui.cpp in Sources */,
+ 83BBEA0720EB54E700295997 /* imgui_demo.cpp in Sources */,
+ 83BBE9FE20EB54D800295997 /* imgui_impl_metal.mm in Sources */,
+ 07A82ED82139413D0078D120 /* imgui_widgets.cpp in Sources */,
+ 83BBE9DE20EB3FFC00295997 /* main.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 8307E7D620E9F9C900473790 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 83BBE9E020EB42D000295997 /* ViewController.mm in Sources */,
+ 8307E7E920E9F9C900473790 /* Renderer.mm in Sources */,
+ 83BBEA0620EB54E700295997 /* imgui_draw.cpp in Sources */,
+ 07A82ED92139418F0078D120 /* imgui_widgets.cpp in Sources */,
+ 8307E7E720E9F9C900473790 /* main.m in Sources */,
+ 83BBEA0A20EB54E700295997 /* imgui.cpp in Sources */,
+ 83BBEA0820EB54E700295997 /* imgui_demo.cpp in Sources */,
+ 83BBE9FF20EB54D800295997 /* imgui_impl_metal.mm in Sources */,
+ 836D2A2E20EE208E0098E909 /* imgui_impl_osx.mm in Sources */,
+ 8307E7DE20E9F9C900473790 /* AppDelegate.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 8307E7CD20E9F9C900473790 /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 8307E7CE20E9F9C900473790 /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 8307E7E220E9F9C900473790 /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 8307E7E320E9F9C900473790 /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 8307E7EE20E9F9C900473790 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ };
+ name = Debug;
+ };
+ 8307E7EF20E9F9C900473790 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ };
+ name = Release;
+ };
+ 8307E7F120E9F9C900473790 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_STYLE = Automatic;
+ DEVELOPMENT_TEAM = "";
+ INFOPLIST_FILE = "$(SRCROOT)/iOS/Info-iOS.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-ios";
+ PRODUCT_NAME = example_apple_metal;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 8307E7F220E9F9C900473790 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_IDENTITY = "iPhone Developer";
+ CODE_SIGN_STYLE = Automatic;
+ DEVELOPMENT_TEAM = "";
+ INFOPLIST_FILE = "$(SRCROOT)/iOS/Info-iOS.plist";
+ IPHONEOS_DEPLOYMENT_TARGET = 10.0;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-ios";
+ PRODUCT_NAME = example_apple_metal;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 8307E7F420E9F9C900473790 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_IDENTITY = "-";
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ DEVELOPMENT_TEAM = "";
+ INFOPLIST_FILE = "$(SRCROOT)/macOS/Info-macOS.plist";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
+ PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-macos";
+ PRODUCT_NAME = example_apple_metal;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 8307E7F520E9F9C900473790 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_IDENTITY = "-";
+ CODE_SIGN_STYLE = Automatic;
+ COMBINE_HIDPI_IMAGES = YES;
+ DEVELOPMENT_TEAM = "";
+ INFOPLIST_FILE = "$(SRCROOT)/macOS/Info-macOS.plist";
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/../Frameworks",
+ );
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
+ PRODUCT_BUNDLE_IDENTIFIER = "org.imgui.example.apple-metal-macos";
+ PRODUCT_NAME = example_apple_metal;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 8307E7B920E9F9C700473790 /* Build configuration list for PBXProject "example_apple_metal" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8307E7EE20E9F9C900473790 /* Debug */,
+ 8307E7EF20E9F9C900473790 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 8307E7F020E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_ios" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8307E7F120E9F9C900473790 /* Debug */,
+ 8307E7F220E9F9C900473790 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 8307E7F320E9F9C900473790 /* Build configuration list for PBXNativeTarget "example_apple_metal_macos" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 8307E7F420E9F9C900473790 /* Debug */,
+ 8307E7F520E9F9C900473790 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 8307E7B620E9F9C700473790 /* Project object */;
+}
diff --git a/3rdparty/imgui/examples/example_apple_metal/iOS/Base.lproj/Main.storyboard b/3rdparty/imgui/examples/example_apple_metal/iOS/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..24a4009e
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/iOS/Base.lproj/Main.storyboard
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png b/3rdparty/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png
new file mode 100644
index 00000000..e3ce940a
Binary files /dev/null and b/3rdparty/imgui/examples/example_apple_metal/iOS/Default-568h@2x.png differ
diff --git a/3rdparty/imgui/examples/example_apple_metal/iOS/Info-iOS.plist b/3rdparty/imgui/examples/example_apple_metal/iOS/Info-iOS.plist
new file mode 100644
index 00000000..8d919d1e
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/iOS/Info-iOS.plist
@@ -0,0 +1,51 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ imgui
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ Launch Screen
+ UIMainStoryboardFile
+ Main
+ UIRequiredDeviceCapabilities
+
+ armv7
+ metal
+
+ UIRequiresFullScreen
+
+ UIStatusBarHidden
+
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+ UIInterfaceOrientationPortraitUpsideDown
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/iOS/Launch Screen.storyboard b/3rdparty/imgui/examples/example_apple_metal/iOS/Launch Screen.storyboard
new file mode 100644
index 00000000..96047e1f
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/iOS/Launch Screen.storyboard
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/macOS/Base.lproj/Main.storyboard b/3rdparty/imgui/examples/example_apple_metal/macOS/Base.lproj/Main.storyboard
new file mode 100644
index 00000000..cf414617
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/macOS/Base.lproj/Main.storyboard
@@ -0,0 +1,130 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/3rdparty/imgui/examples/example_apple_metal/macOS/Info-macOS.plist b/3rdparty/imgui/examples/example_apple_metal/macOS/Info-macOS.plist
new file mode 100644
index 00000000..52d99204
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_metal/macOS/Info-macOS.plist
@@ -0,0 +1,32 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIconFile
+
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ imgui
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ 1.0
+ CFBundleVersion
+ 1
+ LSMinimumSystemVersion
+ $(MACOSX_DEPLOYMENT_TARGET)
+ NSHumanReadableCopyright
+ Copyright © 2018 Warren Moore. All rights reserved.
+ NSMainStoryboardFile
+ Main
+ NSPrincipalClass
+ NSApplication
+
+
diff --git a/3rdparty/imgui/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj b/3rdparty/imgui/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj
new file mode 100644
index 00000000..514c6808
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj
@@ -0,0 +1,329 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 48;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 07A82EDB213941D00078D120 /* imgui_widgets.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 07A82EDA213941D00078D120 /* imgui_widgets.cpp */; };
+ 4080A99820B02D340036BA46 /* main.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4080A98A20B02CD90036BA46 /* main.mm */; };
+ 4080A9A220B034280036BA46 /* imgui_impl_opengl2.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */; };
+ 4080A9AD20B0343C0036BA46 /* imgui_demo.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */; };
+ 4080A9AE20B0343C0036BA46 /* imgui.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9A720B0343C0036BA46 /* imgui.cpp */; };
+ 4080A9AF20B0343C0036BA46 /* imgui_draw.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */; };
+ 4080A9B020B0347A0036BA46 /* imgui_impl_osx.mm in Sources */ = {isa = PBXBuildFile; fileRef = 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */; };
+ 4080A9B320B034E40036BA46 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4080A9B220B034E40036BA46 /* Cocoa.framework */; };
+ 4080A9B520B034EA0036BA46 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 4080A9B420B034EA0036BA46 /* OpenGL.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 4080A96920B029B00036BA46 /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = /usr/share/man/man1/;
+ dstSubfolderSpec = 0;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 1;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 07A82EDA213941D00078D120 /* imgui_widgets.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_widgets.cpp; path = ../../imgui_widgets.cpp; sourceTree = ""; };
+ 4080A96B20B029B00036BA46 /* example_osx_opengl2 */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.executable"; includeInIndex = 0; path = example_osx_opengl2; sourceTree = BUILT_PRODUCTS_DIR; };
+ 4080A98A20B02CD90036BA46 /* main.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = main.mm; sourceTree = SOURCE_ROOT; };
+ 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_impl_opengl2.cpp; path = ../imgui_impl_opengl2.cpp; sourceTree = ""; };
+ 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = imgui_impl_osx.mm; path = ../imgui_impl_osx.mm; sourceTree = ""; };
+ 4080A9A020B034280036BA46 /* imgui_impl_opengl2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_opengl2.h; path = ../imgui_impl_opengl2.h; sourceTree = ""; };
+ 4080A9A120B034280036BA46 /* imgui_impl_osx.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_impl_osx.h; path = ../imgui_impl_osx.h; sourceTree = ""; };
+ 4080A9A420B0343C0036BA46 /* stb_truetype.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stb_truetype.h; path = ../../stb_truetype.h; sourceTree = ""; };
+ 4080A9A520B0343C0036BA46 /* imgui_internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui_internal.h; path = ../../imgui_internal.h; sourceTree = ""; };
+ 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_demo.cpp; path = ../../imgui_demo.cpp; sourceTree = ""; };
+ 4080A9A720B0343C0036BA46 /* imgui.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui.cpp; path = ../../imgui.cpp; sourceTree = ""; };
+ 4080A9A820B0343C0036BA46 /* imgui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imgui.h; path = ../../imgui.h; sourceTree = ""; };
+ 4080A9A920B0343C0036BA46 /* stb_rect_pack.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stb_rect_pack.h; path = ../../stb_rect_pack.h; sourceTree = ""; };
+ 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = imgui_draw.cpp; path = ../../imgui_draw.cpp; sourceTree = ""; };
+ 4080A9AB20B0343C0036BA46 /* stb_textedit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = stb_textedit.h; path = ../../stb_textedit.h; sourceTree = ""; };
+ 4080A9AC20B0343C0036BA46 /* imconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = imconfig.h; path = ../../imconfig.h; sourceTree = ""; };
+ 4080A9B220B034E40036BA46 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ 4080A9B420B034EA0036BA46 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 4080A96820B029B00036BA46 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4080A9B520B034EA0036BA46 /* OpenGL.framework in Frameworks */,
+ 4080A9B320B034E40036BA46 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 4080A96220B029B00036BA46 = {
+ isa = PBXGroup;
+ children = (
+ 4080A9AC20B0343C0036BA46 /* imconfig.h */,
+ 4080A9A720B0343C0036BA46 /* imgui.cpp */,
+ 4080A9A820B0343C0036BA46 /* imgui.h */,
+ 07A82EDA213941D00078D120 /* imgui_widgets.cpp */,
+ 4080A9A620B0343C0036BA46 /* imgui_demo.cpp */,
+ 4080A9AA20B0343C0036BA46 /* imgui_draw.cpp */,
+ 4080A9A520B0343C0036BA46 /* imgui_internal.h */,
+ 4080A9A920B0343C0036BA46 /* stb_rect_pack.h */,
+ 4080A9AB20B0343C0036BA46 /* stb_textedit.h */,
+ 4080A9A420B0343C0036BA46 /* stb_truetype.h */,
+ 4080A99E20B034280036BA46 /* imgui_impl_opengl2.cpp */,
+ 4080A9A020B034280036BA46 /* imgui_impl_opengl2.h */,
+ 4080A9A120B034280036BA46 /* imgui_impl_osx.h */,
+ 4080A99F20B034280036BA46 /* imgui_impl_osx.mm */,
+ 4080A98A20B02CD90036BA46 /* main.mm */,
+ 4080A96C20B029B00036BA46 /* Products */,
+ 4080A9B120B034E40036BA46 /* Frameworks */,
+ );
+ sourceTree = "";
+ };
+ 4080A96C20B029B00036BA46 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 4080A96B20B029B00036BA46 /* example_osx_opengl2 */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 4080A9B120B034E40036BA46 /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 4080A9B420B034EA0036BA46 /* OpenGL.framework */,
+ 4080A9B220B034E40036BA46 /* Cocoa.framework */,
+ );
+ name = Frameworks;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 4080A96A20B029B00036BA46 /* example_osx_opengl2 */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 4080A97220B029B00036BA46 /* Build configuration list for PBXNativeTarget "example_osx_opengl2" */;
+ buildPhases = (
+ 4080A96720B029B00036BA46 /* Sources */,
+ 4080A96820B029B00036BA46 /* Frameworks */,
+ 4080A96920B029B00036BA46 /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = example_osx_opengl2;
+ productName = example_osx_opengl2;
+ productReference = 4080A96B20B029B00036BA46 /* example_osx_opengl2 */;
+ productType = "com.apple.product-type.tool";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 4080A96320B029B00036BA46 /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0930;
+ ORGANIZATIONNAME = ImGui;
+ TargetAttributes = {
+ 4080A96A20B029B00036BA46 = {
+ CreatedOnToolsVersion = 9.3.1;
+ };
+ };
+ };
+ buildConfigurationList = 4080A96620B029B00036BA46 /* Build configuration list for PBXProject "example_apple_opengl2" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = 4080A96220B029B00036BA46;
+ productRefGroup = 4080A96C20B029B00036BA46 /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 4080A96A20B029B00036BA46 /* example_osx_opengl2 */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 4080A96720B029B00036BA46 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 4080A99820B02D340036BA46 /* main.mm in Sources */,
+ 4080A9AD20B0343C0036BA46 /* imgui_demo.cpp in Sources */,
+ 4080A9AF20B0343C0036BA46 /* imgui_draw.cpp in Sources */,
+ 4080A9A220B034280036BA46 /* imgui_impl_opengl2.cpp in Sources */,
+ 4080A9B020B0347A0036BA46 /* imgui_impl_osx.mm in Sources */,
+ 4080A9AE20B0343C0036BA46 /* imgui.cpp in Sources */,
+ 07A82EDB213941D00078D120 /* imgui_widgets.cpp in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin XCBuildConfiguration section */
+ 4080A97020B029B00036BA46 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ 4080A97120B029B00036BA46 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_ENABLE_OBJC_WEAK = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ CODE_SIGN_IDENTITY = "-";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ GCC_C_LANGUAGE_STANDARD = gnu11;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.13;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ 4080A97320B029B00036BA46 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SYSTEM_HEADER_SEARCH_PATHS = ../libs/gl3w;
+ USER_HEADER_SEARCH_PATHS = ../..;
+ };
+ name = Debug;
+ };
+ 4080A97420B029B00036BA46 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ CODE_SIGN_STYLE = Automatic;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SYSTEM_HEADER_SEARCH_PATHS = ../libs/gl3w;
+ USER_HEADER_SEARCH_PATHS = ../..;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 4080A96620B029B00036BA46 /* Build configuration list for PBXProject "example_apple_opengl2" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4080A97020B029B00036BA46 /* Debug */,
+ 4080A97120B029B00036BA46 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 4080A97220B029B00036BA46 /* Build configuration list for PBXNativeTarget "example_osx_opengl2" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 4080A97320B029B00036BA46 /* Debug */,
+ 4080A97420B029B00036BA46 /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 4080A96320B029B00036BA46 /* Project object */;
+}
diff --git a/3rdparty/imgui/examples/example_apple_opengl2/main.mm b/3rdparty/imgui/examples/example_apple_opengl2/main.mm
new file mode 100644
index 00000000..5eb8b19b
--- /dev/null
+++ b/3rdparty/imgui/examples/example_apple_opengl2/main.mm
@@ -0,0 +1,281 @@
+// dear imgui: standalone example application for OSX + OpenGL2, using legacy fixed pipeline
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include "imgui.h"
+#include "../imgui_impl_osx.h"
+#include "../imgui_impl_opengl2.h"
+#include
+#import
+#import
+#import
+
+//-----------------------------------------------------------------------------------
+// ImGuiExampleView
+//-----------------------------------------------------------------------------------
+
+@interface ImGuiExampleView : NSOpenGLView
+{
+ NSTimer* animationTimer;
+}
+@end
+
+@implementation ImGuiExampleView
+
+-(void)animationTimerFired:(NSTimer*)timer
+{
+ [self setNeedsDisplay:YES];
+}
+
+-(void)prepareOpenGL
+{
+ [super prepareOpenGL];
+
+#ifndef DEBUG
+ GLint swapInterval = 1;
+ [[self openGLContext] setValues:&swapInterval forParameter:NSOpenGLCPSwapInterval];
+ if (swapInterval == 0)
+ NSLog(@"Error: Cannot set swap interval.");
+#endif
+}
+
+-(void)updateAndDrawDemoView
+{
+ // Start the Dear ImGui frame
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplOSX_NewFrame(self);
+ ImGui::NewFrame();
+
+ // Global data for the demo
+ static bool show_demo_window = true;
+ static bool show_another_window = false;
+ static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ [[self openGLContext] makeCurrentContext];
+
+ ImGuiIO& io = ImGui::GetIO();
+ GLsizei width = (GLsizei)(io.DisplaySize.x * io.DisplayFramebufferScale.x);
+ GLsizei height = (GLsizei)(io.DisplaySize.y * io.DisplayFramebufferScale.y);
+ glViewport(0, 0, width, height);
+
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ // Present
+ [[self openGLContext] flushBuffer];
+
+ if (!animationTimer)
+ animationTimer = [NSTimer scheduledTimerWithTimeInterval:0.017 target:self selector:@selector(animationTimerFired:) userInfo:nil repeats:YES];
+}
+
+-(void)reshape
+{
+ [[self openGLContext] update];
+ [self updateAndDrawDemoView];
+}
+
+-(void)drawRect:(NSRect)bounds
+{
+ [self updateAndDrawDemoView];
+}
+
+-(BOOL)acceptsFirstResponder
+{
+ return (YES);
+}
+
+-(BOOL)becomeFirstResponder
+{
+ return (YES);
+}
+
+-(BOOL)resignFirstResponder
+{
+ return (YES);
+}
+
+// Flip coordinate system upside down on Y
+-(BOOL)isFlipped
+{
+ return (YES);
+}
+
+-(void)dealloc
+{
+ animationTimer = nil;
+}
+
+// Forward Mouse/Keyboard events to dear imgui OSX back-end. It returns true when imgui is expecting to use the event.
+-(void)keyUp:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event, self); }
+-(void)keyDown:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event, self); }
+-(void)flagsChanged:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event, self); }
+-(void)mouseDown:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event, self); }
+-(void)mouseUp:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event, self); }
+-(void)scrollWheel:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event, self); }
+
+@end
+
+//-----------------------------------------------------------------------------------
+// ImGuiExampleAppDelegate
+//-----------------------------------------------------------------------------------
+
+@interface ImGuiExampleAppDelegate : NSObject
+@property (nonatomic, readonly) NSWindow* window;
+@end
+
+@implementation ImGuiExampleAppDelegate
+@synthesize window = _window;
+
+-(BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)theApplication
+{
+ return YES;
+}
+
+-(NSWindow*)window
+{
+ if (_window != nil)
+ return (_window);
+
+ NSRect viewRect = NSMakeRect(100.0, 100.0, 100.0 + 1280.0, 100 + 720.0);
+
+ _window = [[NSWindow alloc] initWithContentRect:viewRect styleMask:NSWindowStyleMaskTitled|NSWindowStyleMaskMiniaturizable|NSWindowStyleMaskResizable|NSWindowStyleMaskClosable backing:NSBackingStoreBuffered defer:YES];
+ [_window setTitle:@"Dear ImGui OSX+OpenGL2 Example"];
+ [_window setOpaque:YES];
+ [_window makeKeyAndOrderFront:NSApp];
+
+ return (_window);
+}
+
+-(void)setupMenu
+{
+ NSMenu* mainMenuBar = [[NSMenu alloc] init];
+ NSMenu* appMenu;
+ NSMenuItem* menuItem;
+
+ appMenu = [[NSMenu alloc] initWithTitle:@"Dear ImGui OSX+OpenGL2 Example"];
+ menuItem = [appMenu addItemWithTitle:@"Quit Dear ImGui OSX+OpenGL2 Example" action:@selector(terminate:) keyEquivalent:@"q"];
+ [menuItem setKeyEquivalentModifierMask:NSEventModifierFlagCommand];
+
+ menuItem = [[NSMenuItem alloc] init];
+ [menuItem setSubmenu:appMenu];
+
+ [mainMenuBar addItem:menuItem];
+
+ appMenu = nil;
+ [NSApp setMainMenu:mainMenuBar];
+}
+
+-(void)dealloc
+{
+ _window = nil;
+}
+
+-(void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ // Make the application a foreground application (else it won't receive keyboard events)
+ ProcessSerialNumber psn = {0, kCurrentProcess};
+ TransformProcessType(&psn, kProcessTransformToForegroundApplication);
+
+ // Menu
+ [self setupMenu];
+
+ NSOpenGLPixelFormatAttribute attrs[] =
+ {
+ NSOpenGLPFADoubleBuffer,
+ NSOpenGLPFADepthSize, 32,
+ 0
+ };
+
+ NSOpenGLPixelFormat* format = [[NSOpenGLPixelFormat alloc] initWithAttributes:attrs];
+ ImGuiExampleView* view = [[ImGuiExampleView alloc] initWithFrame:self.window.frame pixelFormat:format];
+ format = nil;
+#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
+ [view setWantsBestResolutionOpenGLSurface:YES];
+#endif // MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ [self.window setContentView:view];
+
+ if ([view openGLContext] == nil)
+ NSLog(@"No OpenGL Context!");
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplOSX_Init();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+}
+
+@end
+
+int main(int argc, const char* argv[])
+{
+ @autoreleasepool
+ {
+ NSApp = [NSApplication sharedApplication];
+ ImGuiExampleAppDelegate* delegate = [[ImGuiExampleAppDelegate alloc] init];
+ [[NSApplication sharedApplication] setDelegate:delegate];
+ [NSApp run];
+ }
+ return NSApplicationMain(argc, argv);
+}
diff --git a/3rdparty/imgui/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj b/3rdparty/imgui/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
new file mode 100644
index 00000000..e3bd4176
--- /dev/null
+++ b/3rdparty/imgui/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {F90D0333-5FB1-440D-918D-DD39A1B5187E}
+ example_freeglut_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ $(GLUT_INCLUDE_DIR);..\..;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(GLUT_ROOT_PATH)/lib/x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;freeglut.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters b/3rdparty/imgui/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
new file mode 100644
index 00000000..eb6d8526
--- /dev/null
+++ b/3rdparty/imgui/examples/example_freeglut_opengl2/example_freeglut_opengl2.vcxproj.filters
@@ -0,0 +1,58 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_freeglut_opengl2/main.cpp b/3rdparty/imgui/examples/example_freeglut_opengl2/main.cpp
new file mode 100644
index 00000000..d57ee07f
--- /dev/null
+++ b/3rdparty/imgui/examples/example_freeglut_opengl2/main.cpp
@@ -0,0 +1,134 @@
+// dear imgui: standalone example application for FreeGLUT + OpenGL2, using legacy fixed pipeline
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (Using GLUT or FreeGLUT is not recommended unless you really miss the 90's)
+
+#include "imgui.h"
+#include "../imgui_impl_freeglut.h"
+#include "../imgui_impl_opengl2.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed
+#endif
+
+static bool show_demo_window = true;
+static bool show_another_window = false;
+static ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+void my_display_code()
+{
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+}
+
+void glut_display_func()
+{
+ // Start the Dear ImGui frame
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplFreeGLUT_NewFrame();
+
+ my_display_code();
+
+ // Rendering
+ ImGui::Render();
+ ImGuiIO& io = ImGui::GetIO();
+ glViewport(0, 0, (GLsizei)io.DisplaySize.x, (GLsizei)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glutSwapBuffers();
+ glutPostRedisplay();
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+
+int main(int argc, char** argv)
+{
+ // Create GLUT window
+ glutInit(&argc, argv);
+ glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE, GLUT_ACTION_GLUTMAINLOOP_RETURNS);
+ glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GLUT_MULTISAMPLE);
+ glutInitWindowSize(1280, 720);
+ glutCreateWindow("Dear ImGui FreeGLUT+OpenGL2 Example");
+
+ // Setup GLUT display function
+ // We will also call ImGui_ImplFreeGLUT_InstallFuncs() to get all the other functions installed for us,
+ // otherwise it is possible to install our own functions and call the imgui_impl_freeglut.h functions ourselves.
+ glutDisplayFunc(glut_display_func);
+
+ // Setup Dear ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplFreeGLUT_Init();
+ ImGui_ImplFreeGLUT_InstallFuncs();
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ glutMainLoop();
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplFreeGLUT_Shutdown();
+ ImGui::DestroyContext();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_glfw_opengl2/build_win32.bat b/3rdparty/imgui/examples/example_glfw_opengl2/build_win32.bat
new file mode 100644
index 00000000..538d9a52
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl2/build_win32.bat
@@ -0,0 +1,3 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_opengl2.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/3rdparty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj b/3rdparty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
new file mode 100644
index 00000000..73c7ba9d
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {9CDA7840-B7A5-496D-A527-E95571496D18}
+ example_glfw_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters b/3rdparty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters
new file mode 100644
index 00000000..b7a37e68
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl2/example_glfw_opengl2.vcxproj.filters
@@ -0,0 +1,58 @@
+
+
+
+
+ {c336cfe3-f0c4-464c-9ef0-a9e17a7ff222}
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_glfw_opengl2/main.cpp b/3rdparty/imgui/examples/example_glfw_opengl2/main.cpp
new file mode 100644
index 00000000..e6e53c82
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl2/main.cpp
@@ -0,0 +1,140 @@
+// dear imgui: standalone example application for GLFW + OpenGL2, using legacy fixed pipeline
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
+
+// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
+// **Prefer using the code in the example_glfw_opengl2/ folder**
+// See imgui_impl_glfw.cpp for details.
+
+#include "imgui.h"
+#include "imgui_impl_glfw.h"
+#include "imgui_impl_opengl2.h"
+#include
+#include
+
+static void glfw_error_callback(int error, const char* description)
+{
+ fprintf(stderr, "Glfw Error %d: %s\n", error, description);
+}
+
+int main(int, char**)
+{
+ // Setup window
+ glfwSetErrorCallback(glfw_error_callback);
+ if (!glfwInit())
+ return 1;
+ GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL2 example", NULL, NULL);
+ if (window == NULL)
+ return 1;
+ glfwMakeContextCurrent(window);
+ glfwSwapInterval(1); // Enable vsync
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
+
+ ImGui_ImplGlfw_InitForOpenGL(window, true);
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ while (!glfwWindowShouldClose(window))
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ glfwPollEvents();
+
+ // Start the Dear ImGui frame
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplGlfw_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ int display_w, display_h;
+ glfwGetFramebufferSize(window, &display_w, &display_h);
+ glViewport(0, 0, display_w, display_h);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound, but prefer using the GL3+ code.
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+
+ glfwMakeContextCurrent(window);
+ glfwSwapBuffers(window);
+ }
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplGlfw_Shutdown();
+ ImGui::DestroyContext();
+
+ glfwDestroyWindow(window);
+ glfwTerminate();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_glfw_opengl3/build_win32.bat b/3rdparty/imgui/examples/example_glfw_opengl3/build_win32.bat
new file mode 100644
index 00000000..e5c15c53
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl3/build_win32.bat
@@ -0,0 +1,3 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I ..\libs\gl3w *.cpp ..\imgui_impl_glfw.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_glfw_opengl3.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 glfw3.lib opengl32.lib gdi32.lib shell32.lib
diff --git a/3rdparty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj b/3rdparty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
new file mode 100644
index 00000000..172a34d8
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj
@@ -0,0 +1,178 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {4a1fb5ea-22f5-42a8-ab92-1d2df5d47fb9}
+ example_glfw_opengl3
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;$(SolutionDir)\libs\glfw\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;$(SolutionDir)\libs\glfw\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+
+
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\glfw\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;$(SolutionDir)\libs\glfw\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ $(SolutionDir)\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)
+ opengl32.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters b/3rdparty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters
new file mode 100644
index 00000000..efb570ce
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl3/example_glfw_opengl3.vcxproj.filters
@@ -0,0 +1,70 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {42f99867-3108-43b8-99d0-fabefaf1f2e3}
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ gl3w
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ gl3w
+
+
+ gl3w
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_glfw_opengl3/main.cpp b/3rdparty/imgui/examples/example_glfw_opengl3/main.cpp
new file mode 100644
index 00000000..f9b9b643
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_opengl3/main.cpp
@@ -0,0 +1,183 @@
+// dear imgui: standalone example application for GLFW + OpenGL 3, using programmable pipeline
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
+
+#include "imgui.h"
+#include "imgui_impl_glfw.h"
+#include "imgui_impl_opengl3.h"
+#include
+
+// About OpenGL function loaders: modern OpenGL doesn't have a standard header file and requires individual function pointers to be loaded manually.
+// Helper libraries are often used for this purpose! Here we are supporting a few common ones: gl3w, glew, glad.
+// You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own.
+#if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
+#include // Initialize with gl3wInit()
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
+#include // Initialize with glewInit()
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
+#include // Initialize with gladLoadGL()
+#else
+#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
+#endif
+
+#include // Include glfw3.h after our OpenGL definitions
+
+static void glfw_error_callback(int error, const char* description)
+{
+ fprintf(stderr, "Glfw Error %d: %s\n", error, description);
+}
+
+int main(int, char**)
+{
+ // Setup window
+ glfwSetErrorCallback(glfw_error_callback);
+ if (!glfwInit())
+ return 1;
+
+ // Decide GL+GLSL versions
+#if __APPLE__
+ // GL 3.2 + GLSL 150
+ const char* glsl_version = "#version 150";
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
+ glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
+ glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // Required on Mac
+#else
+ // GL 3.0 + GLSL 130
+ const char* glsl_version = "#version 130";
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
+ glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
+ //glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); // 3.2+ only
+ //glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE); // 3.0+ only
+#endif
+
+ // Create window with graphics context
+ GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+OpenGL3 example", NULL, NULL);
+ if (window == NULL)
+ return 1;
+ glfwMakeContextCurrent(window);
+ glfwSwapInterval(1); // Enable vsync
+
+ // Initialize OpenGL loader
+#if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
+ bool err = gl3wInit() != 0;
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
+ bool err = glewInit() != GLEW_OK;
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
+ bool err = gladLoadGL() != 0;
+#endif
+ if (err)
+ {
+ fprintf(stderr, "Failed to initialize OpenGL loader!\n");
+ return 1;
+ }
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
+
+ ImGui_ImplGlfw_InitForOpenGL(window, true);
+ ImGui_ImplOpenGL3_Init(glsl_version);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ while (!glfwWindowShouldClose(window))
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ glfwPollEvents();
+
+ // Start the Dear ImGui frame
+ ImGui_ImplOpenGL3_NewFrame();
+ ImGui_ImplGlfw_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ int display_w, display_h;
+ glfwMakeContextCurrent(window);
+ glfwGetFramebufferSize(window, &display_w, &display_h);
+ glViewport(0, 0, display_w, display_h);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
+
+ glfwMakeContextCurrent(window);
+ glfwSwapBuffers(window);
+ }
+
+ // Cleanup
+ ImGui_ImplOpenGL3_Shutdown();
+ ImGui_ImplGlfw_Shutdown();
+ ImGui::DestroyContext();
+
+ glfwDestroyWindow(window);
+ glfwTerminate();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt b/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt
new file mode 100644
index 00000000..82d7ab47
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/CMakeLists.txt
@@ -0,0 +1,36 @@
+cmake_minimum_required(VERSION 2.8)
+project(imgui_example_glfw_vulkan C CXX)
+
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Debug CACHE STRING "" FORCE)
+endif()
+
+set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DVK_PROTOTYPES")
+set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DVK_PROTOTYPES")
+
+# GLFW
+set(GLFW_DIR ../../../glfw) # Set this to point to an up-to-date GLFW repo
+option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" OFF)
+option(GLFW_BUILD_TESTS "Build the GLFW test programs" OFF)
+option(GLFW_BUILD_DOCS "Build the GLFW documentation" OFF)
+option(GLFW_INSTALL "Generate installation target" OFF)
+option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
+add_subdirectory(${GLFW_DIR} binary_dir EXCLUDE_FROM_ALL)
+include_directories(${GLFW_DIR}/include)
+
+# ImGui
+set(IMGUI_DIR ../../)
+include_directories(${IMGUI_DIR} ..)
+
+# Libraries
+find_library(VULKAN_LIBRARY
+ NAMES vulkan vulkan-1)
+set(LIBRARIES "glfw;${VULKAN_LIBRARY}")
+
+# Use vulkan headers from glfw:
+include_directories(${GLFW_DIR}/deps)
+
+file(GLOB sources *.cpp)
+
+add_executable(example_glfw_vulkan ${sources} ${IMGUI_DIR}/examples/imgui_impl_glfw.cpp ${IMGUI_DIR}/examples/imgui_impl_vulkan.cpp ${IMGUI_DIR}/imgui.cpp ${IMGUI_DIR}/imgui_draw.cpp ${IMGUI_DIR}/imgui_demo.cpp ${IMGUI_DIR}/imgui_widgets.cpp)
+target_link_libraries(example_glfw_vulkan ${LIBRARIES})
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/build_win32.bat b/3rdparty/imgui/examples/example_glfw_vulkan/build_win32.bat
new file mode 100644
index 00000000..0d991b9d
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/build_win32.bat
@@ -0,0 +1,7 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib
+
+mkdir Release
+cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-32 /libpath:%VULKAN_SDK%\lib32 glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/build_win64.bat b/3rdparty/imgui/examples/example_glfw_vulkan/build_win64.bat
new file mode 100644
index 00000000..ddedf597
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/build_win64.bat
@@ -0,0 +1,7 @@
+@REM Build for Visual Studio compiler. Run your copy of amd64/vcvars32.bat to setup 64-bit command-line compiler.
+
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeDebug/example_glfw_vulkan.exe /FoDebug/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib
+
+mkdir Release
+cl /nologo /Zi /MD /Ox /Oi /I .. /I ..\.. /I ..\libs\glfw\include /I %VULKAN_SDK%\include *.cpp ..\imgui_impl_vulkan.cpp ..\imgui_impl_glfw.cpp ..\..\imgui*.cpp /FeRelease/example_glfw_vulkan.exe /FoRelease/ /link /LIBPATH:..\libs\glfw\lib-vc2010-64 /libpath:%VULKAN_SDK%\lib glfw3.lib opengl32.lib gdi32.lib shell32.lib vulkan-1.lib
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj b/3rdparty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
new file mode 100644
index 00000000..b0305e8f
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {57E2DF5A-6FC8-45BB-99DD-91A18C646E80}
+ example_glfw_vulkan
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%VULKAN_SDK%\include;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+
+
+ true
+ %VULKAN_SDK%\lib32;$(SolutionDir)\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%VULKAN_SDK%\include;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+
+
+ true
+ %VULKAN_SDK%\lib;$(SolutionDir)\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%VULKAN_SDK%\include;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %VULKAN_SDK%\lib32;$(SolutionDir)\libs\glfw\lib-vc2010-32;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%VULKAN_SDK%\include;$(SolutionDir)\libs\glfw\include;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %VULKAN_SDK%\lib;$(SolutionDir)\libs\glfw\lib-vc2010-64;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;glfw3.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters b/3rdparty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters
new file mode 100644
index 00000000..98a445d4
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/example_glfw_vulkan.vcxproj.filters
@@ -0,0 +1,58 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/gen_spv.sh b/3rdparty/imgui/examples/example_glfw_vulkan/gen_spv.sh
new file mode 100755
index 00000000..e0d7f3b0
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/gen_spv.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag
+glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/glsl_shader.frag b/3rdparty/imgui/examples/example_glfw_vulkan/glsl_shader.frag
new file mode 100644
index 00000000..313a8880
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/glsl_shader.frag
@@ -0,0 +1,14 @@
+#version 450 core
+layout(location = 0) out vec4 fColor;
+
+layout(set=0, binding=0) uniform sampler2D sTexture;
+
+layout(location = 0) in struct{
+ vec4 Color;
+ vec2 UV;
+} In;
+
+void main()
+{
+ fColor = In.Color * texture(sTexture, In.UV.st);
+}
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/glsl_shader.vert b/3rdparty/imgui/examples/example_glfw_vulkan/glsl_shader.vert
new file mode 100644
index 00000000..20b29082
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/glsl_shader.vert
@@ -0,0 +1,25 @@
+#version 450 core
+layout(location = 0) in vec2 aPos;
+layout(location = 1) in vec2 aUV;
+layout(location = 2) in vec4 aColor;
+
+layout(push_constant) uniform uPushConstant{
+ vec2 uScale;
+ vec2 uTranslate;
+} pc;
+
+out gl_PerVertex{
+ vec4 gl_Position;
+};
+
+layout(location = 0) out struct{
+ vec4 Color;
+ vec2 UV;
+} Out;
+
+void main()
+{
+ Out.Color = aColor;
+ Out.UV = aUV;
+ gl_Position = vec4(aPos*pc.uScale+pc.uTranslate, 0, 1);
+}
diff --git a/3rdparty/imgui/examples/example_glfw_vulkan/main.cpp b/3rdparty/imgui/examples/example_glfw_vulkan/main.cpp
new file mode 100644
index 00000000..adaa45d5
--- /dev/null
+++ b/3rdparty/imgui/examples/example_glfw_vulkan/main.cpp
@@ -0,0 +1,499 @@
+// dear imgui: standalone example application for Glfw + Vulkan
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include "imgui.h"
+#include "imgui_impl_glfw.h"
+#include "imgui_impl_vulkan.h"
+#include // printf, fprintf
+#include // abort
+#define GLFW_INCLUDE_NONE
+#define GLFW_INCLUDE_VULKAN
+#include
+#include
+
+//#define IMGUI_UNLIMITED_FRAME_RATE
+#ifdef _DEBUG
+#define IMGUI_VULKAN_DEBUG_REPORT
+#endif
+
+static VkAllocationCallbacks* g_Allocator = NULL;
+static VkInstance g_Instance = VK_NULL_HANDLE;
+static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
+static VkDevice g_Device = VK_NULL_HANDLE;
+static uint32_t g_QueueFamily = (uint32_t)-1;
+static VkQueue g_Queue = VK_NULL_HANDLE;
+static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
+static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
+static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
+
+static ImGui_ImplVulkanH_WindowData g_WindowData;
+static bool g_ResizeWanted = false;
+static int g_ResizeWidth = 0, g_ResizeHeight = 0;
+
+static void check_vk_result(VkResult err)
+{
+ if (err == 0) return;
+ printf("VkResult %d\n", err);
+ if (err < 0)
+ abort();
+}
+
+#ifdef IMGUI_VULKAN_DEBUG_REPORT
+static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
+{
+ (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
+ fprintf(stderr, "[vulkan] ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
+ return VK_FALSE;
+}
+#endif // IMGUI_VULKAN_DEBUG_REPORT
+
+static void SetupVulkan(const char** extensions, uint32_t extensions_count)
+{
+ VkResult err;
+
+ // Create Vulkan Instance
+ {
+ VkInstanceCreateInfo create_info = {};
+ create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
+ create_info.enabledExtensionCount = extensions_count;
+ create_info.ppEnabledExtensionNames = extensions;
+
+#ifdef IMGUI_VULKAN_DEBUG_REPORT
+ // Enabling multiple validation layers grouped as LunarG standard validation
+ const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
+ create_info.enabledLayerCount = 1;
+ create_info.ppEnabledLayerNames = layers;
+
+ // Enable debug report extension (we need additional storage, so we duplicate the user array to add our new extension to it)
+ const char** extensions_ext = (const char**)malloc(sizeof(const char*) * (extensions_count + 1));
+ memcpy(extensions_ext, extensions, extensions_count * sizeof(const char*));
+ extensions_ext[extensions_count] = "VK_EXT_debug_report";
+ create_info.enabledExtensionCount = extensions_count + 1;
+ create_info.ppEnabledExtensionNames = extensions_ext;
+
+ // Create Vulkan Instance
+ err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
+ check_vk_result(err);
+ free(extensions_ext);
+
+ // Get the function pointer (required for any extensions)
+ auto vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
+ IM_ASSERT(vkCreateDebugReportCallbackEXT != NULL);
+
+ // Setup the debug report callback
+ VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
+ debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
+ debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
+ debug_report_ci.pfnCallback = debug_report;
+ debug_report_ci.pUserData = NULL;
+ err = vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
+ check_vk_result(err);
+#else
+ // Create Vulkan Instance without any debug feature
+ err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
+ check_vk_result(err);
+#endif
+ }
+
+ // Select GPU
+ {
+ uint32_t gpu_count;
+ err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, NULL);
+ check_vk_result(err);
+
+ VkPhysicalDevice* gpus = (VkPhysicalDevice*)malloc(sizeof(VkPhysicalDevice) * gpu_count);
+ err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, gpus);
+ check_vk_result(err);
+
+ // If a number >1 of GPUs got reported, you should find the best fit GPU for your purpose
+ // e.g. VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU if available, or with the greatest memory available, etc.
+ // for sake of simplicity we'll just take the first one, assuming it has a graphics queue family.
+ g_PhysicalDevice = gpus[0];
+ free(gpus);
+ }
+
+ // Select graphics queue family
+ {
+ uint32_t count;
+ vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, NULL);
+ VkQueueFamilyProperties* queues = (VkQueueFamilyProperties*)malloc(sizeof(VkQueueFamilyProperties) * count);
+ vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, queues);
+ for (uint32_t i = 0; i < count; i++)
+ if (queues[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
+ {
+ g_QueueFamily = i;
+ break;
+ }
+ free(queues);
+ IM_ASSERT(g_QueueFamily != -1);
+ }
+
+ // Create Logical Device (with 1 queue)
+ {
+ int device_extension_count = 1;
+ const char* device_extensions[] = { "VK_KHR_swapchain" };
+ const float queue_priority[] = { 1.0f };
+ VkDeviceQueueCreateInfo queue_info[1] = {};
+ queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
+ queue_info[0].queueFamilyIndex = g_QueueFamily;
+ queue_info[0].queueCount = 1;
+ queue_info[0].pQueuePriorities = queue_priority;
+ VkDeviceCreateInfo create_info = {};
+ create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
+ create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
+ create_info.pQueueCreateInfos = queue_info;
+ create_info.enabledExtensionCount = device_extension_count;
+ create_info.ppEnabledExtensionNames = device_extensions;
+ err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
+ check_vk_result(err);
+ vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
+ }
+
+ // Create Descriptor Pool
+ {
+ VkDescriptorPoolSize pool_sizes[] =
+ {
+ { VK_DESCRIPTOR_TYPE_SAMPLER, 1000 },
+ { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1000 },
+ { VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1000 },
+ { VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, 1000 },
+ { VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1000 }
+ };
+ VkDescriptorPoolCreateInfo pool_info = {};
+ pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
+ pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
+ pool_info.maxSets = 1000 * IM_ARRAYSIZE(pool_sizes);
+ pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
+ pool_info.pPoolSizes = pool_sizes;
+ err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
+ check_vk_result(err);
+ }
+}
+
+static void SetupVulkanWindowData(ImGui_ImplVulkanH_WindowData* wd, VkSurfaceKHR surface, int width, int height)
+{
+ wd->Surface = surface;
+
+ // Check for WSI support
+ VkBool32 res;
+ vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res);
+ if (res != VK_TRUE)
+ {
+ fprintf(stderr, "Error no WSI support on physical device 0\n");
+ exit(-1);
+ }
+
+ // Select Surface Format
+ const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
+ const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+ wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
+
+ // Select Present Mode
+#ifdef IMGUI_UNLIMITED_FRAME_RATE
+ VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
+#else
+ VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
+#endif
+ wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
+ //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
+
+ // Create SwapChain, RenderPass, Framebuffer, etc.
+ ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, wd, g_Allocator);
+ ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, width, height);
+}
+
+static void CleanupVulkan()
+{
+ ImGui_ImplVulkanH_WindowData* wd = &g_WindowData;
+ ImGui_ImplVulkanH_DestroyWindowData(g_Instance, g_Device, wd, g_Allocator);
+ vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
+
+#ifdef IMGUI_VULKAN_DEBUG_REPORT
+ // Remove the debug report callback
+ auto vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
+ vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
+#endif // IMGUI_VULKAN_DEBUG_REPORT
+
+ vkDestroyDevice(g_Device, g_Allocator);
+ vkDestroyInstance(g_Instance, g_Allocator);
+}
+
+static void FrameRender(ImGui_ImplVulkanH_WindowData* wd)
+{
+ VkResult err;
+
+ VkSemaphore& image_acquired_semaphore = wd->Frames[wd->FrameIndex].ImageAcquiredSemaphore;
+ err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
+ check_vk_result(err);
+
+ ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[wd->FrameIndex];
+ {
+ err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
+ check_vk_result(err);
+
+ err = vkResetFences(g_Device, 1, &fd->Fence);
+ check_vk_result(err);
+ }
+ {
+ err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
+ check_vk_result(err);
+ VkCommandBufferBeginInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
+ info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
+ err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
+ check_vk_result(err);
+ }
+ {
+ VkRenderPassBeginInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
+ info.renderPass = wd->RenderPass;
+ info.framebuffer = wd->Framebuffer[wd->FrameIndex];
+ info.renderArea.extent.width = wd->Width;
+ info.renderArea.extent.height = wd->Height;
+ info.clearValueCount = 1;
+ info.pClearValues = &wd->ClearValue;
+ vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
+ }
+
+ // Record Imgui Draw Data and draw funcs into command buffer
+ ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), fd->CommandBuffer);
+
+ // Submit command buffer
+ vkCmdEndRenderPass(fd->CommandBuffer);
+ {
+ VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
+ VkSubmitInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
+ info.waitSemaphoreCount = 1;
+ info.pWaitSemaphores = &image_acquired_semaphore;
+ info.pWaitDstStageMask = &wait_stage;
+ info.commandBufferCount = 1;
+ info.pCommandBuffers = &fd->CommandBuffer;
+ info.signalSemaphoreCount = 1;
+ info.pSignalSemaphores = &fd->RenderCompleteSemaphore;
+
+ err = vkEndCommandBuffer(fd->CommandBuffer);
+ check_vk_result(err);
+ err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
+ check_vk_result(err);
+ }
+}
+
+static void FramePresent(ImGui_ImplVulkanH_WindowData* wd)
+{
+ ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[wd->FrameIndex];
+ VkPresentInfoKHR info = {};
+ info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
+ info.waitSemaphoreCount = 1;
+ info.pWaitSemaphores = &fd->RenderCompleteSemaphore;
+ info.swapchainCount = 1;
+ info.pSwapchains = &wd->Swapchain;
+ info.pImageIndices = &wd->FrameIndex;
+ VkResult err = vkQueuePresentKHR(g_Queue, &info);
+ check_vk_result(err);
+}
+
+static void glfw_error_callback(int error, const char* description)
+{
+ fprintf(stderr, "Glfw Error %d: %s\n", error, description);
+}
+
+static void glfw_resize_callback(GLFWwindow*, int w, int h)
+{
+ g_ResizeWanted = true;
+ g_ResizeWidth = w;
+ g_ResizeHeight = h;
+}
+
+int main(int, char**)
+{
+ // Setup window
+ glfwSetErrorCallback(glfw_error_callback);
+ if (!glfwInit())
+ return 1;
+
+ glfwWindowHint(GLFW_CLIENT_API, GLFW_NO_API);
+ GLFWwindow* window = glfwCreateWindow(1280, 720, "Dear ImGui GLFW+Vulkan example", NULL, NULL);
+
+ // Setup Vulkan
+ if (!glfwVulkanSupported())
+ {
+ printf("GLFW: Vulkan Not Supported\n");
+ return 1;
+ }
+ uint32_t extensions_count = 0;
+ const char** extensions = glfwGetRequiredInstanceExtensions(&extensions_count);
+ SetupVulkan(extensions, extensions_count);
+
+ // Create Window Surface
+ VkSurfaceKHR surface;
+ VkResult err = glfwCreateWindowSurface(g_Instance, window, g_Allocator, &surface);
+ check_vk_result(err);
+
+ // Create Framebuffers
+ int w, h;
+ glfwGetFramebufferSize(window, &w, &h);
+ glfwSetFramebufferSizeCallback(window, glfw_resize_callback);
+ ImGui_ImplVulkanH_WindowData* wd = &g_WindowData;
+ SetupVulkanWindowData(wd, surface, w, h);
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; // Enable Gamepad Controls
+
+ // Setup GLFW binding
+ ImGui_ImplGlfw_InitForVulkan(window, true);
+
+ // Setup Vulkan binding
+ ImGui_ImplVulkan_InitInfo init_info = {};
+ init_info.Instance = g_Instance;
+ init_info.PhysicalDevice = g_PhysicalDevice;
+ init_info.Device = g_Device;
+ init_info.QueueFamily = g_QueueFamily;
+ init_info.Queue = g_Queue;
+ init_info.PipelineCache = g_PipelineCache;
+ init_info.DescriptorPool = g_DescriptorPool;
+ init_info.Allocator = g_Allocator;
+ init_info.CheckVkResultFn = check_vk_result;
+ ImGui_ImplVulkan_Init(&init_info, wd->RenderPass);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ // Upload Fonts
+ {
+ // Use any command queue
+ VkCommandPool command_pool = wd->Frames[wd->FrameIndex].CommandPool;
+ VkCommandBuffer command_buffer = wd->Frames[wd->FrameIndex].CommandBuffer;
+
+ err = vkResetCommandPool(g_Device, command_pool, 0);
+ check_vk_result(err);
+ VkCommandBufferBeginInfo begin_info = {};
+ begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
+ begin_info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
+ err = vkBeginCommandBuffer(command_buffer, &begin_info);
+ check_vk_result(err);
+
+ ImGui_ImplVulkan_CreateFontsTexture(command_buffer);
+
+ VkSubmitInfo end_info = {};
+ end_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
+ end_info.commandBufferCount = 1;
+ end_info.pCommandBuffers = &command_buffer;
+ err = vkEndCommandBuffer(command_buffer);
+ check_vk_result(err);
+ err = vkQueueSubmit(g_Queue, 1, &end_info, VK_NULL_HANDLE);
+ check_vk_result(err);
+
+ err = vkDeviceWaitIdle(g_Device);
+ check_vk_result(err);
+ ImGui_ImplVulkan_InvalidateFontUploadObjects();
+ }
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ while (!glfwWindowShouldClose(window))
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ glfwPollEvents();
+ if (g_ResizeWanted)
+ {
+ ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &g_WindowData, g_Allocator, g_ResizeWidth, g_ResizeHeight);
+ g_ResizeWanted = false;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplVulkan_NewFrame();
+ ImGui_ImplGlfw_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ memcpy(&wd->ClearValue.color.float32[0], &clear_color, 4 * sizeof(float));
+ FrameRender(wd);
+
+ FramePresent(wd);
+ }
+
+ // Cleanup
+ err = vkDeviceWaitIdle(g_Device);
+ check_vk_result(err);
+ ImGui_ImplVulkan_Shutdown();
+ ImGui_ImplGlfw_Shutdown();
+ ImGui::DestroyContext();
+ CleanupVulkan();
+
+ glfwDestroyWindow(window);
+ glfwTerminate();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_marmalade/data/app.icf b/3rdparty/imgui/examples/example_marmalade/data/app.icf
new file mode 100644
index 00000000..fcd6585a
--- /dev/null
+++ b/3rdparty/imgui/examples/example_marmalade/data/app.icf
@@ -0,0 +1,32 @@
+# This file is for configuration settings for your
+# application.
+#
+# The syntax is similar to windows .ini files ie
+#
+# [GroupName]
+# Setting = Value
+#
+# Which can be read by your application using
+# e.g s3eConfigGetString("GroupName", "Setting", string)
+#
+# All settings must be documented in .config.txt files.
+# New settings specific to this application should be
+# documented in app.config.txt
+#
+# Some conditional operations are also permitted, see the
+# S3E documentation for details.
+
+[S3E]
+MemSize=6000000
+MemSizeDebug=6000000
+DispFixRot=FixedLandscape
+
+# emulate iphone 5 resolution, change these settings to emulate other display resolution
+WinWidth=1136
+WinHeight=640
+
+[GX]
+DataCacheSize=131070
+
+[Util]
+#MemoryBreakpoint=1282
diff --git a/3rdparty/imgui/examples/example_marmalade/main.cpp b/3rdparty/imgui/examples/example_marmalade/main.cpp
new file mode 100644
index 00000000..92316a67
--- /dev/null
+++ b/3rdparty/imgui/examples/example_marmalade/main.cpp
@@ -0,0 +1,120 @@
+// dear imgui: standalone example application for Marmalade
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+// Copyright (C) 2015 by Giovanni Zito
+// This file is part of Dear ImGui
+
+#include "imgui.h"
+#include "imgui_impl_marmalade.h"
+#include
+
+#include
+#include
+#include
+
+int main(int, char**)
+{
+ IwGxInit();
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+ ImGui_Marmalade_Init(true);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ while (true)
+ {
+ if (s3eDeviceCheckQuitRequest())
+ break;
+
+ // Poll and handle inputs
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ s3eKeyboardUpdate();
+ s3ePointerUpdate();
+
+ // Start the Dear ImGui frame
+ ImGui_Marmalade_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ IwGxSetColClear(clear_color.x * 255, clear_color.y * 255, clear_color.z * 255, clear_color.w * 255);
+ IwGxClear();
+ ImGui_Marmalade_RenderDrawData(ImGui::GetDrawData());
+ IwGxSwapBuffers();
+
+ s3eDeviceYield(0);
+ }
+
+ // Cleanup
+ ImGui_Marmalade_Shutdown();
+ ImGui::DestroyContext();
+ IwGxTerminate();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_marmalade/marmalade_example.mkb b/3rdparty/imgui/examples/example_marmalade/marmalade_example.mkb
new file mode 100644
index 00000000..34315b9a
--- /dev/null
+++ b/3rdparty/imgui/examples/example_marmalade/marmalade_example.mkb
@@ -0,0 +1,46 @@
+#!/usr/bin/env mkb
+
+# ImGui - standalone example application for Marmalade
+# Copyright (C) 2015 by Giovanni Zito
+# This file is part of ImGui
+# https://github.com/ocornut/imgui
+
+define IMGUI_DISABLE_INCLUDE_IMCONFIG_H
+define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCS
+define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCS
+define _snprintf=snprintf
+
+options
+{
+ optimise-speed=1
+}
+
+includepaths
+{
+ ..
+ ../..
+}
+
+subprojects
+{
+ iwgx
+}
+
+files
+{
+ (.)
+ ["imgui"]
+ ../../imgui.cpp
+ ../../imgui_demo.cpp
+ ../../imgui_draw.cpp
+ ../../imgui_widgets.cpp
+ ../../imconfig.h
+ ../../imgui.h
+ ../../imgui_internal.h
+
+ ["imgui","Marmalade binding"]
+ ../imgui_impl_marmalade.h
+ ../imgui_impl_marmalade.cpp
+ main.cpp
+
+}
diff --git a/3rdparty/imgui/examples/example_null/build_win32.bat b/3rdparty/imgui/examples/example_null/build_win32.bat
new file mode 100644
index 00000000..12cb70ab
--- /dev/null
+++ b/3rdparty/imgui/examples/example_null/build_win32.bat
@@ -0,0 +1,3 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I ..\.. *.cpp ..\..\*.cpp /FeDebug/example_null.exe /FoDebug/ /link gdi32.lib shell32.lib
diff --git a/3rdparty/imgui/examples/example_null/main.cpp b/3rdparty/imgui/examples/example_null/main.cpp
new file mode 100644
index 00000000..90521f9b
--- /dev/null
+++ b/3rdparty/imgui/examples/example_null/main.cpp
@@ -0,0 +1,35 @@
+// dear imgui: null/dummy example application (compile and link imgui with no inputs, no outputs)
+#include "imgui.h"
+#include
+
+int main(int, char**)
+{
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO();
+
+ // Build atlas
+ unsigned char* tex_pixels = NULL;
+ int tex_w, tex_h;
+ io.Fonts->GetTexDataAsRGBA32(&tex_pixels, &tex_w, &tex_h);
+
+ for (int n = 0; n < 50; n++)
+ {
+ printf("NewFrame() %d\n", n);
+ io.DisplaySize = ImVec2(1920, 1080);
+ io.DeltaTime = 1.0f / 60.0f;
+ ImGui::NewFrame();
+
+ static float f = 0.0f;
+ ImGui::Text("Hello, world!");
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f);
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / io.Framerate, io.Framerate);
+ ImGui::ShowDemoWindow(NULL);
+
+ ImGui::Render();
+ }
+
+ printf("DestroyContext()\n");
+ ImGui::DestroyContext();
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_sdl_opengl2/README.md b/3rdparty/imgui/examples/example_sdl_opengl2/README.md
new file mode 100644
index 00000000..dfbfa7b6
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl2/README.md
@@ -0,0 +1,22 @@
+
+# How to Build
+
+- On Windows with Visual Studio's CLI
+
+```
+set SDL2DIR=path_to_your_sdl2_folder
+cl /Zi /MD /I %SDL2DIR%\include /I .. /I ..\.. main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl2.cpp ..\..\imgui*.cpp /link /LIBPATH:%SDL2DIR%\lib SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
+```
+
+- On Linux and similar Unixes
+
+```
+c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -lGL
+```
+
+- On Mac OS X
+
+```
+brew install sdl2
+c++ `sdl2-config --cflags` -I .. -I ../.. main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl2.cpp ../../imgui*.cpp `sdl2-config --libs` -framework OpenGl
+```
diff --git a/3rdparty/imgui/examples/example_sdl_opengl2/build_win32.bat b/3rdparty/imgui/examples/example_sdl_opengl2/build_win32.bat
new file mode 100644
index 00000000..bc2eb3b2
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl2/build_win32.bat
@@ -0,0 +1,3 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\gl3w /I %SDL2_DIR%\include *.cpp ..\imgui_impl_opengl2.cpp ..\imgui_impl_sdl.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl2.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
diff --git a/3rdparty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj b/3rdparty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj
new file mode 100644
index 00000000..fa6b8d3a
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {94E991D0-790A-4DAF-B442-AAADE3233C75}
+ example_sdl_opengl2
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+
+
+ true
+ %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+
+
+ true
+ %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj.filters b/3rdparty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj.filters
new file mode 100644
index 00000000..e0c1bf2e
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl2/example_sdl_opengl2.vcxproj.filters
@@ -0,0 +1,58 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_sdl_opengl2/main.cpp b/3rdparty/imgui/examples/example_sdl_opengl2/main.cpp
new file mode 100644
index 00000000..7e92b853
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl2/main.cpp
@@ -0,0 +1,148 @@
+// dear imgui: standalone example application for SDL2 + OpenGL
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
+
+// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
+// **Prefer using the code in the example_sdl_opengl3/ folder**
+// See imgui_impl_sdl.cpp for details.
+
+#include "imgui.h"
+#include "imgui_impl_sdl.h"
+#include "imgui_impl_opengl2.h"
+#include
+#include
+#include
+
+int main(int, char**)
+{
+ // Setup SDL
+ if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) != 0)
+ {
+ printf("Error: %s\n", SDL_GetError());
+ return -1;
+ }
+
+ // Setup window
+ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
+ SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
+ SDL_DisplayMode current;
+ SDL_GetCurrentDisplayMode(0, ¤t);
+ SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
+ SDL_GLContext gl_context = SDL_GL_CreateContext(window);
+ SDL_GL_SetSwapInterval(1); // Enable vsync
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
+ ImGui_ImplOpenGL2_Init();
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ bool done = false;
+ while (!done)
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ SDL_Event event;
+ while (SDL_PollEvent(&event))
+ {
+ ImGui_ImplSDL2_ProcessEvent(&event);
+ if (event.type == SDL_QUIT)
+ done = true;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplOpenGL2_NewFrame();
+ ImGui_ImplSDL2_NewFrame(window);
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound
+ ImGui_ImplOpenGL2_RenderDrawData(ImGui::GetDrawData());
+ SDL_GL_SwapWindow(window);
+ }
+
+ // Cleanup
+ ImGui_ImplOpenGL2_Shutdown();
+ ImGui_ImplSDL2_Shutdown();
+ ImGui::DestroyContext();
+
+ SDL_GL_DeleteContext(gl_context);
+ SDL_DestroyWindow(window);
+ SDL_Quit();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_sdl_opengl3/README.md b/3rdparty/imgui/examples/example_sdl_opengl3/README.md
new file mode 100644
index 00000000..f029ce71
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl3/README.md
@@ -0,0 +1,22 @@
+
+# How to Build
+
+- On Windows with Visual Studio's CLI
+
+```
+set SDL2DIR=path_to_your_sdl2_folder
+cl /Zi /MD /I .. /I ..\.. /I ..\libs\gl3w /I %SDL2DIR%\include main.cpp ..\imgui_impl_sdl.cpp ..\imgui_impl_opengl3.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /link /libpath:%SDL2DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
+```
+
+- On Linux and similar Unixes
+
+```
+c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -lGL -ldl
+```
+
+- On Mac OS X
+
+```
+brew install sdl2
+c++ `sdl2-config --cflags` -I .. -I ../.. -I ../libs/gl3w main.cpp ../imgui_impl_sdl.cpp ../imgui_impl_opengl3.cpp ../../imgui*.cpp ../libs/gl3w/GL/gl3w.c `sdl2-config --libs` -framework OpenGl -framework CoreFoundation
+```
diff --git a/3rdparty/imgui/examples/example_sdl_opengl3/build_win32.bat b/3rdparty/imgui/examples/example_sdl_opengl3/build_win32.bat
new file mode 100644
index 00000000..d2cfa67f
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl3/build_win32.bat
@@ -0,0 +1,3 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I ..\libs\gl3w /I %SDL2_DIR%\include *.cpp ..\imgui_impl_opengl3.cpp ..\imgui_impl_sdl.cpp ..\..\imgui*.cpp ..\libs\gl3w\GL\gl3w.c /FeDebug/example_sdl_opengl3.exe /FoDebug/ /link /libpath:%SDL2_DIR%\lib\x86 SDL2.lib SDL2main.lib opengl32.lib /subsystem:console
diff --git a/3rdparty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj b/3rdparty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj
new file mode 100644
index 00000000..9fda1897
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj
@@ -0,0 +1,178 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {BBAEB705-1669-40F3-8567-04CF6A991F4C}
+ example_sdl_opengl3
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+
+
+ true
+ %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+
+
+ true
+ %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%SDL2_DIR%\include;$(SolutionDir)\libs\gl3w;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)
+ opengl32.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj.filters b/3rdparty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj.filters
new file mode 100644
index 00000000..fbef18ac
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl3/example_sdl_opengl3.vcxproj.filters
@@ -0,0 +1,70 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {f9997b32-5479-4756-9ffc-77793ad3764f}
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ gl3w
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ gl3w
+
+
+ gl3w
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_sdl_opengl3/main.cpp b/3rdparty/imgui/examples/example_sdl_opengl3/main.cpp
new file mode 100644
index 00000000..577e84c4
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_opengl3/main.cpp
@@ -0,0 +1,188 @@
+// dear imgui: standalone example application for SDL2 + OpenGL
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+// (SDL is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
+// (GL3W is a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc.)
+
+#include "imgui.h"
+#include "imgui_impl_sdl.h"
+#include "imgui_impl_opengl3.h"
+#include
+#include
+
+// About OpenGL function loaders: modern OpenGL doesn't have a standard header file and requires individual function pointers to be loaded manually.
+// Helper libraries are often used for this purpose! Here we are supporting a few common ones: gl3w, glew, glad.
+// You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own.
+#if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
+#include // Initialize with gl3wInit()
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
+#include // Initialize with glewInit()
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
+#include // Initialize with gladLoadGL()
+#else
+#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
+#endif
+
+int main(int, char**)
+{
+ // Setup SDL
+ if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) != 0)
+ {
+ printf("Error: %s\n", SDL_GetError());
+ return -1;
+ }
+
+ // Decide GL+GLSL versions
+#if __APPLE__
+ // GL 3.2 Core + GLSL 150
+ const char* glsl_version = "#version 150";
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG); // Always required on Mac
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 2);
+#else
+ // GL 3.0 + GLSL 130
+ const char* glsl_version = "#version 130";
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_FLAGS, 0);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
+ SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
+#endif
+
+ // Create window with graphics context
+ SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
+ SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24);
+ SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 8);
+ SDL_DisplayMode current;
+ SDL_GetCurrentDisplayMode(0, ¤t);
+ SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+OpenGL3 example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_OPENGL|SDL_WINDOW_RESIZABLE);
+ SDL_GLContext gl_context = SDL_GL_CreateContext(window);
+ SDL_GL_SetSwapInterval(1); // Enable vsync
+
+ // Initialize OpenGL loader
+#if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
+ bool err = gl3wInit() != 0;
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
+ bool err = glewInit() != GLEW_OK;
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
+ bool err = gladLoadGL() == 0;
+#endif
+ if (err)
+ {
+ fprintf(stderr, "Failed to initialize OpenGL loader!\n");
+ return 1;
+ }
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplSDL2_InitForOpenGL(window, gl_context);
+ ImGui_ImplOpenGL3_Init(glsl_version);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ bool done = false;
+ while (!done)
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ SDL_Event event;
+ while (SDL_PollEvent(&event))
+ {
+ ImGui_ImplSDL2_ProcessEvent(&event);
+ if (event.type == SDL_QUIT)
+ done = true;
+ if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_CLOSE && event.window.windowID == SDL_GetWindowID(window))
+ done = true;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplOpenGL3_NewFrame();
+ ImGui_ImplSDL2_NewFrame(window);
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ SDL_GL_MakeCurrent(window, gl_context);
+ glViewport(0, 0, (int)io.DisplaySize.x, (int)io.DisplaySize.y);
+ glClearColor(clear_color.x, clear_color.y, clear_color.z, clear_color.w);
+ glClear(GL_COLOR_BUFFER_BIT);
+ ImGui_ImplOpenGL3_RenderDrawData(ImGui::GetDrawData());
+ SDL_GL_SwapWindow(window);
+ }
+
+ // Cleanup
+ ImGui_ImplOpenGL3_Shutdown();
+ ImGui_ImplSDL2_Shutdown();
+ ImGui::DestroyContext();
+
+ SDL_GL_DeleteContext(gl_context);
+ SDL_DestroyWindow(window);
+ SDL_Quit();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj b/3rdparty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj
new file mode 100644
index 00000000..622dc093
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj
@@ -0,0 +1,175 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {BAE3D0B5-9695-4EB1-AD0F-75890EB4A3B3}
+ example_sdl_vulkan
+
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+ Application
+ false
+ true
+ MultiByte
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+ $(IncludePath)
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%VULKAN_SDK%\include;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
+
+
+ true
+ %VULKAN_SDK%\lib32;%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%VULKAN_SDK%\include;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
+
+
+ true
+ %VULKAN_SDK%\lib;%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+ msvcrt.lib
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%VULKAN_SDK%\include;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %VULKAN_SDK%\lib32;%SDL2_DIR%\lib\x86;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%VULKAN_SDK%\include;%SDL2_DIR%\include;%(AdditionalIncludeDirectories)
+ false
+
+
+ true
+ true
+ true
+ %VULKAN_SDK%\lib;%SDL2_DIR%\lib\x64;%(AdditionalLibraryDirectories)
+ vulkan-1.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj.filters b/3rdparty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj.filters
new file mode 100644
index 00000000..6f082524
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_vulkan/example_sdl_vulkan.vcxproj.filters
@@ -0,0 +1,58 @@
+
+
+
+
+ {20b90ce4-7fcb-4731-b9a0-075f875de82d}
+
+
+ {f18ab499-84e1-499f-8eff-9754361e0e52}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_sdl_vulkan/main.cpp b/3rdparty/imgui/examples/example_sdl_vulkan/main.cpp
new file mode 100644
index 00000000..dc7da3ea
--- /dev/null
+++ b/3rdparty/imgui/examples/example_sdl_vulkan/main.cpp
@@ -0,0 +1,490 @@
+// dear imgui: standalone example application for SDL2 + Vulkan
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include "imgui.h"
+#include "imgui_impl_sdl.h"
+#include "imgui_impl_vulkan.h"
+#include // printf, fprintf
+#include // abort
+#include
+#include
+#include
+
+//#define IMGUI_UNLIMITED_FRAME_RATE
+#ifdef _DEBUG
+#define IMGUI_VULKAN_DEBUG_REPORT
+#endif
+
+static VkAllocationCallbacks* g_Allocator = NULL;
+static VkInstance g_Instance = VK_NULL_HANDLE;
+static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
+static VkDevice g_Device = VK_NULL_HANDLE;
+static uint32_t g_QueueFamily = (uint32_t)-1;
+static VkQueue g_Queue = VK_NULL_HANDLE;
+static VkDebugReportCallbackEXT g_DebugReport = VK_NULL_HANDLE;
+static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
+static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
+
+static ImGui_ImplVulkanH_WindowData g_WindowData;
+
+static void check_vk_result(VkResult err)
+{
+ if (err == 0) return;
+ printf("VkResult %d\n", err);
+ if (err < 0)
+ abort();
+}
+
+#ifdef IMGUI_VULKAN_DEBUG_REPORT
+static VKAPI_ATTR VkBool32 VKAPI_CALL debug_report(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objectType, uint64_t object, size_t location, int32_t messageCode, const char* pLayerPrefix, const char* pMessage, void* pUserData)
+{
+ (void)flags; (void)object; (void)location; (void)messageCode; (void)pUserData; (void)pLayerPrefix; // Unused arguments
+ fprintf(stderr, "[vulkan] ObjectType: %i\nMessage: %s\n\n", objectType, pMessage);
+ return VK_FALSE;
+}
+#endif // IMGUI_VULKAN_DEBUG_REPORT
+
+static void SetupVulkan(const char** extensions, uint32_t extensions_count)
+{
+ VkResult err;
+
+ // Create Vulkan Instance
+ {
+ VkInstanceCreateInfo create_info = {};
+ create_info.sType = VK_STRUCTURE_TYPE_INSTANCE_CREATE_INFO;
+ create_info.enabledExtensionCount = extensions_count;
+ create_info.ppEnabledExtensionNames = extensions;
+
+#ifdef IMGUI_VULKAN_DEBUG_REPORT
+ // Enabling multiple validation layers grouped as LunarG standard validation
+ const char* layers[] = { "VK_LAYER_LUNARG_standard_validation" };
+ create_info.enabledLayerCount = 1;
+ create_info.ppEnabledLayerNames = layers;
+
+ // Enable debug report extension (we need additional storage, so we duplicate the user array to add our new extension to it)
+ const char** extensions_ext = (const char**)malloc(sizeof(const char*) * (extensions_count + 1));
+ memcpy(extensions_ext, extensions, extensions_count * sizeof(const char*));
+ extensions_ext[extensions_count] = "VK_EXT_debug_report";
+ create_info.enabledExtensionCount = extensions_count + 1;
+ create_info.ppEnabledExtensionNames = extensions_ext;
+
+ // Create Vulkan Instance
+ err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
+ check_vk_result(err);
+ free(extensions_ext);
+
+ // Get the function pointer (required for any extensions)
+ auto vkCreateDebugReportCallbackEXT = (PFN_vkCreateDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkCreateDebugReportCallbackEXT");
+ IM_ASSERT(vkCreateDebugReportCallbackEXT != NULL);
+
+ // Setup the debug report callback
+ VkDebugReportCallbackCreateInfoEXT debug_report_ci = {};
+ debug_report_ci.sType = VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT;
+ debug_report_ci.flags = VK_DEBUG_REPORT_ERROR_BIT_EXT | VK_DEBUG_REPORT_WARNING_BIT_EXT | VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT;
+ debug_report_ci.pfnCallback = debug_report;
+ debug_report_ci.pUserData = NULL;
+ err = vkCreateDebugReportCallbackEXT(g_Instance, &debug_report_ci, g_Allocator, &g_DebugReport);
+ check_vk_result(err);
+#else
+ // Create Vulkan Instance without any debug feature
+ err = vkCreateInstance(&create_info, g_Allocator, &g_Instance);
+ check_vk_result(err);
+#endif
+ }
+
+ // Select GPU
+ {
+ uint32_t gpu_count;
+ err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, NULL);
+ check_vk_result(err);
+
+ VkPhysicalDevice* gpus = (VkPhysicalDevice*)malloc(sizeof(VkPhysicalDevice) * gpu_count);
+ err = vkEnumeratePhysicalDevices(g_Instance, &gpu_count, gpus);
+ check_vk_result(err);
+
+ // If a number >1 of GPUs got reported, you should find the best fit GPU for your purpose
+ // e.g. VK_PHYSICAL_DEVICE_TYPE_DISCRETE_GPU if available, or with the greatest memory available, etc.
+ // for sake of simplicity we'll just take the first one, assuming it has a graphics queue family.
+ g_PhysicalDevice = gpus[0];
+ free(gpus);
+ }
+
+ // Select graphics queue family
+ {
+ uint32_t count;
+ vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, NULL);
+ VkQueueFamilyProperties* queues = (VkQueueFamilyProperties*)malloc(sizeof(VkQueueFamilyProperties) * count);
+ vkGetPhysicalDeviceQueueFamilyProperties(g_PhysicalDevice, &count, queues);
+ for (uint32_t i = 0; i < count; i++)
+ if (queues[i].queueFlags & VK_QUEUE_GRAPHICS_BIT)
+ {
+ g_QueueFamily = i;
+ break;
+ }
+ free(queues);
+ IM_ASSERT(g_QueueFamily != -1);
+ }
+
+ // Create Logical Device (with 1 queue)
+ {
+ int device_extension_count = 1;
+ const char* device_extensions[] = { "VK_KHR_swapchain" };
+ const float queue_priority[] = { 1.0f };
+ VkDeviceQueueCreateInfo queue_info[1] = {};
+ queue_info[0].sType = VK_STRUCTURE_TYPE_DEVICE_QUEUE_CREATE_INFO;
+ queue_info[0].queueFamilyIndex = g_QueueFamily;
+ queue_info[0].queueCount = 1;
+ queue_info[0].pQueuePriorities = queue_priority;
+ VkDeviceCreateInfo create_info = {};
+ create_info.sType = VK_STRUCTURE_TYPE_DEVICE_CREATE_INFO;
+ create_info.queueCreateInfoCount = sizeof(queue_info) / sizeof(queue_info[0]);
+ create_info.pQueueCreateInfos = queue_info;
+ create_info.enabledExtensionCount = device_extension_count;
+ create_info.ppEnabledExtensionNames = device_extensions;
+ err = vkCreateDevice(g_PhysicalDevice, &create_info, g_Allocator, &g_Device);
+ check_vk_result(err);
+ vkGetDeviceQueue(g_Device, g_QueueFamily, 0, &g_Queue);
+ }
+
+ // Create Descriptor Pool
+ {
+ VkDescriptorPoolSize pool_sizes[] =
+ {
+ { VK_DESCRIPTOR_TYPE_SAMPLER, 1000 },
+ { VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER, 1000 },
+ { VK_DESCRIPTOR_TYPE_SAMPLED_IMAGE, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_IMAGE, 1000 },
+ { VK_DESCRIPTOR_TYPE_UNIFORM_TEXEL_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_TEXEL_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER, 1000 },
+ { VK_DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC, 1000 },
+ { VK_DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC, 1000 },
+ { VK_DESCRIPTOR_TYPE_INPUT_ATTACHMENT, 1000 }
+ };
+ VkDescriptorPoolCreateInfo pool_info = {};
+ pool_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO;
+ pool_info.flags = VK_DESCRIPTOR_POOL_CREATE_FREE_DESCRIPTOR_SET_BIT;
+ pool_info.maxSets = 1000 * IM_ARRAYSIZE(pool_sizes);
+ pool_info.poolSizeCount = (uint32_t)IM_ARRAYSIZE(pool_sizes);
+ pool_info.pPoolSizes = pool_sizes;
+ err = vkCreateDescriptorPool(g_Device, &pool_info, g_Allocator, &g_DescriptorPool);
+ check_vk_result(err);
+ }
+}
+
+static void SetupVulkanWindowData(ImGui_ImplVulkanH_WindowData* wd, VkSurfaceKHR surface, int width, int height)
+{
+ wd->Surface = surface;
+
+ // Check for WSI support
+ VkBool32 res;
+ vkGetPhysicalDeviceSurfaceSupportKHR(g_PhysicalDevice, g_QueueFamily, wd->Surface, &res);
+ if (res != VK_TRUE)
+ {
+ fprintf(stderr, "Error no WSI support on physical device 0\n");
+ exit(-1);
+ }
+
+ // Select Surface Format
+ const VkFormat requestSurfaceImageFormat[] = { VK_FORMAT_B8G8R8A8_UNORM, VK_FORMAT_R8G8B8A8_UNORM, VK_FORMAT_B8G8R8_UNORM, VK_FORMAT_R8G8B8_UNORM };
+ const VkColorSpaceKHR requestSurfaceColorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
+ wd->SurfaceFormat = ImGui_ImplVulkanH_SelectSurfaceFormat(g_PhysicalDevice, wd->Surface, requestSurfaceImageFormat, (size_t)IM_ARRAYSIZE(requestSurfaceImageFormat), requestSurfaceColorSpace);
+
+ // Select Present Mode
+#ifdef IMGUI_UNLIMITED_FRAME_RATE
+ VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_MAILBOX_KHR, VK_PRESENT_MODE_IMMEDIATE_KHR, VK_PRESENT_MODE_FIFO_KHR };
+#else
+ VkPresentModeKHR present_modes[] = { VK_PRESENT_MODE_FIFO_KHR };
+#endif
+ wd->PresentMode = ImGui_ImplVulkanH_SelectPresentMode(g_PhysicalDevice, wd->Surface, &present_modes[0], IM_ARRAYSIZE(present_modes));
+ //printf("[vulkan] Selected PresentMode = %d\n", wd->PresentMode);
+
+ // Create SwapChain, RenderPass, Framebuffer, etc.
+ ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(g_PhysicalDevice, g_Device, g_QueueFamily, wd, g_Allocator);
+ ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, wd, g_Allocator, width, height);
+}
+
+static void CleanupVulkan()
+{
+ ImGui_ImplVulkanH_WindowData* wd = &g_WindowData;
+ ImGui_ImplVulkanH_DestroyWindowData(g_Instance, g_Device, wd, g_Allocator);
+ vkDestroyDescriptorPool(g_Device, g_DescriptorPool, g_Allocator);
+
+#ifdef IMGUI_VULKAN_DEBUG_REPORT
+ // Remove the debug report callback
+ auto vkDestroyDebugReportCallbackEXT = (PFN_vkDestroyDebugReportCallbackEXT)vkGetInstanceProcAddr(g_Instance, "vkDestroyDebugReportCallbackEXT");
+ vkDestroyDebugReportCallbackEXT(g_Instance, g_DebugReport, g_Allocator);
+#endif // IMGUI_VULKAN_DEBUG_REPORT
+
+ vkDestroyDevice(g_Device, g_Allocator);
+ vkDestroyInstance(g_Instance, g_Allocator);
+}
+
+static void FrameRender(ImGui_ImplVulkanH_WindowData* wd)
+{
+ VkResult err;
+
+ VkSemaphore& image_acquired_semaphore = wd->Frames[wd->FrameIndex].ImageAcquiredSemaphore;
+ err = vkAcquireNextImageKHR(g_Device, wd->Swapchain, UINT64_MAX, image_acquired_semaphore, VK_NULL_HANDLE, &wd->FrameIndex);
+ check_vk_result(err);
+
+ ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[wd->FrameIndex];
+ {
+ err = vkWaitForFences(g_Device, 1, &fd->Fence, VK_TRUE, UINT64_MAX); // wait indefinitely instead of periodically checking
+ check_vk_result(err);
+
+ err = vkResetFences(g_Device, 1, &fd->Fence);
+ check_vk_result(err);
+ }
+ {
+ err = vkResetCommandPool(g_Device, fd->CommandPool, 0);
+ check_vk_result(err);
+ VkCommandBufferBeginInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
+ info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
+ err = vkBeginCommandBuffer(fd->CommandBuffer, &info);
+ check_vk_result(err);
+ }
+ {
+ VkRenderPassBeginInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_BEGIN_INFO;
+ info.renderPass = wd->RenderPass;
+ info.framebuffer = wd->Framebuffer[wd->FrameIndex];
+ info.renderArea.extent.width = wd->Width;
+ info.renderArea.extent.height = wd->Height;
+ info.clearValueCount = 1;
+ info.pClearValues = &wd->ClearValue;
+ vkCmdBeginRenderPass(fd->CommandBuffer, &info, VK_SUBPASS_CONTENTS_INLINE);
+ }
+
+ // Record Imgui Draw Data and draw funcs into command buffer
+ ImGui_ImplVulkan_RenderDrawData(ImGui::GetDrawData(), fd->CommandBuffer);
+
+ // Submit command buffer
+ vkCmdEndRenderPass(fd->CommandBuffer);
+ {
+ VkPipelineStageFlags wait_stage = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
+ VkSubmitInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
+ info.waitSemaphoreCount = 1;
+ info.pWaitSemaphores = &image_acquired_semaphore;
+ info.pWaitDstStageMask = &wait_stage;
+ info.commandBufferCount = 1;
+ info.pCommandBuffers = &fd->CommandBuffer;
+ info.signalSemaphoreCount = 1;
+ info.pSignalSemaphores = &fd->RenderCompleteSemaphore;
+
+ err = vkEndCommandBuffer(fd->CommandBuffer);
+ check_vk_result(err);
+ err = vkQueueSubmit(g_Queue, 1, &info, fd->Fence);
+ check_vk_result(err);
+ }
+}
+
+static void FramePresent(ImGui_ImplVulkanH_WindowData* wd)
+{
+ ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[wd->FrameIndex];
+ VkPresentInfoKHR info = {};
+ info.sType = VK_STRUCTURE_TYPE_PRESENT_INFO_KHR;
+ info.waitSemaphoreCount = 1;
+ info.pWaitSemaphores = &fd->RenderCompleteSemaphore;
+ info.swapchainCount = 1;
+ info.pSwapchains = &wd->Swapchain;
+ info.pImageIndices = &wd->FrameIndex;
+ VkResult err = vkQueuePresentKHR(g_Queue, &info);
+ check_vk_result(err);
+}
+
+int main(int, char**)
+{
+ // Setup SDL
+ if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_TIMER) != 0)
+ {
+ printf("Error: %s\n", SDL_GetError());
+ return 1;
+ }
+
+ // Setup window
+ SDL_DisplayMode current;
+ SDL_GetCurrentDisplayMode(0, ¤t);
+ SDL_Window* window = SDL_CreateWindow("Dear ImGui SDL2+Vulkan example", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 1280, 720, SDL_WINDOW_VULKAN|SDL_WINDOW_RESIZABLE);
+
+ // Setup Vulkan
+ uint32_t extensions_count = 0;
+ SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, NULL);
+ const char** extensions = new const char*[extensions_count];
+ SDL_Vulkan_GetInstanceExtensions(window, &extensions_count, extensions);
+ SetupVulkan(extensions, extensions_count);
+ delete[] extensions;
+
+ // Create Window Surface
+ VkSurfaceKHR surface;
+ VkResult err;
+ if (SDL_Vulkan_CreateSurface(window, g_Instance, &surface) == 0)
+ {
+ printf("Failed to create Vulkan surface.\n");
+ return 1;
+ }
+
+ // Create Framebuffers
+ int w, h;
+ SDL_GetWindowSize(window, &w, &h);
+ ImGui_ImplVulkanH_WindowData* wd = &g_WindowData;
+ SetupVulkanWindowData(wd, surface, w, h);
+
+ // Setup Dear ImGui binding
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ // Setup SDL binding
+ ImGui_ImplSDL2_InitForVulkan(window);
+
+ // Setup Vulkan binding
+ ImGui_ImplVulkan_InitInfo init_info = {};
+ init_info.Instance = g_Instance;
+ init_info.PhysicalDevice = g_PhysicalDevice;
+ init_info.Device = g_Device;
+ init_info.QueueFamily = g_QueueFamily;
+ init_info.Queue = g_Queue;
+ init_info.PipelineCache = g_PipelineCache;
+ init_info.DescriptorPool = g_DescriptorPool;
+ init_info.Allocator = g_Allocator;
+ init_info.CheckVkResultFn = check_vk_result;
+ ImGui_ImplVulkan_Init(&init_info, wd->RenderPass);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ // Upload Fonts
+ {
+ // Use any command queue
+ VkCommandPool command_pool = wd->Frames[wd->FrameIndex].CommandPool;
+ VkCommandBuffer command_buffer = wd->Frames[wd->FrameIndex].CommandBuffer;
+
+ err = vkResetCommandPool(g_Device, command_pool, 0);
+ check_vk_result(err);
+ VkCommandBufferBeginInfo begin_info = {};
+ begin_info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_BEGIN_INFO;
+ begin_info.flags |= VK_COMMAND_BUFFER_USAGE_ONE_TIME_SUBMIT_BIT;
+ err = vkBeginCommandBuffer(command_buffer, &begin_info);
+ check_vk_result(err);
+
+ ImGui_ImplVulkan_CreateFontsTexture(command_buffer);
+
+ VkSubmitInfo end_info = {};
+ end_info.sType = VK_STRUCTURE_TYPE_SUBMIT_INFO;
+ end_info.commandBufferCount = 1;
+ end_info.pCommandBuffers = &command_buffer;
+ err = vkEndCommandBuffer(command_buffer);
+ check_vk_result(err);
+ err = vkQueueSubmit(g_Queue, 1, &end_info, VK_NULL_HANDLE);
+ check_vk_result(err);
+
+ err = vkDeviceWaitIdle(g_Device);
+ check_vk_result(err);
+ ImGui_ImplVulkan_InvalidateFontUploadObjects();
+ }
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ bool done = false;
+ while (!done)
+ {
+ // Poll and handle events (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ SDL_Event event;
+ while (SDL_PollEvent(&event))
+ {
+ ImGui_ImplSDL2_ProcessEvent(&event);
+ if (event.type == SDL_QUIT)
+ done = true;
+ if (event.type == SDL_WINDOWEVENT && event.window.event == SDL_WINDOWEVENT_RESIZED && event.window.windowID == SDL_GetWindowID(window))
+ ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(g_PhysicalDevice, g_Device, &g_WindowData, g_Allocator, (int)event.window.data1, (int)event.window.data2);
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplVulkan_NewFrame();
+ ImGui_ImplSDL2_NewFrame(window);
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ memcpy(&wd->ClearValue.color.float32[0], &clear_color, 4 * sizeof(float));
+ FrameRender(wd);
+
+ FramePresent(wd);
+ }
+
+ // Cleanup
+ err = vkDeviceWaitIdle(g_Device);
+ check_vk_result(err);
+ ImGui_ImplVulkan_Shutdown();
+ ImGui_ImplSDL2_Shutdown();
+ ImGui::DestroyContext();
+ SDL_DestroyWindow(window);
+ CleanupVulkan();
+ SDL_Quit();
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_win32_directx10/build_win32.bat b/3rdparty/imgui/examples/example_win32_directx10/build_win32.bat
new file mode 100644
index 00000000..d79cb8f7
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx10/build_win32.bat
@@ -0,0 +1,4 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_win32.cpp ..\imgui_impl_dx10.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx10.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d10.lib d3dcompiler.lib
+
diff --git a/3rdparty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj b/3rdparty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj
new file mode 100644
index 00000000..5e2973b9
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj
@@ -0,0 +1,165 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {345A953E-A004-4648-B442-DC5F9F11068C}
+ example_win32_directx10
+
+
+
+ Application
+ true
+ Unicode
+
+
+ Application
+ true
+ Unicode
+
+
+ Application
+ false
+ true
+ Unicode
+
+
+ Application
+ false
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+
+
+ true
+ d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+
+
+ true
+ d3d10.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ false
+
+
+ true
+ true
+ true
+ d3d10.lib;d3dcompiler.lib;dxgi.lib;imm32.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ false
+
+
+ true
+ true
+ true
+ d3d10.lib;d3dcompiler.lib;dxgi.lib;imm32.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters b/3rdparty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters
new file mode 100644
index 00000000..97620028
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx10/example_win32_directx10.vcxproj.filters
@@ -0,0 +1,57 @@
+
+
+
+
+ {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6}
+
+
+ {08e36723-ce4f-4cff-9662-c40801cf1acf}
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx10/main.cpp b/3rdparty/imgui/examples/example_win32_directx10/main.cpp
new file mode 100644
index 00000000..c55ec5e2
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx10/main.cpp
@@ -0,0 +1,223 @@
+// dear imgui: standalone example application for DirectX 10
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include "imgui.h"
+#include "imgui_impl_win32.h"
+#include "imgui_impl_dx10.h"
+#include
+#include
+#define DIRECTINPUT_VERSION 0x0800
+#include
+#include
+
+// Data
+static ID3D10Device* g_pd3dDevice = NULL;
+static IDXGISwapChain* g_pSwapChain = NULL;
+static ID3D10RenderTargetView* g_mainRenderTargetView = NULL;
+
+void CreateRenderTarget()
+{
+ ID3D10Texture2D* pBackBuffer;
+ g_pSwapChain->GetBuffer(0, __uuidof(ID3D10Texture2D), (LPVOID*)&pBackBuffer);
+ g_pd3dDevice->CreateRenderTargetView(pBackBuffer, NULL, &g_mainRenderTargetView);
+ pBackBuffer->Release();
+}
+
+void CleanupRenderTarget()
+{
+ if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = NULL; }
+}
+
+HRESULT CreateDeviceD3D(HWND hWnd)
+{
+ // Setup swap chain
+ DXGI_SWAP_CHAIN_DESC sd;
+ ZeroMemory(&sd, sizeof(sd));
+ sd.BufferCount = 2;
+ sd.BufferDesc.Width = 0;
+ sd.BufferDesc.Height = 0;
+ sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ sd.BufferDesc.RefreshRate.Numerator = 60;
+ sd.BufferDesc.RefreshRate.Denominator = 1;
+ sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
+ sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ sd.OutputWindow = hWnd;
+ sd.SampleDesc.Count = 1;
+ sd.SampleDesc.Quality = 0;
+ sd.Windowed = TRUE;
+ sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+
+ UINT createDeviceFlags = 0;
+ //createDeviceFlags |= D3D10_CREATE_DEVICE_DEBUG;
+ if (D3D10CreateDeviceAndSwapChain(NULL, D3D10_DRIVER_TYPE_HARDWARE, NULL, createDeviceFlags, D3D10_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice) != S_OK)
+ return E_FAIL;
+
+ CreateRenderTarget();
+
+ return S_OK;
+}
+
+void CleanupDeviceD3D()
+{
+ CleanupRenderTarget();
+ if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = NULL; }
+ if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = NULL; }
+}
+
+extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
+ return true;
+
+ switch (msg)
+ {
+ case WM_SIZE:
+ if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
+ {
+ CleanupRenderTarget();
+ g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, 0);
+ CreateRenderTarget();
+ }
+ return 0;
+ case WM_SYSCOMMAND:
+ if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
+ return 0;
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+ }
+ return DefWindowProc(hWnd, msg, wParam, lParam);
+}
+
+int main(int, char**)
+{
+ // Create application window
+ WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
+ RegisterClassEx(&wc);
+ HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX10 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
+
+ // Initialize Direct3D
+ if (CreateDeviceD3D(hwnd) < 0)
+ {
+ CleanupDeviceD3D();
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+ return 1;
+ }
+
+ // Show the window
+ ShowWindow(hwnd, SW_SHOWDEFAULT);
+ UpdateWindow(hwnd);
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplWin32_Init(hwnd);
+ ImGui_ImplDX10_Init(g_pd3dDevice);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ MSG msg;
+ ZeroMemory(&msg, sizeof(msg));
+ while (msg.message != WM_QUIT)
+ {
+ // Poll and handle messages (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ continue;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplDX10_NewFrame();
+ ImGui_ImplWin32_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ g_pd3dDevice->OMSetRenderTargets(1, &g_mainRenderTargetView, NULL);
+ g_pd3dDevice->ClearRenderTargetView(g_mainRenderTargetView, (float*)&clear_color);
+ ImGui_ImplDX10_RenderDrawData(ImGui::GetDrawData());
+
+ g_pSwapChain->Present(1, 0); // Present with vsync
+ //g_pSwapChain->Present(0, 0); // Present without vsync
+ }
+
+ ImGui_ImplDX10_Shutdown();
+ ImGui_ImplWin32_Shutdown();
+ ImGui::DestroyContext();
+
+ CleanupDeviceD3D();
+ DestroyWindow(hwnd);
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_win32_directx11/build_win32.bat b/3rdparty/imgui/examples/example_win32_directx11/build_win32.bat
new file mode 100644
index 00000000..05e6a6f6
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx11/build_win32.bat
@@ -0,0 +1,4 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /I "%DXSDK_DIR%Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx11.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx11.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d11.lib d3dcompiler.lib
+
diff --git a/3rdparty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj b/3rdparty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj
new file mode 100644
index 00000000..166602a3
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj
@@ -0,0 +1,165 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {9F316E83-5AE5-4939-A723-305A94F48005}
+ example_win32_directx11
+
+
+
+ Application
+ true
+ Unicode
+
+
+ Application
+ true
+ Unicode
+
+
+ Application
+ false
+ true
+ Unicode
+
+
+ Application
+ false
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+
+
+ true
+ d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+
+
+ true
+ d3d11.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ false
+
+
+ true
+ true
+ true
+ d3d11.lib;d3dcompiler.lib;dxgi.lib;imm32.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x86;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ false
+
+
+ true
+ true
+ true
+ d3d11.lib;d3dcompiler.lib;dxgi.lib;imm32.lib;%(AdditionalDependencies)
+ $(DXSDK_DIR)/Lib/x64;%(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters b/3rdparty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
new file mode 100644
index 00000000..1df6a0c4
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx11/example_win32_directx11.vcxproj.filters
@@ -0,0 +1,57 @@
+
+
+
+
+ {0587d7a3-f2ce-4d56-b84f-a0005d3bfce6}
+
+
+ {08e36723-ce4f-4cff-9662-c40801cf1acf}
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx11/main.cpp b/3rdparty/imgui/examples/example_win32_directx11/main.cpp
new file mode 100644
index 00000000..c89b6192
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx11/main.cpp
@@ -0,0 +1,227 @@
+// dear imgui - standalone example application for DirectX 11
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include "imgui.h"
+#include "imgui_impl_win32.h"
+#include "imgui_impl_dx11.h"
+#include
+#define DIRECTINPUT_VERSION 0x0800
+#include
+#include
+
+// Data
+static ID3D11Device* g_pd3dDevice = NULL;
+static ID3D11DeviceContext* g_pd3dDeviceContext = NULL;
+static IDXGISwapChain* g_pSwapChain = NULL;
+static ID3D11RenderTargetView* g_mainRenderTargetView = NULL;
+
+void CreateRenderTarget()
+{
+ ID3D11Texture2D* pBackBuffer;
+ g_pSwapChain->GetBuffer(0, __uuidof(ID3D11Texture2D), (LPVOID*)&pBackBuffer);
+ g_pd3dDevice->CreateRenderTargetView(pBackBuffer, NULL, &g_mainRenderTargetView);
+ pBackBuffer->Release();
+}
+
+void CleanupRenderTarget()
+{
+ if (g_mainRenderTargetView) { g_mainRenderTargetView->Release(); g_mainRenderTargetView = NULL; }
+}
+
+HRESULT CreateDeviceD3D(HWND hWnd)
+{
+ // Setup swap chain
+ DXGI_SWAP_CHAIN_DESC sd;
+ ZeroMemory(&sd, sizeof(sd));
+ sd.BufferCount = 2;
+ sd.BufferDesc.Width = 0;
+ sd.BufferDesc.Height = 0;
+ sd.BufferDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ sd.BufferDesc.RefreshRate.Numerator = 60;
+ sd.BufferDesc.RefreshRate.Denominator = 1;
+ sd.Flags = DXGI_SWAP_CHAIN_FLAG_ALLOW_MODE_SWITCH;
+ sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ sd.OutputWindow = hWnd;
+ sd.SampleDesc.Count = 1;
+ sd.SampleDesc.Quality = 0;
+ sd.Windowed = TRUE;
+ sd.SwapEffect = DXGI_SWAP_EFFECT_DISCARD;
+
+ UINT createDeviceFlags = 0;
+ //createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
+ D3D_FEATURE_LEVEL featureLevel;
+ const D3D_FEATURE_LEVEL featureLevelArray[2] = { D3D_FEATURE_LEVEL_11_0, D3D_FEATURE_LEVEL_10_0, };
+ if (D3D11CreateDeviceAndSwapChain(NULL, D3D_DRIVER_TYPE_HARDWARE, NULL, createDeviceFlags, featureLevelArray, 2, D3D11_SDK_VERSION, &sd, &g_pSwapChain, &g_pd3dDevice, &featureLevel, &g_pd3dDeviceContext) != S_OK)
+ return E_FAIL;
+
+ CreateRenderTarget();
+
+ return S_OK;
+}
+
+void CleanupDeviceD3D()
+{
+ CleanupRenderTarget();
+ if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = NULL; }
+ if (g_pd3dDeviceContext) { g_pd3dDeviceContext->Release(); g_pd3dDeviceContext = NULL; }
+ if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = NULL; }
+}
+
+extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
+ return true;
+
+ switch (msg)
+ {
+ case WM_SIZE:
+ if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
+ {
+ CleanupRenderTarget();
+ g_pSwapChain->ResizeBuffers(0, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam), DXGI_FORMAT_UNKNOWN, 0);
+ CreateRenderTarget();
+ }
+ return 0;
+ case WM_SYSCOMMAND:
+ if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
+ return 0;
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+ }
+ return DefWindowProc(hWnd, msg, wParam, lParam);
+}
+
+int main(int, char**)
+{
+ // Create application window
+ WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
+ RegisterClassEx(&wc);
+ HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX11 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
+
+ // Initialize Direct3D
+ if (CreateDeviceD3D(hwnd) < 0)
+ {
+ CleanupDeviceD3D();
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+ return 1;
+ }
+
+ // Show the window
+ ShowWindow(hwnd, SW_SHOWDEFAULT);
+ UpdateWindow(hwnd);
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplWin32_Init(hwnd);
+ ImGui_ImplDX11_Init(g_pd3dDevice, g_pd3dDeviceContext);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ // Our state
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ MSG msg;
+ ZeroMemory(&msg, sizeof(msg));
+ while (msg.message != WM_QUIT)
+ {
+ // Poll and handle messages (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ continue;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplDX11_NewFrame();
+ ImGui_ImplWin32_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::Render();
+ g_pd3dDeviceContext->OMSetRenderTargets(1, &g_mainRenderTargetView, NULL);
+ g_pd3dDeviceContext->ClearRenderTargetView(g_mainRenderTargetView, (float*)&clear_color);
+ ImGui_ImplDX11_RenderDrawData(ImGui::GetDrawData());
+
+ g_pSwapChain->Present(1, 0); // Present with vsync
+ //g_pSwapChain->Present(0, 0); // Present without vsync
+ }
+
+ ImGui_ImplDX11_Shutdown();
+ ImGui_ImplWin32_Shutdown();
+ ImGui::DestroyContext();
+
+ CleanupDeviceD3D();
+ DestroyWindow(hwnd);
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_win32_directx12/build_win32.bat b/3rdparty/imgui/examples/example_win32_directx12/build_win32.bat
new file mode 100644
index 00000000..2cd7fcdf
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx12/build_win32.bat
@@ -0,0 +1,4 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I "%WindowsSdkDir%Include\um" /I "%WindowsSdkDir%Include\shared" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx12.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx12.exe /FoDebug/ /link d3d12.lib d3dcompiler.lib dxgi.lib
+
diff --git a/3rdparty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj b/3rdparty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj
new file mode 100644
index 00000000..38c83351
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj
@@ -0,0 +1,167 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {b4cf9797-519d-4afe-a8f4-5141a6b521d3}
+ example_win32_directx12
+ 10.0.16299.0
+
+
+
+ Application
+ true
+ Unicode
+ v140
+
+
+ Application
+ true
+ Unicode
+ v140
+
+
+ Application
+ false
+ true
+ Unicode
+ v140
+
+
+ Application
+ false
+ true
+ Unicode
+ v140
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ %(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ %(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ true
+ true
+ d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ %(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories)
+
+
+ true
+ true
+ true
+ d3d12.lib;d3dcompiler.lib;dxgi.lib;%(AdditionalDependencies)
+ %(AdditionalLibraryDirectories)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters b/3rdparty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters
new file mode 100644
index 00000000..28a25572
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx12/example_win32_directx12.vcxproj.filters
@@ -0,0 +1,54 @@
+
+
+
+
+ {fb3d294f-51ec-478e-a627-25831c80fefd}
+
+
+ {4f33ddea-9910-456d-b868-4267eb3c2b19}
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+ imgui
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx12/main.cpp b/3rdparty/imgui/examples/example_win32_directx12/main.cpp
new file mode 100644
index 00000000..50cb3777
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx12/main.cpp
@@ -0,0 +1,429 @@
+// dear imgui: standalone example application for DirectX 12
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+// FIXME: 64-bit only for now! (Because sizeof(ImTextureId) == sizeof(void*))
+
+#include "imgui.h"
+#include "imgui_impl_win32.h"
+#include "imgui_impl_dx12.h"
+#include
+#include
+#include
+
+#define DX12_ENABLE_DEBUG_LAYER 0
+
+struct FrameContext
+{
+ ID3D12CommandAllocator* CommandAllocator;
+ UINT64 FenceValue;
+};
+
+// Data
+static int const NUM_FRAMES_IN_FLIGHT = 3;
+static FrameContext g_frameContext[NUM_FRAMES_IN_FLIGHT] = {};
+static UINT g_frameIndex = 0;
+
+static int const NUM_BACK_BUFFERS = 3;
+static ID3D12Device* g_pd3dDevice = NULL;
+static ID3D12DescriptorHeap* g_pd3dRtvDescHeap = NULL;
+static ID3D12DescriptorHeap* g_pd3dSrvDescHeap = NULL;
+static ID3D12CommandQueue* g_pd3dCommandQueue = NULL;
+static ID3D12GraphicsCommandList* g_pd3dCommandList = NULL;
+static ID3D12Fence* g_fence = NULL;
+static HANDLE g_fenceEvent = NULL;
+static UINT64 g_fenceLastSignaledValue = 0;
+static IDXGISwapChain3* g_pSwapChain = NULL;
+static HANDLE g_hSwapChainWaitableObject = NULL;
+static ID3D12Resource* g_mainRenderTargetResource[NUM_BACK_BUFFERS] = {};
+static D3D12_CPU_DESCRIPTOR_HANDLE g_mainRenderTargetDescriptor[NUM_BACK_BUFFERS] = {};
+
+void CreateRenderTarget()
+{
+ ID3D12Resource* pBackBuffer;
+ for (UINT i = 0; i < NUM_BACK_BUFFERS; i++)
+ {
+ g_pSwapChain->GetBuffer(i, IID_PPV_ARGS(&pBackBuffer));
+ g_pd3dDevice->CreateRenderTargetView(pBackBuffer, NULL, g_mainRenderTargetDescriptor[i]);
+ g_mainRenderTargetResource[i] = pBackBuffer;
+ }
+}
+
+void WaitForLastSubmittedFrame()
+{
+ FrameContext* frameCtxt = &g_frameContext[g_frameIndex % NUM_FRAMES_IN_FLIGHT];
+
+ UINT64 fenceValue = frameCtxt->FenceValue;
+ if (fenceValue == 0)
+ return; // No fence was signaled
+
+ frameCtxt->FenceValue = 0;
+ if (g_fence->GetCompletedValue() >= fenceValue)
+ return;
+
+ g_fence->SetEventOnCompletion(fenceValue, g_fenceEvent);
+ WaitForSingleObject(g_fenceEvent, INFINITE);
+}
+
+FrameContext* WaitForNextFrameResources()
+{
+ UINT nextFrameIndex = g_frameIndex + 1;
+ g_frameIndex = nextFrameIndex;
+
+ HANDLE waitableObjects[] = { g_hSwapChainWaitableObject, NULL };
+ DWORD numWaitableObjects = 1;
+
+ FrameContext* frameCtxt = &g_frameContext[nextFrameIndex % NUM_FRAMES_IN_FLIGHT];
+ UINT64 fenceValue = frameCtxt->FenceValue;
+ if (fenceValue != 0) // means no fence was signaled
+ {
+ frameCtxt->FenceValue = 0;
+ g_fence->SetEventOnCompletion(fenceValue, g_fenceEvent);
+ waitableObjects[1] = g_fenceEvent;
+ numWaitableObjects = 2;
+ }
+
+ WaitForMultipleObjects(numWaitableObjects, waitableObjects, TRUE, INFINITE);
+
+ return frameCtxt;
+}
+
+void ResizeSwapChain(HWND hWnd, int width, int height)
+{
+ DXGI_SWAP_CHAIN_DESC1 sd;
+ g_pSwapChain->GetDesc1(&sd);
+ sd.Width = width;
+ sd.Height = height;
+
+ IDXGIFactory4* dxgiFactory = NULL;
+ g_pSwapChain->GetParent(IID_PPV_ARGS(&dxgiFactory));
+
+ g_pSwapChain->Release();
+ CloseHandle(g_hSwapChainWaitableObject);
+
+ IDXGISwapChain1* swapChain1 = NULL;
+ dxgiFactory->CreateSwapChainForHwnd(g_pd3dCommandQueue, hWnd, &sd, NULL, NULL, &swapChain1);
+ swapChain1->QueryInterface(IID_PPV_ARGS(&g_pSwapChain));
+ swapChain1->Release();
+ dxgiFactory->Release();
+
+ g_pSwapChain->SetMaximumFrameLatency(NUM_BACK_BUFFERS);
+
+ g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject();
+ assert(g_hSwapChainWaitableObject != NULL);
+}
+
+void CleanupRenderTarget()
+{
+ WaitForLastSubmittedFrame();
+
+ for (UINT i = 0; i < NUM_BACK_BUFFERS; i++)
+ if (g_mainRenderTargetResource[i]) { g_mainRenderTargetResource[i]->Release(); g_mainRenderTargetResource[i] = NULL; }
+}
+
+HRESULT CreateDeviceD3D(HWND hWnd)
+{
+ // Setup swap chain
+ DXGI_SWAP_CHAIN_DESC1 sd;
+ {
+ ZeroMemory(&sd, sizeof(sd));
+ sd.BufferCount = NUM_BACK_BUFFERS;
+ sd.Width = 0;
+ sd.Height = 0;
+ sd.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ sd.Flags = DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT;
+ sd.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT;
+ sd.SampleDesc.Count = 1;
+ sd.SampleDesc.Quality = 0;
+ sd.SwapEffect = DXGI_SWAP_EFFECT_FLIP_DISCARD;
+ sd.AlphaMode = DXGI_ALPHA_MODE_UNSPECIFIED;
+ sd.Scaling = DXGI_SCALING_STRETCH;
+ sd.Stereo = FALSE;
+ }
+
+ if (DX12_ENABLE_DEBUG_LAYER)
+ {
+ ID3D12Debug* dx12Debug = NULL;
+ if (SUCCEEDED(D3D12GetDebugInterface(IID_PPV_ARGS(&dx12Debug))))
+ {
+ dx12Debug->EnableDebugLayer();
+ dx12Debug->Release();
+ }
+ }
+
+ D3D_FEATURE_LEVEL featureLevel = D3D_FEATURE_LEVEL_11_0;
+ if (D3D12CreateDevice(NULL, featureLevel, IID_PPV_ARGS(&g_pd3dDevice)) != S_OK)
+ return E_FAIL;
+
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC desc = {};
+ desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_RTV;
+ desc.NumDescriptors = NUM_BACK_BUFFERS;
+ desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_NONE;
+ desc.NodeMask = 1;
+ if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dRtvDescHeap)) != S_OK)
+ return E_FAIL;
+
+ SIZE_T rtvDescriptorSize = g_pd3dDevice->GetDescriptorHandleIncrementSize(D3D12_DESCRIPTOR_HEAP_TYPE_RTV);
+ D3D12_CPU_DESCRIPTOR_HANDLE rtvHandle = g_pd3dRtvDescHeap->GetCPUDescriptorHandleForHeapStart();
+ for (UINT i = 0; i < NUM_BACK_BUFFERS; i++)
+ {
+ g_mainRenderTargetDescriptor[i] = rtvHandle;
+ rtvHandle.ptr += rtvDescriptorSize;
+ }
+ }
+
+ {
+ D3D12_DESCRIPTOR_HEAP_DESC desc = {};
+ desc.Type = D3D12_DESCRIPTOR_HEAP_TYPE_CBV_SRV_UAV;
+ desc.NumDescriptors = 1;
+ desc.Flags = D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE;
+ if (g_pd3dDevice->CreateDescriptorHeap(&desc, IID_PPV_ARGS(&g_pd3dSrvDescHeap)) != S_OK)
+ return E_FAIL;
+ }
+
+ {
+ D3D12_COMMAND_QUEUE_DESC desc = {};
+ desc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
+ desc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
+ desc.NodeMask = 1;
+ if (g_pd3dDevice->CreateCommandQueue(&desc, IID_PPV_ARGS(&g_pd3dCommandQueue)) != S_OK)
+ return E_FAIL;
+ }
+
+ for (UINT i = 0; i < NUM_FRAMES_IN_FLIGHT; i++)
+ if (g_pd3dDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&g_frameContext[i].CommandAllocator)) != S_OK)
+ return E_FAIL;
+
+ if (g_pd3dDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, g_frameContext[0].CommandAllocator, NULL, IID_PPV_ARGS(&g_pd3dCommandList)) != S_OK ||
+ g_pd3dCommandList->Close() != S_OK)
+ return E_FAIL;
+
+ if (g_pd3dDevice->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&g_fence)) != S_OK)
+ return E_FAIL;
+
+ g_fenceEvent = CreateEvent(NULL, FALSE, FALSE, NULL);
+ if (g_fenceEvent == NULL)
+ return E_FAIL;
+
+ {
+ IDXGIFactory4* dxgiFactory = NULL;
+ IDXGISwapChain1* swapChain1 = NULL;
+ if (CreateDXGIFactory1(IID_PPV_ARGS(&dxgiFactory)) != S_OK ||
+ dxgiFactory->CreateSwapChainForHwnd(g_pd3dCommandQueue, hWnd, &sd, NULL, NULL, &swapChain1) != S_OK ||
+ swapChain1->QueryInterface(IID_PPV_ARGS(&g_pSwapChain)) != S_OK)
+ return E_FAIL;
+ swapChain1->Release();
+ dxgiFactory->Release();
+ g_pSwapChain->SetMaximumFrameLatency(NUM_BACK_BUFFERS);
+ g_hSwapChainWaitableObject = g_pSwapChain->GetFrameLatencyWaitableObject();
+ }
+
+ CreateRenderTarget();
+
+ return S_OK;
+}
+
+void CleanupDeviceD3D()
+{
+ CleanupRenderTarget();
+ if (g_pSwapChain) { g_pSwapChain->Release(); g_pSwapChain = NULL; }
+ if (g_hSwapChainWaitableObject != NULL) { CloseHandle(g_hSwapChainWaitableObject); }
+ for (UINT i = 0; i < NUM_FRAMES_IN_FLIGHT; i++)
+ if (g_frameContext[i].CommandAllocator) { g_frameContext[i].CommandAllocator->Release(); g_frameContext[i].CommandAllocator = NULL; }
+ if (g_pd3dCommandQueue) { g_pd3dCommandQueue->Release(); g_pd3dCommandQueue = NULL; }
+ if (g_pd3dCommandList) { g_pd3dCommandList->Release(); g_pd3dCommandList = NULL; }
+ if (g_pd3dRtvDescHeap) { g_pd3dRtvDescHeap->Release(); g_pd3dRtvDescHeap = NULL; }
+ if (g_pd3dSrvDescHeap) { g_pd3dSrvDescHeap->Release(); g_pd3dSrvDescHeap = NULL; }
+ if (g_fence) { g_fence->Release(); g_fence = NULL; }
+ if (g_fenceEvent) { CloseHandle(g_fenceEvent); g_fenceEvent = NULL; }
+ if (g_pd3dDevice) { g_pd3dDevice->Release(); g_pd3dDevice = NULL; }
+}
+
+extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
+ return true;
+
+ switch (msg)
+ {
+ case WM_SIZE:
+ if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
+ {
+ ImGui_ImplDX12_InvalidateDeviceObjects();
+ CleanupRenderTarget();
+ ResizeSwapChain(hWnd, (UINT)LOWORD(lParam), (UINT)HIWORD(lParam));
+ CreateRenderTarget();
+ ImGui_ImplDX12_CreateDeviceObjects();
+ }
+ return 0;
+ case WM_SYSCOMMAND:
+ if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
+ return 0;
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+ }
+ return DefWindowProc(hWnd, msg, wParam, lParam);
+}
+
+int main(int, char**)
+{
+ // Create application window
+ WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
+ RegisterClassEx(&wc);
+ HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX12 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
+
+ // Initialize Direct3D
+ if (CreateDeviceD3D(hwnd) < 0)
+ {
+ CleanupDeviceD3D();
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+ return 1;
+ }
+
+ // Show the window
+ ShowWindow(hwnd, SW_SHOWDEFAULT);
+ UpdateWindow(hwnd);
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+
+ ImGui_ImplWin32_Init(hwnd);
+ ImGui_ImplDX12_Init(g_pd3dDevice, NUM_FRAMES_IN_FLIGHT,
+ DXGI_FORMAT_R8G8B8A8_UNORM,
+ g_pd3dSrvDescHeap->GetCPUDescriptorHandleForHeapStart(),
+ g_pd3dSrvDescHeap->GetGPUDescriptorHandleForHeapStart());
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ MSG msg;
+ ZeroMemory(&msg, sizeof(msg));
+ while (msg.message != WM_QUIT)
+ {
+ // Poll and handle messages (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ continue;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplDX12_NewFrame();
+ ImGui_ImplWin32_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ FrameContext* frameCtxt = WaitForNextFrameResources();
+ UINT backBufferIdx = g_pSwapChain->GetCurrentBackBufferIndex();
+ frameCtxt->CommandAllocator->Reset();
+
+ D3D12_RESOURCE_BARRIER barrier = {};
+ barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+ barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+ barrier.Transition.pResource = g_mainRenderTargetResource[backBufferIdx];
+ barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
+ barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_PRESENT;
+ barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_RENDER_TARGET;
+
+ g_pd3dCommandList->Reset(frameCtxt->CommandAllocator, NULL);
+ g_pd3dCommandList->ResourceBarrier(1, &barrier);
+ g_pd3dCommandList->ClearRenderTargetView(g_mainRenderTargetDescriptor[backBufferIdx], (float*)&clear_color, 0, NULL);
+ g_pd3dCommandList->OMSetRenderTargets(1, &g_mainRenderTargetDescriptor[backBufferIdx], FALSE, NULL);
+ g_pd3dCommandList->SetDescriptorHeaps(1, &g_pd3dSrvDescHeap);
+ ImGui::Render();
+ ImGui_ImplDX12_RenderDrawData(ImGui::GetDrawData(), g_pd3dCommandList);
+ barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_RENDER_TARGET;
+ barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PRESENT;
+ g_pd3dCommandList->ResourceBarrier(1, &barrier);
+ g_pd3dCommandList->Close();
+
+ g_pd3dCommandQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*)&g_pd3dCommandList);
+
+ g_pSwapChain->Present(1, 0); // Present with vsync
+ //g_pSwapChain->Present(0, 0); // Present without vsync
+
+ UINT64 fenceValue = g_fenceLastSignaledValue + 1;
+ g_pd3dCommandQueue->Signal(g_fence, fenceValue);
+ g_fenceLastSignaledValue = fenceValue;
+ frameCtxt->FenceValue = fenceValue;
+ }
+
+ WaitForLastSubmittedFrame();
+ ImGui_ImplDX12_Shutdown();
+ ImGui_ImplWin32_Shutdown();
+ ImGui::DestroyContext();
+
+ CleanupDeviceD3D();
+ DestroyWindow(hwnd);
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/example_win32_directx9/build_win32.bat b/3rdparty/imgui/examples/example_win32_directx9/build_win32.bat
new file mode 100644
index 00000000..4db27653
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx9/build_win32.bat
@@ -0,0 +1,3 @@
+@REM Build for Visual Studio compiler. Run your copy of vcvars32.bat or vcvarsall.bat to setup command-line compiler.
+mkdir Debug
+cl /nologo /Zi /MD /I .. /I ..\.. /I "%DXSDK_DIR%/Include" /D UNICODE /D _UNICODE *.cpp ..\imgui_impl_dx9.cpp ..\imgui_impl_win32.cpp ..\..\imgui*.cpp /FeDebug/example_win32_directx9.exe /FoDebug/ /link /LIBPATH:"%DXSDK_DIR%/Lib/x86" d3d9.lib
diff --git a/3rdparty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj b/3rdparty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj
new file mode 100644
index 00000000..08f21c87
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj
@@ -0,0 +1,165 @@
+
+
+
+
+ Debug
+ Win32
+
+
+ Debug
+ x64
+
+
+ Release
+ Win32
+
+
+ Release
+ x64
+
+
+
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}
+ example_win32_directx9
+
+
+
+ Application
+ true
+ Unicode
+
+
+ Application
+ true
+ Unicode
+
+
+ Application
+ false
+ true
+ Unicode
+
+
+ Application
+ false
+ true
+ Unicode
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+ $(ProjectDir)$(Configuration)\
+ $(ProjectDir)$(Configuration)\
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+
+
+ true
+ $(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)
+ d3d9.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+ Level4
+ Disabled
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+
+
+ true
+ $(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)
+ d3d9.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ false
+
+
+ true
+ true
+ true
+ $(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)
+ d3d9.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+ Level4
+ MaxSpeed
+ true
+ true
+ ..\..;..;%(AdditionalIncludeDirectories);$(DXSDK_DIR)Include;
+ false
+
+
+ true
+ true
+ true
+ $(DXSDK_DIR)Lib\x64;%(AdditionalLibraryDirectories)
+ d3d9.lib;%(AdditionalDependencies)
+ Console
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters b/3rdparty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters
new file mode 100644
index 00000000..914cd260
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx9/example_win32_directx9.vcxproj.filters
@@ -0,0 +1,58 @@
+
+
+
+
+ {4FC737F1-C7A5-4376-A066-2A32D752A2FF}
+ cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx
+
+
+ {a82cba23-9de0-45c2-b1e3-2eb1666702de}
+
+
+
+
+ sources
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+ imgui
+
+
+
+
+ imgui
+
+
+ imgui
+
+
+ imgui
+
+
+ sources
+
+
+ sources
+
+
+
+
+
+ sources
+
+
+
\ No newline at end of file
diff --git a/3rdparty/imgui/examples/example_win32_directx9/main.cpp b/3rdparty/imgui/examples/example_win32_directx9/main.cpp
new file mode 100644
index 00000000..7e5b957a
--- /dev/null
+++ b/3rdparty/imgui/examples/example_win32_directx9/main.cpp
@@ -0,0 +1,204 @@
+// dear imgui: standalone example application for DirectX 9
+// If you are new to dear imgui, see examples/README.txt and documentation at the top of imgui.cpp.
+
+#include "imgui.h"
+#include "imgui_impl_dx9.h"
+#include "imgui_impl_win32.h"
+#include
+#define DIRECTINPUT_VERSION 0x0800
+#include
+#include
+
+// Data
+static LPDIRECT3DDEVICE9 g_pd3dDevice = NULL;
+static D3DPRESENT_PARAMETERS g_d3dpp;
+
+extern LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+LRESULT WINAPI WndProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ if (ImGui_ImplWin32_WndProcHandler(hWnd, msg, wParam, lParam))
+ return true;
+
+ switch (msg)
+ {
+ case WM_SIZE:
+ if (g_pd3dDevice != NULL && wParam != SIZE_MINIMIZED)
+ {
+ ImGui_ImplDX9_InvalidateDeviceObjects();
+ g_d3dpp.BackBufferWidth = LOWORD(lParam);
+ g_d3dpp.BackBufferHeight = HIWORD(lParam);
+ HRESULT hr = g_pd3dDevice->Reset(&g_d3dpp);
+ if (hr == D3DERR_INVALIDCALL)
+ IM_ASSERT(0);
+ ImGui_ImplDX9_CreateDeviceObjects();
+ }
+ return 0;
+ case WM_SYSCOMMAND:
+ if ((wParam & 0xfff0) == SC_KEYMENU) // Disable ALT application menu
+ return 0;
+ break;
+ case WM_DESTROY:
+ PostQuitMessage(0);
+ return 0;
+ }
+ return DefWindowProc(hWnd, msg, wParam, lParam);
+}
+
+int main(int, char**)
+{
+ // Create application window
+ WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, WndProc, 0L, 0L, GetModuleHandle(NULL), NULL, NULL, NULL, NULL, _T("ImGui Example"), NULL };
+ RegisterClassEx(&wc);
+ HWND hwnd = CreateWindow(_T("ImGui Example"), _T("Dear ImGui DirectX9 Example"), WS_OVERLAPPEDWINDOW, 100, 100, 1280, 800, NULL, NULL, wc.hInstance, NULL);
+
+ // Initialize Direct3D
+ LPDIRECT3D9 pD3D;
+ if ((pD3D = Direct3DCreate9(D3D_SDK_VERSION)) == NULL)
+ {
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+ return 0;
+ }
+ ZeroMemory(&g_d3dpp, sizeof(g_d3dpp));
+ g_d3dpp.Windowed = TRUE;
+ g_d3dpp.SwapEffect = D3DSWAPEFFECT_DISCARD;
+ g_d3dpp.BackBufferFormat = D3DFMT_UNKNOWN;
+ g_d3dpp.EnableAutoDepthStencil = TRUE;
+ g_d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
+ g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_ONE; // Present with vsync
+ //g_d3dpp.PresentationInterval = D3DPRESENT_INTERVAL_IMMEDIATE; // Present without vsync, maximum unthrottled framerate
+
+ // Create the D3DDevice
+ if (pD3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd, D3DCREATE_HARDWARE_VERTEXPROCESSING, &g_d3dpp, &g_pd3dDevice) < 0)
+ {
+ pD3D->Release();
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+ return 0;
+ }
+
+ // Setup Dear ImGui binding
+ IMGUI_CHECKVERSION();
+ ImGui::CreateContext();
+ ImGuiIO& io = ImGui::GetIO(); (void)io;
+ //io.ConfigFlags |= ImGuiConfigFlags_NavEnableKeyboard; // Enable Keyboard Controls
+ ImGui_ImplWin32_Init(hwnd);
+ ImGui_ImplDX9_Init(g_pd3dDevice);
+
+ // Setup style
+ ImGui::StyleColorsDark();
+ //ImGui::StyleColorsClassic();
+
+ // Load Fonts
+ // - If no fonts are loaded, dear imgui will use the default font. You can also load multiple fonts and use ImGui::PushFont()/PopFont() to select them.
+ // - AddFontFromFileTTF() will return the ImFont* so you can store it if you need to select the font among multiple.
+ // - If the file cannot be loaded, the function will return NULL. Please handle those errors in your application (e.g. use an assertion, or display an error and quit).
+ // - The fonts will be rasterized at a given size (w/ oversampling) and stored into a texture when calling ImFontAtlas::Build()/GetTexDataAsXXXX(), which ImGui_ImplXXXX_NewFrame below will call.
+ // - Read 'misc/fonts/README.txt' for more instructions and details.
+ // - Remember that in C/C++ if you want to include a backslash \ in a string literal you need to write a double backslash \\ !
+ //io.Fonts->AddFontDefault();
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Roboto-Medium.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/Cousine-Regular.ttf", 15.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/DroidSans.ttf", 16.0f);
+ //io.Fonts->AddFontFromFileTTF("../../misc/fonts/ProggyTiny.ttf", 10.0f);
+ //ImFont* font = io.Fonts->AddFontFromFileTTF("c:\\Windows\\Fonts\\ArialUni.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesJapanese());
+ //IM_ASSERT(font != NULL);
+
+ bool show_demo_window = true;
+ bool show_another_window = false;
+ ImVec4 clear_color = ImVec4(0.45f, 0.55f, 0.60f, 1.00f);
+
+ // Main loop
+ MSG msg;
+ ZeroMemory(&msg, sizeof(msg));
+ ShowWindow(hwnd, SW_SHOWDEFAULT);
+ UpdateWindow(hwnd);
+ while (msg.message != WM_QUIT)
+ {
+ // Poll and handle messages (inputs, window resize, etc.)
+ // You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+ // - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+ // - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+ // Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+ if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE))
+ {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ continue;
+ }
+
+ // Start the Dear ImGui frame
+ ImGui_ImplDX9_NewFrame();
+ ImGui_ImplWin32_NewFrame();
+ ImGui::NewFrame();
+
+ // 1. Show the big demo window (Most of the sample code is in ImGui::ShowDemoWindow()! You can browse its code to learn more about Dear ImGui!).
+ if (show_demo_window)
+ ImGui::ShowDemoWindow(&show_demo_window);
+
+ // 2. Show a simple window that we create ourselves. We use a Begin/End pair to created a named window.
+ {
+ static float f = 0.0f;
+ static int counter = 0;
+
+ ImGui::Begin("Hello, world!"); // Create a window called "Hello, world!" and append into it.
+
+ ImGui::Text("This is some useful text."); // Display some text (you can use a format strings too)
+ ImGui::Checkbox("Demo Window", &show_demo_window); // Edit bools storing our window open/close state
+ ImGui::Checkbox("Another Window", &show_another_window);
+
+ ImGui::SliderFloat("float", &f, 0.0f, 1.0f); // Edit 1 float using a slider from 0.0f to 1.0f
+ ImGui::ColorEdit3("clear color", (float*)&clear_color); // Edit 3 floats representing a color
+
+ if (ImGui::Button("Button")) // Buttons return true when clicked (most widgets return true when edited/activated)
+ counter++;
+ ImGui::SameLine();
+ ImGui::Text("counter = %d", counter);
+
+ ImGui::Text("Application average %.3f ms/frame (%.1f FPS)", 1000.0f / ImGui::GetIO().Framerate, ImGui::GetIO().Framerate);
+ ImGui::End();
+ }
+
+ // 3. Show another simple window.
+ if (show_another_window)
+ {
+ ImGui::Begin("Another Window", &show_another_window); // Pass a pointer to our bool variable (the window will have a closing button that will clear the bool when clicked)
+ ImGui::Text("Hello from another window!");
+ if (ImGui::Button("Close Me"))
+ show_another_window = false;
+ ImGui::End();
+ }
+
+ // Rendering
+ ImGui::EndFrame();
+ g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, false);
+ g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, false);
+ g_pd3dDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, false);
+ D3DCOLOR clear_col_dx = D3DCOLOR_RGBA((int)(clear_color.x*255.0f), (int)(clear_color.y*255.0f), (int)(clear_color.z*255.0f), (int)(clear_color.w*255.0f));
+ g_pd3dDevice->Clear(0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, clear_col_dx, 1.0f, 0);
+ if (g_pd3dDevice->BeginScene() >= 0)
+ {
+ ImGui::Render();
+ ImGui_ImplDX9_RenderDrawData(ImGui::GetDrawData());
+ g_pd3dDevice->EndScene();
+ }
+ HRESULT result = g_pd3dDevice->Present(NULL, NULL, NULL, NULL);
+
+ // Handle loss of D3D9 device
+ if (result == D3DERR_DEVICELOST && g_pd3dDevice->TestCooperativeLevel() == D3DERR_DEVICENOTRESET)
+ {
+ ImGui_ImplDX9_InvalidateDeviceObjects();
+ g_pd3dDevice->Reset(&g_d3dpp);
+ ImGui_ImplDX9_CreateDeviceObjects();
+ }
+ }
+
+ ImGui_ImplDX9_Shutdown();
+ ImGui_ImplWin32_Shutdown();
+ ImGui::DestroyContext();
+
+ if (g_pd3dDevice) g_pd3dDevice->Release();
+ if (pD3D) pD3D->Release();
+ DestroyWindow(hwnd);
+ UnregisterClass(_T("ImGui Example"), wc.hInstance);
+
+ return 0;
+}
diff --git a/3rdparty/imgui/examples/imgui_examples.sln b/3rdparty/imgui/examples/imgui_examples.sln
new file mode 100644
index 00000000..49b2ff89
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_examples.sln
@@ -0,0 +1,68 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx9", "example_win32_directx9\example_win32_directx9.vcxproj", "{4165A294-21F2-44CA-9B38-E3F935ABADF5}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx10", "example_win32_directx10\example_win32_directx10.vcxproj", "{345A953E-A004-4648-B442-DC5F9F11068C}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_win32_directx11", "example_win32_directx11\example_win32_directx11.vcxproj", "{9F316E83-5AE5-4939-A723-305A94F48005}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl2", "example_glfw_opengl2\example_glfw_opengl2.vcxproj", "{9CDA7840-B7A5-496D-A527-E95571496D18}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "example_glfw_opengl3", "example_glfw_opengl3\example_glfw_opengl3.vcxproj", "{4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|Win32.Build.0 = Debug|Win32
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.ActiveCfg = Debug|x64
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Debug|x64.Build.0 = Debug|x64
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.ActiveCfg = Release|Win32
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|Win32.Build.0 = Release|Win32
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.ActiveCfg = Release|x64
+ {9CDA7840-B7A5-496D-A527-E95571496D18}.Release|x64.Build.0 = Release|x64
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|Win32.Build.0 = Debug|Win32
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.ActiveCfg = Debug|x64
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Debug|x64.Build.0 = Debug|x64
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.ActiveCfg = Release|Win32
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|Win32.Build.0 = Release|Win32
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.ActiveCfg = Release|x64
+ {4165A294-21F2-44CA-9B38-E3F935ABADF5}.Release|x64.Build.0 = Release|x64
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.ActiveCfg = Debug|Win32
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|Win32.Build.0 = Debug|Win32
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.ActiveCfg = Debug|x64
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Debug|x64.Build.0 = Debug|x64
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.ActiveCfg = Release|Win32
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Release|Win32.Build.0 = Release|Win32
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.ActiveCfg = Release|x64
+ {9F316E83-5AE5-4939-A723-305A94F48005}.Release|x64.Build.0 = Release|x64
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.ActiveCfg = Debug|Win32
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|Win32.Build.0 = Debug|Win32
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.ActiveCfg = Debug|x64
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Debug|x64.Build.0 = Debug|x64
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.ActiveCfg = Release|Win32
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|Win32.Build.0 = Release|Win32
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.ActiveCfg = Release|x64
+ {4A1FB5EA-22F5-42A8-AB92-1D2DF5D47FB9}.Release|x64.Build.0 = Release|x64
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.ActiveCfg = Debug|Win32
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|Win32.Build.0 = Debug|Win32
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.ActiveCfg = Debug|x64
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Debug|x64.Build.0 = Debug|x64
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.ActiveCfg = Release|Win32
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Release|Win32.Build.0 = Release|Win32
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.ActiveCfg = Release|x64
+ {345A953E-A004-4648-B442-DC5F9F11068C}.Release|x64.Build.0 = Release|x64
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+EndGlobal
diff --git a/3rdparty/imgui/examples/imgui_impl_allegro5.cpp b/3rdparty/imgui/examples/imgui_impl_allegro5.cpp
new file mode 100644
index 00000000..9a9c5801
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_allegro5.cpp
@@ -0,0 +1,388 @@
+// dear imgui: Renderer + Platform Binding for Allegro 5
+// (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+// [X] Platform: Clipboard support (from Allegro 5.1.12)
+// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
+// Issues:
+// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
+// [ ] Platform: Missing gamepad support.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-06-13: Platform: Added clipboard support (from Allegro 5.1.12).
+// 2018-06-13: Renderer: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-06-13: Renderer: Backup/restore transform and clipping rectangle.
+// 2018-06-11: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag.
+// 2018-04-18: Misc: Renamed file from imgui_impl_a5.cpp to imgui_impl_allegro5.cpp.
+// 2018-04-18: Misc: Added support for 32-bits vertex indices to avoid conversion at runtime. Added imconfig_allegro5.h to enforce 32-bit indices when included from imgui.h.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplAllegro5_RenderDrawData() in the .h file so you can call it yourself.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
+
+#include // uint64_t
+#include // memcpy
+#include "imgui.h"
+#include "imgui_impl_allegro5.h"
+
+// Allegro
+#include
+#include
+#ifdef _WIN32
+#include
+#endif
+#define ALLEGRO_HAS_CLIPBOARD (ALLEGRO_VERSION_INT >= ((5 << 24) | (1 << 16) | (12 << 8))) // Clipboard only supported from Allegro 5.1.12
+
+// Visual Studio warnings
+#ifdef _MSC_VER
+#pragma warning (disable: 4127) // condition expression is constant
+#endif
+
+// Data
+static ALLEGRO_DISPLAY* g_Display = NULL;
+static ALLEGRO_BITMAP* g_Texture = NULL;
+static double g_Time = 0.0;
+static ALLEGRO_MOUSE_CURSOR* g_MouseCursorInvisible = NULL;
+static ALLEGRO_VERTEX_DECL* g_VertexDecl = NULL;
+static char* g_ClipboardTextData = NULL;
+
+struct ImDrawVertAllegro
+{
+ ImVec2 pos;
+ ImVec2 uv;
+ ALLEGRO_COLOR col;
+};
+
+// Render function.
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data)
+{
+ // Backup Allegro state that will be modified
+ ALLEGRO_TRANSFORM last_transform = *al_get_current_transform();
+ ALLEGRO_TRANSFORM last_projection_transform = *al_get_current_projection_transform();
+ int last_clip_x, last_clip_y, last_clip_w, last_clip_h;
+ al_get_clipping_rectangle(&last_clip_x, &last_clip_y, &last_clip_w, &last_clip_h);
+ int last_blender_op, last_blender_src, last_blender_dst;
+ al_get_blender(&last_blender_op, &last_blender_src, &last_blender_dst);
+
+ // Setup render state
+ al_set_blender(ALLEGRO_ADD, ALLEGRO_ALPHA, ALLEGRO_INVERSE_ALPHA);
+
+ // Setup orthographic projection matrix
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
+ {
+ float L = draw_data->DisplayPos.x;
+ float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
+ float T = draw_data->DisplayPos.y;
+ float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
+ ALLEGRO_TRANSFORM transform;
+ al_identity_transform(&transform);
+ al_use_transform(&transform);
+ al_orthographic_transform(&transform, L, T, 1.0f, R, B, -1.0f);
+ al_use_projection_transform(&transform);
+ }
+
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+
+ // Allegro's implementation of al_draw_indexed_prim() for DX9 is completely broken. Unindex our buffers ourselves.
+ // FIXME-OPT: Unfortunately Allegro doesn't support 32-bits packed colors so we have to convert them to 4 float as well..
+ static ImVector vertices;
+ vertices.resize(cmd_list->IdxBuffer.Size);
+ for (int i = 0; i < cmd_list->IdxBuffer.Size; i++)
+ {
+ const ImDrawVert* src_v = &cmd_list->VtxBuffer[cmd_list->IdxBuffer[i]];
+ ImDrawVertAllegro* dst_v = &vertices[i];
+ dst_v->pos = src_v->pos;
+ dst_v->uv = src_v->uv;
+ unsigned char* c = (unsigned char*)&src_v->col;
+ dst_v->col = al_map_rgba(c[0], c[1], c[2], c[3]);
+ }
+
+ const int* indices = NULL;
+ if (sizeof(ImDrawIdx) == 2)
+ {
+ // FIXME-OPT: Unfortunately Allegro doesn't support 16-bit indices.. You can '#define ImDrawIdx int' in imconfig.h to request Dear ImGui to output 32-bit indices.
+ // Otherwise, we convert them from 16-bit to 32-bit at runtime here, which works perfectly but is a little wasteful.
+ static ImVector indices_converted;
+ indices_converted.resize(cmd_list->IdxBuffer.Size);
+ for (int i = 0; i < cmd_list->IdxBuffer.Size; ++i)
+ indices_converted[i] = (int)cmd_list->IdxBuffer.Data[i];
+ indices = indices_converted.Data;
+ }
+ else if (sizeof(ImDrawIdx) == 4)
+ {
+ indices = (const int*)cmd_list->IdxBuffer.Data;
+ }
+
+ int idx_offset = 0;
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ ALLEGRO_BITMAP* texture = (ALLEGRO_BITMAP*)pcmd->TextureId;
+ al_set_clipping_rectangle(pcmd->ClipRect.x - pos.x, pcmd->ClipRect.y - pos.y, pcmd->ClipRect.z - pcmd->ClipRect.x, pcmd->ClipRect.w - pcmd->ClipRect.y);
+ al_draw_prim(&vertices[0], g_VertexDecl, texture, idx_offset, idx_offset + pcmd->ElemCount, ALLEGRO_PRIM_TRIANGLE_LIST);
+ }
+ idx_offset += pcmd->ElemCount;
+ }
+ }
+
+ // Restore modified Allegro state
+ al_set_blender(last_blender_op, last_blender_src, last_blender_dst);
+ al_set_clipping_rectangle(last_clip_x, last_clip_y, last_clip_w, last_clip_h);
+ al_use_transform(&last_transform);
+ al_use_projection_transform(&last_projection_transform);
+}
+
+bool ImGui_ImplAllegro5_CreateDeviceObjects()
+{
+ // Build texture atlas
+ ImGuiIO &io = ImGui::GetIO();
+ unsigned char *pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+
+ // Create texture
+ int flags = al_get_new_bitmap_flags();
+ int fmt = al_get_new_bitmap_format();
+ al_set_new_bitmap_flags(ALLEGRO_MEMORY_BITMAP|ALLEGRO_MIN_LINEAR|ALLEGRO_MAG_LINEAR);
+ al_set_new_bitmap_format(ALLEGRO_PIXEL_FORMAT_ABGR_8888_LE);
+ ALLEGRO_BITMAP* img = al_create_bitmap(width, height);
+ al_set_new_bitmap_flags(flags);
+ al_set_new_bitmap_format(fmt);
+ if (!img)
+ return false;
+
+ ALLEGRO_LOCKED_REGION *locked_img = al_lock_bitmap(img, al_get_bitmap_format(img), ALLEGRO_LOCK_WRITEONLY);
+ if (!locked_img)
+ {
+ al_destroy_bitmap(img);
+ return false;
+ }
+ memcpy(locked_img->data, pixels, sizeof(int)*width*height);
+ al_unlock_bitmap(img);
+
+ // Convert software texture to hardware texture.
+ ALLEGRO_BITMAP* cloned_img = al_clone_bitmap(img);
+ al_destroy_bitmap(img);
+ if (!cloned_img)
+ return false;
+
+ // Store our identifier
+ io.Fonts->TexID = (void*)cloned_img;
+ g_Texture = cloned_img;
+
+ // Create an invisible mouse cursor
+ // Because al_hide_mouse_cursor() seems to mess up with the actual inputs..
+ ALLEGRO_BITMAP* mouse_cursor = al_create_bitmap(8,8);
+ g_MouseCursorInvisible = al_create_mouse_cursor(mouse_cursor, 0, 0);
+ al_destroy_bitmap(mouse_cursor);
+
+ return true;
+}
+
+void ImGui_ImplAllegro5_InvalidateDeviceObjects()
+{
+ if (g_Texture)
+ {
+ al_destroy_bitmap(g_Texture);
+ ImGui::GetIO().Fonts->TexID = NULL;
+ g_Texture = NULL;
+ }
+ if (g_MouseCursorInvisible)
+ {
+ al_destroy_mouse_cursor(g_MouseCursorInvisible);
+ g_MouseCursorInvisible = NULL;
+ }
+}
+
+#if ALLEGRO_HAS_CLIPBOARD
+static const char* ImGui_ImplAllegro5_GetClipboardText(void*)
+{
+ if (g_ClipboardTextData)
+ al_free(g_ClipboardTextData);
+ g_ClipboardTextData = al_get_clipboard_text(g_Display);
+ return g_ClipboardTextData;
+}
+
+static void ImGui_ImplAllegro5_SetClipboardText(void*, const char* text)
+{
+ al_set_clipboard_text(g_Display, text);
+}
+#endif
+
+bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
+{
+ g_Display = display;
+
+ // Setup back-end capabilities flags
+ ImGuiIO& io = ImGui::GetIO();
+ io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
+
+ // Create custom vertex declaration.
+ // Unfortunately Allegro doesn't support 32-bits packed colors so we have to convert them to 4 floats.
+ // We still use a custom declaration to use 'ALLEGRO_PRIM_TEX_COORD' instead of 'ALLEGRO_PRIM_TEX_COORD_PIXEL' else we can't do a reliable conversion.
+ ALLEGRO_VERTEX_ELEMENT elems[] =
+ {
+ { ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, pos) },
+ { ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, uv) },
+ { ALLEGRO_PRIM_COLOR_ATTR, 0, IM_OFFSETOF(ImDrawVertAllegro, col) },
+ { 0, 0, 0 }
+ };
+ g_VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));
+
+ io.KeyMap[ImGuiKey_Tab] = ALLEGRO_KEY_TAB;
+ io.KeyMap[ImGuiKey_LeftArrow] = ALLEGRO_KEY_LEFT;
+ io.KeyMap[ImGuiKey_RightArrow] = ALLEGRO_KEY_RIGHT;
+ io.KeyMap[ImGuiKey_UpArrow] = ALLEGRO_KEY_UP;
+ io.KeyMap[ImGuiKey_DownArrow] = ALLEGRO_KEY_DOWN;
+ io.KeyMap[ImGuiKey_PageUp] = ALLEGRO_KEY_PGUP;
+ io.KeyMap[ImGuiKey_PageDown] = ALLEGRO_KEY_PGDN;
+ io.KeyMap[ImGuiKey_Home] = ALLEGRO_KEY_HOME;
+ io.KeyMap[ImGuiKey_End] = ALLEGRO_KEY_END;
+ io.KeyMap[ImGuiKey_Insert] = ALLEGRO_KEY_INSERT;
+ io.KeyMap[ImGuiKey_Delete] = ALLEGRO_KEY_DELETE;
+ io.KeyMap[ImGuiKey_Backspace] = ALLEGRO_KEY_BACKSPACE;
+ io.KeyMap[ImGuiKey_Space] = ALLEGRO_KEY_SPACE;
+ io.KeyMap[ImGuiKey_Enter] = ALLEGRO_KEY_ENTER;
+ io.KeyMap[ImGuiKey_Escape] = ALLEGRO_KEY_ESCAPE;
+ io.KeyMap[ImGuiKey_A] = ALLEGRO_KEY_A;
+ io.KeyMap[ImGuiKey_C] = ALLEGRO_KEY_C;
+ io.KeyMap[ImGuiKey_V] = ALLEGRO_KEY_V;
+ io.KeyMap[ImGuiKey_X] = ALLEGRO_KEY_X;
+ io.KeyMap[ImGuiKey_Y] = ALLEGRO_KEY_Y;
+ io.KeyMap[ImGuiKey_Z] = ALLEGRO_KEY_Z;
+
+#if ALLEGRO_HAS_CLIPBOARD
+ io.SetClipboardTextFn = ImGui_ImplAllegro5_SetClipboardText;
+ io.GetClipboardTextFn = ImGui_ImplAllegro5_GetClipboardText;
+ io.ClipboardUserData = NULL;
+#endif
+
+ return true;
+}
+
+void ImGui_ImplAllegro5_Shutdown()
+{
+ ImGui_ImplAllegro5_InvalidateDeviceObjects();
+ g_Display = NULL;
+
+ // Destroy last known clipboard data
+ if (g_ClipboardTextData)
+ al_free(g_ClipboardTextData);
+ g_ClipboardTextData = NULL;
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT *ev)
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ switch (ev->type)
+ {
+ case ALLEGRO_EVENT_MOUSE_AXES:
+ io.MouseWheel += ev->mouse.dz;
+ io.MouseWheelH += ev->mouse.dw;
+ return true;
+ case ALLEGRO_EVENT_KEY_CHAR:
+ if (ev->keyboard.display == g_Display)
+ if (ev->keyboard.unichar > 0 && ev->keyboard.unichar < 0x10000)
+ io.AddInputCharacter((unsigned short)ev->keyboard.unichar);
+ return true;
+ case ALLEGRO_EVENT_KEY_DOWN:
+ case ALLEGRO_EVENT_KEY_UP:
+ if (ev->keyboard.display == g_Display)
+ io.KeysDown[ev->keyboard.keycode] = (ev->type == ALLEGRO_EVENT_KEY_DOWN);
+ return true;
+ }
+ return false;
+}
+
+static void ImGui_ImplAllegro5_UpdateMouseCursor()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
+ return;
+
+ ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
+ if (io.MouseDrawCursor || imgui_cursor == ImGuiMouseCursor_None)
+ {
+ // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
+ al_set_mouse_cursor(g_Display, g_MouseCursorInvisible);
+ }
+ else
+ {
+ ALLEGRO_SYSTEM_MOUSE_CURSOR cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_DEFAULT;
+ switch (imgui_cursor)
+ {
+ case ImGuiMouseCursor_TextInput: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_EDIT; break;
+ case ImGuiMouseCursor_ResizeAll: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_MOVE; break;
+ case ImGuiMouseCursor_ResizeNS: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_N; break;
+ case ImGuiMouseCursor_ResizeEW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_E; break;
+ case ImGuiMouseCursor_ResizeNESW: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NE; break;
+ case ImGuiMouseCursor_ResizeNWSE: cursor_id = ALLEGRO_SYSTEM_MOUSE_CURSOR_RESIZE_NW; break;
+ }
+ al_set_system_mouse_cursor(g_Display, cursor_id);
+ }
+}
+
+void ImGui_ImplAllegro5_NewFrame()
+{
+ if (!g_Texture)
+ ImGui_ImplAllegro5_CreateDeviceObjects();
+
+ ImGuiIO &io = ImGui::GetIO();
+
+ // Setup display size (every frame to accommodate for window resizing)
+ int w, h;
+ w = al_get_display_width(g_Display);
+ h = al_get_display_height(g_Display);
+ io.DisplaySize = ImVec2((float)w, (float)h);
+
+ // Setup time step
+ double current_time = al_get_time();
+ io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f/60.0f);
+ g_Time = current_time;
+
+ // Setup inputs
+ ALLEGRO_KEYBOARD_STATE keys;
+ al_get_keyboard_state(&keys);
+ io.KeyCtrl = al_key_down(&keys, ALLEGRO_KEY_LCTRL) || al_key_down(&keys, ALLEGRO_KEY_RCTRL);
+ io.KeyShift = al_key_down(&keys, ALLEGRO_KEY_LSHIFT) || al_key_down(&keys, ALLEGRO_KEY_RSHIFT);
+ io.KeyAlt = al_key_down(&keys, ALLEGRO_KEY_ALT) || al_key_down(&keys, ALLEGRO_KEY_ALTGR);
+ io.KeySuper = al_key_down(&keys, ALLEGRO_KEY_LWIN) || al_key_down(&keys, ALLEGRO_KEY_RWIN);
+
+ ALLEGRO_MOUSE_STATE mouse;
+ if (keys.display == g_Display)
+ {
+ al_get_mouse_state(&mouse);
+ io.MousePos = ImVec2((float)mouse.x, (float)mouse.y);
+ }
+ else
+ {
+ io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
+ }
+
+ al_get_mouse_state(&mouse);
+ io.MouseDown[0] = mouse.buttons & (1 << 0);
+ io.MouseDown[1] = mouse.buttons & (1 << 1);
+ io.MouseDown[2] = mouse.buttons & (1 << 2);
+
+ ImGui_ImplAllegro5_UpdateMouseCursor();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_allegro5.h b/3rdparty/imgui/examples/imgui_impl_allegro5.h
new file mode 100644
index 00000000..bc995a5a
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_allegro5.h
@@ -0,0 +1,29 @@
+// dear imgui: Renderer + Platform Binding for Allegro 5
+// (Info: Allegro 5 is a cross-platform general purpose library for handling windows, inputs, graphics, etc.)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'ALLEGRO_BITMAP*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+// [X] Platform: Clipboard support (from Allegro 5.1.12)
+// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
+// Issues:
+// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
+// [ ] Platform: Missing gamepad support.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui, Original Allegro 5 code by @birthggd
+
+#pragma once
+
+struct ALLEGRO_DISPLAY;
+union ALLEGRO_EVENT;
+
+IMGUI_IMPL_API bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display);
+IMGUI_IMPL_API void ImGui_ImplAllegro5_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplAllegro5_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplAllegro5_RenderDrawData(ImDrawData* draw_data);
+IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event);
+
+// Use if you want to reset your rendering device without losing ImGui state.
+IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects();
+IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_dx10.cpp b/3rdparty/imgui/examples/imgui_impl_dx10.cpp
new file mode 100644
index 00000000..f8fdef82
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx10.cpp
@@ -0,0 +1,495 @@
+// dear imgui: Renderer for DirectX10
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-07-13: DirectX10: Fixed unreleased resources in Init and Shutdown functions.
+// 2018-06-08: Misc: Extracted imgui_impl_dx10.cpp/.h away from the old combined DX10+Win32 example.
+// 2018-06-08: DirectX10: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-04-09: Misc: Fixed erroneous call to io.Fonts->ClearInputData() + ClearTexData() that was left in DX10 example but removed in 1.47 (Nov 2015) on other back-ends.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX10_RenderDrawData() in the .h file so you can call it yourself.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2016-05-07: DirectX10: Disabling depth-write.
+
+#include "imgui.h"
+#include "imgui_impl_dx10.h"
+
+// DirectX
+#include
+#include
+#include
+#include
+
+// DirectX data
+static ID3D10Device* g_pd3dDevice = NULL;
+static IDXGIFactory* g_pFactory = NULL;
+static ID3D10Buffer* g_pVB = NULL;
+static ID3D10Buffer* g_pIB = NULL;
+static ID3D10Blob* g_pVertexShaderBlob = NULL;
+static ID3D10VertexShader* g_pVertexShader = NULL;
+static ID3D10InputLayout* g_pInputLayout = NULL;
+static ID3D10Buffer* g_pVertexConstantBuffer = NULL;
+static ID3D10Blob* g_pPixelShaderBlob = NULL;
+static ID3D10PixelShader* g_pPixelShader = NULL;
+static ID3D10SamplerState* g_pFontSampler = NULL;
+static ID3D10ShaderResourceView*g_pFontTextureView = NULL;
+static ID3D10RasterizerState* g_pRasterizerState = NULL;
+static ID3D10BlendState* g_pBlendState = NULL;
+static ID3D10DepthStencilState* g_pDepthStencilState = NULL;
+static int g_VertexBufferSize = 5000, g_IndexBufferSize = 10000;
+
+struct VERTEX_CONSTANT_BUFFER
+{
+ float mvp[4][4];
+};
+
+// Render function
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data)
+{
+ ID3D10Device* ctx = g_pd3dDevice;
+
+ // Create and grow vertex/index buffers if needed
+ if (!g_pVB || g_VertexBufferSize < draw_data->TotalVtxCount)
+ {
+ if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }
+ g_VertexBufferSize = draw_data->TotalVtxCount + 5000;
+ D3D10_BUFFER_DESC desc;
+ memset(&desc, 0, sizeof(D3D10_BUFFER_DESC));
+ desc.Usage = D3D10_USAGE_DYNAMIC;
+ desc.ByteWidth = g_VertexBufferSize * sizeof(ImDrawVert);
+ desc.BindFlags = D3D10_BIND_VERTEX_BUFFER;
+ desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
+ desc.MiscFlags = 0;
+ if (ctx->CreateBuffer(&desc, NULL, &g_pVB) < 0)
+ return;
+ }
+
+ if (!g_pIB || g_IndexBufferSize < draw_data->TotalIdxCount)
+ {
+ if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
+ g_IndexBufferSize = draw_data->TotalIdxCount + 10000;
+ D3D10_BUFFER_DESC desc;
+ memset(&desc, 0, sizeof(D3D10_BUFFER_DESC));
+ desc.Usage = D3D10_USAGE_DYNAMIC;
+ desc.ByteWidth = g_IndexBufferSize * sizeof(ImDrawIdx);
+ desc.BindFlags = D3D10_BIND_INDEX_BUFFER;
+ desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
+ if (ctx->CreateBuffer(&desc, NULL, &g_pIB) < 0)
+ return;
+ }
+
+ // Copy and convert all vertices into a single contiguous buffer
+ ImDrawVert* vtx_dst = NULL;
+ ImDrawIdx* idx_dst = NULL;
+ g_pVB->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&vtx_dst);
+ g_pIB->Map(D3D10_MAP_WRITE_DISCARD, 0, (void**)&idx_dst);
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ memcpy(vtx_dst, cmd_list->VtxBuffer.Data, cmd_list->VtxBuffer.Size * sizeof(ImDrawVert));
+ memcpy(idx_dst, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
+ vtx_dst += cmd_list->VtxBuffer.Size;
+ idx_dst += cmd_list->IdxBuffer.Size;
+ }
+ g_pVB->Unmap();
+ g_pIB->Unmap();
+
+ // Setup orthographic projection matrix into our constant buffer
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
+ {
+ void* mapped_resource;
+ if (g_pVertexConstantBuffer->Map(D3D10_MAP_WRITE_DISCARD, 0, &mapped_resource) != S_OK)
+ return;
+ VERTEX_CONSTANT_BUFFER* constant_buffer = (VERTEX_CONSTANT_BUFFER*)mapped_resource;
+ float L = draw_data->DisplayPos.x;
+ float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
+ float T = draw_data->DisplayPos.y;
+ float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
+ float mvp[4][4] =
+ {
+ { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
+ { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
+ { 0.0f, 0.0f, 0.5f, 0.0f },
+ { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
+ };
+ memcpy(&constant_buffer->mvp, mvp, sizeof(mvp));
+ g_pVertexConstantBuffer->Unmap();
+ }
+
+ // Backup DX state that will be modified to restore it afterwards (unfortunately this is very ugly looking and verbose. Close your eyes!)
+ struct BACKUP_DX10_STATE
+ {
+ UINT ScissorRectsCount, ViewportsCount;
+ D3D10_RECT ScissorRects[D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
+ D3D10_VIEWPORT Viewports[D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
+ ID3D10RasterizerState* RS;
+ ID3D10BlendState* BlendState;
+ FLOAT BlendFactor[4];
+ UINT SampleMask;
+ UINT StencilRef;
+ ID3D10DepthStencilState* DepthStencilState;
+ ID3D10ShaderResourceView* PSShaderResource;
+ ID3D10SamplerState* PSSampler;
+ ID3D10PixelShader* PS;
+ ID3D10VertexShader* VS;
+ D3D10_PRIMITIVE_TOPOLOGY PrimitiveTopology;
+ ID3D10Buffer* IndexBuffer, *VertexBuffer, *VSConstantBuffer;
+ UINT IndexBufferOffset, VertexBufferStride, VertexBufferOffset;
+ DXGI_FORMAT IndexBufferFormat;
+ ID3D10InputLayout* InputLayout;
+ };
+ BACKUP_DX10_STATE old;
+ old.ScissorRectsCount = old.ViewportsCount = D3D10_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE;
+ ctx->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects);
+ ctx->RSGetViewports(&old.ViewportsCount, old.Viewports);
+ ctx->RSGetState(&old.RS);
+ ctx->OMGetBlendState(&old.BlendState, old.BlendFactor, &old.SampleMask);
+ ctx->OMGetDepthStencilState(&old.DepthStencilState, &old.StencilRef);
+ ctx->PSGetShaderResources(0, 1, &old.PSShaderResource);
+ ctx->PSGetSamplers(0, 1, &old.PSSampler);
+ ctx->PSGetShader(&old.PS);
+ ctx->VSGetShader(&old.VS);
+ ctx->VSGetConstantBuffers(0, 1, &old.VSConstantBuffer);
+ ctx->IAGetPrimitiveTopology(&old.PrimitiveTopology);
+ ctx->IAGetIndexBuffer(&old.IndexBuffer, &old.IndexBufferFormat, &old.IndexBufferOffset);
+ ctx->IAGetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset);
+ ctx->IAGetInputLayout(&old.InputLayout);
+
+ // Setup viewport
+ D3D10_VIEWPORT vp;
+ memset(&vp, 0, sizeof(D3D10_VIEWPORT));
+ vp.Width = (UINT)draw_data->DisplaySize.x;
+ vp.Height = (UINT)draw_data->DisplaySize.y;
+ vp.MinDepth = 0.0f;
+ vp.MaxDepth = 1.0f;
+ vp.TopLeftX = vp.TopLeftY = 0;
+ ctx->RSSetViewports(1, &vp);
+
+ // Bind shader and vertex buffers
+ unsigned int stride = sizeof(ImDrawVert);
+ unsigned int offset = 0;
+ ctx->IASetInputLayout(g_pInputLayout);
+ ctx->IASetVertexBuffers(0, 1, &g_pVB, &stride, &offset);
+ ctx->IASetIndexBuffer(g_pIB, sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT, 0);
+ ctx->IASetPrimitiveTopology(D3D10_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ctx->VSSetShader(g_pVertexShader);
+ ctx->VSSetConstantBuffers(0, 1, &g_pVertexConstantBuffer);
+ ctx->PSSetShader(g_pPixelShader);
+ ctx->PSSetSamplers(0, 1, &g_pFontSampler);
+
+ // Setup render state
+ const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
+ ctx->OMSetBlendState(g_pBlendState, blend_factor, 0xffffffff);
+ ctx->OMSetDepthStencilState(g_pDepthStencilState, 0);
+ ctx->RSSetState(g_pRasterizerState);
+
+ // Render command lists
+ int vtx_offset = 0;
+ int idx_offset = 0;
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ // User callback (registered via ImDrawList::AddCallback)
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ // Apply scissor/clipping rectangle
+ const D3D10_RECT r = { (LONG)(pcmd->ClipRect.x - pos.x), (LONG)(pcmd->ClipRect.y - pos.y), (LONG)(pcmd->ClipRect.z - pos.x), (LONG)(pcmd->ClipRect.w - pos.y)};
+ ctx->RSSetScissorRects(1, &r);
+
+ // Bind texture, Draw
+ ID3D10ShaderResourceView* texture_srv = (ID3D10ShaderResourceView*)pcmd->TextureId;
+ ctx->PSSetShaderResources(0, 1, &texture_srv);
+ ctx->DrawIndexed(pcmd->ElemCount, idx_offset, vtx_offset);
+ }
+ idx_offset += pcmd->ElemCount;
+ }
+ vtx_offset += cmd_list->VtxBuffer.Size;
+ }
+
+ // Restore modified DX state
+ ctx->RSSetScissorRects(old.ScissorRectsCount, old.ScissorRects);
+ ctx->RSSetViewports(old.ViewportsCount, old.Viewports);
+ ctx->RSSetState(old.RS); if (old.RS) old.RS->Release();
+ ctx->OMSetBlendState(old.BlendState, old.BlendFactor, old.SampleMask); if (old.BlendState) old.BlendState->Release();
+ ctx->OMSetDepthStencilState(old.DepthStencilState, old.StencilRef); if (old.DepthStencilState) old.DepthStencilState->Release();
+ ctx->PSSetShaderResources(0, 1, &old.PSShaderResource); if (old.PSShaderResource) old.PSShaderResource->Release();
+ ctx->PSSetSamplers(0, 1, &old.PSSampler); if (old.PSSampler) old.PSSampler->Release();
+ ctx->PSSetShader(old.PS); if (old.PS) old.PS->Release();
+ ctx->VSSetShader(old.VS); if (old.VS) old.VS->Release();
+ ctx->VSSetConstantBuffers(0, 1, &old.VSConstantBuffer); if (old.VSConstantBuffer) old.VSConstantBuffer->Release();
+ ctx->IASetPrimitiveTopology(old.PrimitiveTopology);
+ ctx->IASetIndexBuffer(old.IndexBuffer, old.IndexBufferFormat, old.IndexBufferOffset); if (old.IndexBuffer) old.IndexBuffer->Release();
+ ctx->IASetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset); if (old.VertexBuffer) old.VertexBuffer->Release();
+ ctx->IASetInputLayout(old.InputLayout); if (old.InputLayout) old.InputLayout->Release();
+}
+
+static void ImGui_ImplDX10_CreateFontsTexture()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+
+ // Upload texture to graphics system
+ {
+ D3D10_TEXTURE2D_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.Width = width;
+ desc.Height = height;
+ desc.MipLevels = 1;
+ desc.ArraySize = 1;
+ desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ desc.SampleDesc.Count = 1;
+ desc.Usage = D3D10_USAGE_DEFAULT;
+ desc.BindFlags = D3D10_BIND_SHADER_RESOURCE;
+ desc.CPUAccessFlags = 0;
+
+ ID3D10Texture2D *pTexture = NULL;
+ D3D10_SUBRESOURCE_DATA subResource;
+ subResource.pSysMem = pixels;
+ subResource.SysMemPitch = desc.Width * 4;
+ subResource.SysMemSlicePitch = 0;
+ g_pd3dDevice->CreateTexture2D(&desc, &subResource, &pTexture);
+
+ // Create texture view
+ D3D10_SHADER_RESOURCE_VIEW_DESC srv_desc;
+ ZeroMemory(&srv_desc, sizeof(srv_desc));
+ srv_desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ srv_desc.ViewDimension = D3D10_SRV_DIMENSION_TEXTURE2D;
+ srv_desc.Texture2D.MipLevels = desc.MipLevels;
+ srv_desc.Texture2D.MostDetailedMip = 0;
+ g_pd3dDevice->CreateShaderResourceView(pTexture, &srv_desc, &g_pFontTextureView);
+ pTexture->Release();
+ }
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)g_pFontTextureView;
+
+ // Create texture sampler
+ {
+ D3D10_SAMPLER_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.Filter = D3D10_FILTER_MIN_MAG_MIP_LINEAR;
+ desc.AddressU = D3D10_TEXTURE_ADDRESS_WRAP;
+ desc.AddressV = D3D10_TEXTURE_ADDRESS_WRAP;
+ desc.AddressW = D3D10_TEXTURE_ADDRESS_WRAP;
+ desc.MipLODBias = 0.f;
+ desc.ComparisonFunc = D3D10_COMPARISON_ALWAYS;
+ desc.MinLOD = 0.f;
+ desc.MaxLOD = 0.f;
+ g_pd3dDevice->CreateSamplerState(&desc, &g_pFontSampler);
+ }
+}
+
+bool ImGui_ImplDX10_CreateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return false;
+ if (g_pFontSampler)
+ ImGui_ImplDX10_InvalidateDeviceObjects();
+
+ // By using D3DCompile() from / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
+ // If you would like to use this DX10 sample code but remove this dependency you can:
+ // 1) compile once, save the compiled shader blobs into a file or source code and pass them to CreateVertexShader()/CreatePixelShader() [preferred solution]
+ // 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
+ // See https://github.com/ocornut/imgui/pull/638 for sources and details.
+
+ // Create the vertex shader
+ {
+ static const char* vertexShader =
+ "cbuffer vertexBuffer : register(b0) \
+ {\
+ float4x4 ProjectionMatrix; \
+ };\
+ struct VS_INPUT\
+ {\
+ float2 pos : POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ \
+ struct PS_INPUT\
+ {\
+ float4 pos : SV_POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ \
+ PS_INPUT main(VS_INPUT input)\
+ {\
+ PS_INPUT output;\
+ output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
+ output.col = input.col;\
+ output.uv = input.uv;\
+ return output;\
+ }";
+
+ D3DCompile(vertexShader, strlen(vertexShader), NULL, NULL, NULL, "main", "vs_4_0", 0, 0, &g_pVertexShaderBlob, NULL);
+ if (g_pVertexShaderBlob == NULL) // NB: Pass ID3D10Blob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
+ return false;
+ if (g_pd3dDevice->CreateVertexShader((DWORD*)g_pVertexShaderBlob->GetBufferPointer(), g_pVertexShaderBlob->GetBufferSize(), &g_pVertexShader) != S_OK)
+ return false;
+
+ // Create the input layout
+ D3D10_INPUT_ELEMENT_DESC local_layout[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->pos), D3D10_INPUT_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->uv), D3D10_INPUT_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (size_t)(&((ImDrawVert*)0)->col), D3D10_INPUT_PER_VERTEX_DATA, 0 },
+ };
+ if (g_pd3dDevice->CreateInputLayout(local_layout, 3, g_pVertexShaderBlob->GetBufferPointer(), g_pVertexShaderBlob->GetBufferSize(), &g_pInputLayout) != S_OK)
+ return false;
+
+ // Create the constant buffer
+ {
+ D3D10_BUFFER_DESC desc;
+ desc.ByteWidth = sizeof(VERTEX_CONSTANT_BUFFER);
+ desc.Usage = D3D10_USAGE_DYNAMIC;
+ desc.BindFlags = D3D10_BIND_CONSTANT_BUFFER;
+ desc.CPUAccessFlags = D3D10_CPU_ACCESS_WRITE;
+ desc.MiscFlags = 0;
+ g_pd3dDevice->CreateBuffer(&desc, NULL, &g_pVertexConstantBuffer);
+ }
+ }
+
+ // Create the pixel shader
+ {
+ static const char* pixelShader =
+ "struct PS_INPUT\
+ {\
+ float4 pos : SV_POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ sampler sampler0;\
+ Texture2D texture0;\
+ \
+ float4 main(PS_INPUT input) : SV_Target\
+ {\
+ float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
+ return out_col; \
+ }";
+
+ D3DCompile(pixelShader, strlen(pixelShader), NULL, NULL, NULL, "main", "ps_4_0", 0, 0, &g_pPixelShaderBlob, NULL);
+ if (g_pPixelShaderBlob == NULL) // NB: Pass ID3D10Blob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
+ return false;
+ if (g_pd3dDevice->CreatePixelShader((DWORD*)g_pPixelShaderBlob->GetBufferPointer(), g_pPixelShaderBlob->GetBufferSize(), &g_pPixelShader) != S_OK)
+ return false;
+ }
+
+ // Create the blending setup
+ {
+ D3D10_BLEND_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.AlphaToCoverageEnable = false;
+ desc.BlendEnable[0] = true;
+ desc.SrcBlend = D3D10_BLEND_SRC_ALPHA;
+ desc.DestBlend = D3D10_BLEND_INV_SRC_ALPHA;
+ desc.BlendOp = D3D10_BLEND_OP_ADD;
+ desc.SrcBlendAlpha = D3D10_BLEND_INV_SRC_ALPHA;
+ desc.DestBlendAlpha = D3D10_BLEND_ZERO;
+ desc.BlendOpAlpha = D3D10_BLEND_OP_ADD;
+ desc.RenderTargetWriteMask[0] = D3D10_COLOR_WRITE_ENABLE_ALL;
+ g_pd3dDevice->CreateBlendState(&desc, &g_pBlendState);
+ }
+
+ // Create the rasterizer state
+ {
+ D3D10_RASTERIZER_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.FillMode = D3D10_FILL_SOLID;
+ desc.CullMode = D3D10_CULL_NONE;
+ desc.ScissorEnable = true;
+ desc.DepthClipEnable = true;
+ g_pd3dDevice->CreateRasterizerState(&desc, &g_pRasterizerState);
+ }
+
+ // Create depth-stencil State
+ {
+ D3D10_DEPTH_STENCIL_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.DepthEnable = false;
+ desc.DepthWriteMask = D3D10_DEPTH_WRITE_MASK_ALL;
+ desc.DepthFunc = D3D10_COMPARISON_ALWAYS;
+ desc.StencilEnable = false;
+ desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D10_STENCIL_OP_KEEP;
+ desc.FrontFace.StencilFunc = D3D10_COMPARISON_ALWAYS;
+ desc.BackFace = desc.FrontFace;
+ g_pd3dDevice->CreateDepthStencilState(&desc, &g_pDepthStencilState);
+ }
+
+ ImGui_ImplDX10_CreateFontsTexture();
+
+ return true;
+}
+
+void ImGui_ImplDX10_InvalidateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return;
+
+ if (g_pFontSampler) { g_pFontSampler->Release(); g_pFontSampler = NULL; }
+ if (g_pFontTextureView) { g_pFontTextureView->Release(); g_pFontTextureView = NULL; ImGui::GetIO().Fonts->TexID = NULL; } // We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
+ if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
+ if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }
+
+ if (g_pBlendState) { g_pBlendState->Release(); g_pBlendState = NULL; }
+ if (g_pDepthStencilState) { g_pDepthStencilState->Release(); g_pDepthStencilState = NULL; }
+ if (g_pRasterizerState) { g_pRasterizerState->Release(); g_pRasterizerState = NULL; }
+ if (g_pPixelShader) { g_pPixelShader->Release(); g_pPixelShader = NULL; }
+ if (g_pPixelShaderBlob) { g_pPixelShaderBlob->Release(); g_pPixelShaderBlob = NULL; }
+ if (g_pVertexConstantBuffer) { g_pVertexConstantBuffer->Release(); g_pVertexConstantBuffer = NULL; }
+ if (g_pInputLayout) { g_pInputLayout->Release(); g_pInputLayout = NULL; }
+ if (g_pVertexShader) { g_pVertexShader->Release(); g_pVertexShader = NULL; }
+ if (g_pVertexShaderBlob) { g_pVertexShaderBlob->Release(); g_pVertexShaderBlob = NULL; }
+}
+
+bool ImGui_ImplDX10_Init(ID3D10Device* device)
+{
+ // Get factory from device
+ IDXGIDevice* pDXGIDevice = NULL;
+ IDXGIAdapter* pDXGIAdapter = NULL;
+ IDXGIFactory* pFactory = NULL;
+
+ if (device->QueryInterface(IID_PPV_ARGS(&pDXGIDevice)) == S_OK)
+ if (pDXGIDevice->GetParent(IID_PPV_ARGS(&pDXGIAdapter)) == S_OK)
+ if (pDXGIAdapter->GetParent(IID_PPV_ARGS(&pFactory)) == S_OK)
+ {
+ g_pd3dDevice = device;
+ g_pFactory = pFactory;
+ }
+ if (pDXGIDevice) pDXGIDevice->Release();
+ if (pDXGIAdapter) pDXGIAdapter->Release();
+
+ return true;
+}
+
+void ImGui_ImplDX10_Shutdown()
+{
+ ImGui_ImplDX10_InvalidateDeviceObjects();
+ if (g_pFactory) { g_pFactory->Release(); g_pFactory = NULL; }
+ g_pd3dDevice = NULL;
+}
+
+void ImGui_ImplDX10_NewFrame()
+{
+ if (!g_pFontSampler)
+ ImGui_ImplDX10_CreateDeviceObjects();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_dx10.h b/3rdparty/imgui/examples/imgui_impl_dx10.h
new file mode 100644
index 00000000..263073ef
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx10.h
@@ -0,0 +1,20 @@
+// dear imgui: Renderer for DirectX10
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'ID3D10ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+struct ID3D10Device;
+
+IMGUI_IMPL_API bool ImGui_ImplDX10_Init(ID3D10Device* device);
+IMGUI_IMPL_API void ImGui_ImplDX10_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplDX10_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data);
+
+// Use if you want to reset your rendering device without losing ImGui state.
+IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects();
+IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_dx11.cpp b/3rdparty/imgui/examples/imgui_impl_dx11.cpp
new file mode 100644
index 00000000..052f484f
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx11.cpp
@@ -0,0 +1,504 @@
+// dear imgui: Renderer for DirectX11
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-08-01: DirectX11: Querying for IDXGIFactory instead of IDXGIFactory1 to increase compatibility.
+// 2018-07-13: DirectX11: Fixed unreleased resources in Init and Shutdown functions.
+// 2018-06-08: Misc: Extracted imgui_impl_dx11.cpp/.h away from the old combined DX11+Win32 example.
+// 2018-06-08: DirectX11: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX11_RenderDrawData() in the .h file so you can call it yourself.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2016-05-07: DirectX11: Disabling depth-write.
+
+#include "imgui.h"
+#include "imgui_impl_dx11.h"
+
+// DirectX
+#include
+#include
+#include
+
+// DirectX data
+static ID3D11Device* g_pd3dDevice = NULL;
+static ID3D11DeviceContext* g_pd3dDeviceContext = NULL;
+static IDXGIFactory* g_pFactory = NULL;
+static ID3D11Buffer* g_pVB = NULL;
+static ID3D11Buffer* g_pIB = NULL;
+static ID3D10Blob* g_pVertexShaderBlob = NULL;
+static ID3D11VertexShader* g_pVertexShader = NULL;
+static ID3D11InputLayout* g_pInputLayout = NULL;
+static ID3D11Buffer* g_pVertexConstantBuffer = NULL;
+static ID3D10Blob* g_pPixelShaderBlob = NULL;
+static ID3D11PixelShader* g_pPixelShader = NULL;
+static ID3D11SamplerState* g_pFontSampler = NULL;
+static ID3D11ShaderResourceView*g_pFontTextureView = NULL;
+static ID3D11RasterizerState* g_pRasterizerState = NULL;
+static ID3D11BlendState* g_pBlendState = NULL;
+static ID3D11DepthStencilState* g_pDepthStencilState = NULL;
+static int g_VertexBufferSize = 5000, g_IndexBufferSize = 10000;
+
+struct VERTEX_CONSTANT_BUFFER
+{
+ float mvp[4][4];
+};
+
+// Render function
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data)
+{
+ ID3D11DeviceContext* ctx = g_pd3dDeviceContext;
+
+ // Create and grow vertex/index buffers if needed
+ if (!g_pVB || g_VertexBufferSize < draw_data->TotalVtxCount)
+ {
+ if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }
+ g_VertexBufferSize = draw_data->TotalVtxCount + 5000;
+ D3D11_BUFFER_DESC desc;
+ memset(&desc, 0, sizeof(D3D11_BUFFER_DESC));
+ desc.Usage = D3D11_USAGE_DYNAMIC;
+ desc.ByteWidth = g_VertexBufferSize * sizeof(ImDrawVert);
+ desc.BindFlags = D3D11_BIND_VERTEX_BUFFER;
+ desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ desc.MiscFlags = 0;
+ if (g_pd3dDevice->CreateBuffer(&desc, NULL, &g_pVB) < 0)
+ return;
+ }
+ if (!g_pIB || g_IndexBufferSize < draw_data->TotalIdxCount)
+ {
+ if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
+ g_IndexBufferSize = draw_data->TotalIdxCount + 10000;
+ D3D11_BUFFER_DESC desc;
+ memset(&desc, 0, sizeof(D3D11_BUFFER_DESC));
+ desc.Usage = D3D11_USAGE_DYNAMIC;
+ desc.ByteWidth = g_IndexBufferSize * sizeof(ImDrawIdx);
+ desc.BindFlags = D3D11_BIND_INDEX_BUFFER;
+ desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ if (g_pd3dDevice->CreateBuffer(&desc, NULL, &g_pIB) < 0)
+ return;
+ }
+
+ // Copy and convert all vertices into a single contiguous buffer
+ D3D11_MAPPED_SUBRESOURCE vtx_resource, idx_resource;
+ if (ctx->Map(g_pVB, 0, D3D11_MAP_WRITE_DISCARD, 0, &vtx_resource) != S_OK)
+ return;
+ if (ctx->Map(g_pIB, 0, D3D11_MAP_WRITE_DISCARD, 0, &idx_resource) != S_OK)
+ return;
+ ImDrawVert* vtx_dst = (ImDrawVert*)vtx_resource.pData;
+ ImDrawIdx* idx_dst = (ImDrawIdx*)idx_resource.pData;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ memcpy(vtx_dst, cmd_list->VtxBuffer.Data, cmd_list->VtxBuffer.Size * sizeof(ImDrawVert));
+ memcpy(idx_dst, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
+ vtx_dst += cmd_list->VtxBuffer.Size;
+ idx_dst += cmd_list->IdxBuffer.Size;
+ }
+ ctx->Unmap(g_pVB, 0);
+ ctx->Unmap(g_pIB, 0);
+
+ // Setup orthographic projection matrix into our constant buffer
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
+ {
+ D3D11_MAPPED_SUBRESOURCE mapped_resource;
+ if (ctx->Map(g_pVertexConstantBuffer, 0, D3D11_MAP_WRITE_DISCARD, 0, &mapped_resource) != S_OK)
+ return;
+ VERTEX_CONSTANT_BUFFER* constant_buffer = (VERTEX_CONSTANT_BUFFER*)mapped_resource.pData;
+ float L = draw_data->DisplayPos.x;
+ float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
+ float T = draw_data->DisplayPos.y;
+ float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
+ float mvp[4][4] =
+ {
+ { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
+ { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
+ { 0.0f, 0.0f, 0.5f, 0.0f },
+ { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
+ };
+ memcpy(&constant_buffer->mvp, mvp, sizeof(mvp));
+ ctx->Unmap(g_pVertexConstantBuffer, 0);
+ }
+
+ // Backup DX state that will be modified to restore it afterwards (unfortunately this is very ugly looking and verbose. Close your eyes!)
+ struct BACKUP_DX11_STATE
+ {
+ UINT ScissorRectsCount, ViewportsCount;
+ D3D11_RECT ScissorRects[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
+ D3D11_VIEWPORT Viewports[D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE];
+ ID3D11RasterizerState* RS;
+ ID3D11BlendState* BlendState;
+ FLOAT BlendFactor[4];
+ UINT SampleMask;
+ UINT StencilRef;
+ ID3D11DepthStencilState* DepthStencilState;
+ ID3D11ShaderResourceView* PSShaderResource;
+ ID3D11SamplerState* PSSampler;
+ ID3D11PixelShader* PS;
+ ID3D11VertexShader* VS;
+ UINT PSInstancesCount, VSInstancesCount;
+ ID3D11ClassInstance* PSInstances[256], *VSInstances[256]; // 256 is max according to PSSetShader documentation
+ D3D11_PRIMITIVE_TOPOLOGY PrimitiveTopology;
+ ID3D11Buffer* IndexBuffer, *VertexBuffer, *VSConstantBuffer;
+ UINT IndexBufferOffset, VertexBufferStride, VertexBufferOffset;
+ DXGI_FORMAT IndexBufferFormat;
+ ID3D11InputLayout* InputLayout;
+ };
+ BACKUP_DX11_STATE old;
+ old.ScissorRectsCount = old.ViewportsCount = D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE;
+ ctx->RSGetScissorRects(&old.ScissorRectsCount, old.ScissorRects);
+ ctx->RSGetViewports(&old.ViewportsCount, old.Viewports);
+ ctx->RSGetState(&old.RS);
+ ctx->OMGetBlendState(&old.BlendState, old.BlendFactor, &old.SampleMask);
+ ctx->OMGetDepthStencilState(&old.DepthStencilState, &old.StencilRef);
+ ctx->PSGetShaderResources(0, 1, &old.PSShaderResource);
+ ctx->PSGetSamplers(0, 1, &old.PSSampler);
+ old.PSInstancesCount = old.VSInstancesCount = 256;
+ ctx->PSGetShader(&old.PS, old.PSInstances, &old.PSInstancesCount);
+ ctx->VSGetShader(&old.VS, old.VSInstances, &old.VSInstancesCount);
+ ctx->VSGetConstantBuffers(0, 1, &old.VSConstantBuffer);
+ ctx->IAGetPrimitiveTopology(&old.PrimitiveTopology);
+ ctx->IAGetIndexBuffer(&old.IndexBuffer, &old.IndexBufferFormat, &old.IndexBufferOffset);
+ ctx->IAGetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset);
+ ctx->IAGetInputLayout(&old.InputLayout);
+
+ // Setup viewport
+ D3D11_VIEWPORT vp;
+ memset(&vp, 0, sizeof(D3D11_VIEWPORT));
+ vp.Width = draw_data->DisplaySize.x;
+ vp.Height = draw_data->DisplaySize.y;
+ vp.MinDepth = 0.0f;
+ vp.MaxDepth = 1.0f;
+ vp.TopLeftX = vp.TopLeftY = 0;
+ ctx->RSSetViewports(1, &vp);
+
+ // Bind shader and vertex buffers
+ unsigned int stride = sizeof(ImDrawVert);
+ unsigned int offset = 0;
+ ctx->IASetInputLayout(g_pInputLayout);
+ ctx->IASetVertexBuffers(0, 1, &g_pVB, &stride, &offset);
+ ctx->IASetIndexBuffer(g_pIB, sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT, 0);
+ ctx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ctx->VSSetShader(g_pVertexShader, NULL, 0);
+ ctx->VSSetConstantBuffers(0, 1, &g_pVertexConstantBuffer);
+ ctx->PSSetShader(g_pPixelShader, NULL, 0);
+ ctx->PSSetSamplers(0, 1, &g_pFontSampler);
+
+ // Setup render state
+ const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
+ ctx->OMSetBlendState(g_pBlendState, blend_factor, 0xffffffff);
+ ctx->OMSetDepthStencilState(g_pDepthStencilState, 0);
+ ctx->RSSetState(g_pRasterizerState);
+
+ // Render command lists
+ int vtx_offset = 0;
+ int idx_offset = 0;
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ // User callback (registered via ImDrawList::AddCallback)
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ // Apply scissor/clipping rectangle
+ const D3D11_RECT r = { (LONG)(pcmd->ClipRect.x - pos.x), (LONG)(pcmd->ClipRect.y - pos.y), (LONG)(pcmd->ClipRect.z - pos.x), (LONG)(pcmd->ClipRect.w - pos.y) };
+ ctx->RSSetScissorRects(1, &r);
+
+ // Bind texture, Draw
+ ID3D11ShaderResourceView* texture_srv = (ID3D11ShaderResourceView*)pcmd->TextureId;
+ ctx->PSSetShaderResources(0, 1, &texture_srv);
+ ctx->DrawIndexed(pcmd->ElemCount, idx_offset, vtx_offset);
+ }
+ idx_offset += pcmd->ElemCount;
+ }
+ vtx_offset += cmd_list->VtxBuffer.Size;
+ }
+
+ // Restore modified DX state
+ ctx->RSSetScissorRects(old.ScissorRectsCount, old.ScissorRects);
+ ctx->RSSetViewports(old.ViewportsCount, old.Viewports);
+ ctx->RSSetState(old.RS); if (old.RS) old.RS->Release();
+ ctx->OMSetBlendState(old.BlendState, old.BlendFactor, old.SampleMask); if (old.BlendState) old.BlendState->Release();
+ ctx->OMSetDepthStencilState(old.DepthStencilState, old.StencilRef); if (old.DepthStencilState) old.DepthStencilState->Release();
+ ctx->PSSetShaderResources(0, 1, &old.PSShaderResource); if (old.PSShaderResource) old.PSShaderResource->Release();
+ ctx->PSSetSamplers(0, 1, &old.PSSampler); if (old.PSSampler) old.PSSampler->Release();
+ ctx->PSSetShader(old.PS, old.PSInstances, old.PSInstancesCount); if (old.PS) old.PS->Release();
+ for (UINT i = 0; i < old.PSInstancesCount; i++) if (old.PSInstances[i]) old.PSInstances[i]->Release();
+ ctx->VSSetShader(old.VS, old.VSInstances, old.VSInstancesCount); if (old.VS) old.VS->Release();
+ ctx->VSSetConstantBuffers(0, 1, &old.VSConstantBuffer); if (old.VSConstantBuffer) old.VSConstantBuffer->Release();
+ for (UINT i = 0; i < old.VSInstancesCount; i++) if (old.VSInstances[i]) old.VSInstances[i]->Release();
+ ctx->IASetPrimitiveTopology(old.PrimitiveTopology);
+ ctx->IASetIndexBuffer(old.IndexBuffer, old.IndexBufferFormat, old.IndexBufferOffset); if (old.IndexBuffer) old.IndexBuffer->Release();
+ ctx->IASetVertexBuffers(0, 1, &old.VertexBuffer, &old.VertexBufferStride, &old.VertexBufferOffset); if (old.VertexBuffer) old.VertexBuffer->Release();
+ ctx->IASetInputLayout(old.InputLayout); if (old.InputLayout) old.InputLayout->Release();
+}
+
+static void ImGui_ImplDX11_CreateFontsTexture()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+
+ // Upload texture to graphics system
+ {
+ D3D11_TEXTURE2D_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.Width = width;
+ desc.Height = height;
+ desc.MipLevels = 1;
+ desc.ArraySize = 1;
+ desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ desc.SampleDesc.Count = 1;
+ desc.Usage = D3D11_USAGE_DEFAULT;
+ desc.BindFlags = D3D11_BIND_SHADER_RESOURCE;
+ desc.CPUAccessFlags = 0;
+
+ ID3D11Texture2D *pTexture = NULL;
+ D3D11_SUBRESOURCE_DATA subResource;
+ subResource.pSysMem = pixels;
+ subResource.SysMemPitch = desc.Width * 4;
+ subResource.SysMemSlicePitch = 0;
+ g_pd3dDevice->CreateTexture2D(&desc, &subResource, &pTexture);
+
+ // Create texture view
+ D3D11_SHADER_RESOURCE_VIEW_DESC srvDesc;
+ ZeroMemory(&srvDesc, sizeof(srvDesc));
+ srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ srvDesc.ViewDimension = D3D11_SRV_DIMENSION_TEXTURE2D;
+ srvDesc.Texture2D.MipLevels = desc.MipLevels;
+ srvDesc.Texture2D.MostDetailedMip = 0;
+ g_pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, &g_pFontTextureView);
+ pTexture->Release();
+ }
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)g_pFontTextureView;
+
+ // Create texture sampler
+ {
+ D3D11_SAMPLER_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.Filter = D3D11_FILTER_MIN_MAG_MIP_LINEAR;
+ desc.AddressU = D3D11_TEXTURE_ADDRESS_WRAP;
+ desc.AddressV = D3D11_TEXTURE_ADDRESS_WRAP;
+ desc.AddressW = D3D11_TEXTURE_ADDRESS_WRAP;
+ desc.MipLODBias = 0.f;
+ desc.ComparisonFunc = D3D11_COMPARISON_ALWAYS;
+ desc.MinLOD = 0.f;
+ desc.MaxLOD = 0.f;
+ g_pd3dDevice->CreateSamplerState(&desc, &g_pFontSampler);
+ }
+}
+
+bool ImGui_ImplDX11_CreateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return false;
+ if (g_pFontSampler)
+ ImGui_ImplDX11_InvalidateDeviceObjects();
+
+ // By using D3DCompile() from / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
+ // If you would like to use this DX11 sample code but remove this dependency you can:
+ // 1) compile once, save the compiled shader blobs into a file or source code and pass them to CreateVertexShader()/CreatePixelShader() [preferred solution]
+ // 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
+ // See https://github.com/ocornut/imgui/pull/638 for sources and details.
+
+ // Create the vertex shader
+ {
+ static const char* vertexShader =
+ "cbuffer vertexBuffer : register(b0) \
+ {\
+ float4x4 ProjectionMatrix; \
+ };\
+ struct VS_INPUT\
+ {\
+ float2 pos : POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ \
+ struct PS_INPUT\
+ {\
+ float4 pos : SV_POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ \
+ PS_INPUT main(VS_INPUT input)\
+ {\
+ PS_INPUT output;\
+ output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
+ output.col = input.col;\
+ output.uv = input.uv;\
+ return output;\
+ }";
+
+ D3DCompile(vertexShader, strlen(vertexShader), NULL, NULL, NULL, "main", "vs_4_0", 0, 0, &g_pVertexShaderBlob, NULL);
+ if (g_pVertexShaderBlob == NULL) // NB: Pass ID3D10Blob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
+ return false;
+ if (g_pd3dDevice->CreateVertexShader((DWORD*)g_pVertexShaderBlob->GetBufferPointer(), g_pVertexShaderBlob->GetBufferSize(), NULL, &g_pVertexShader) != S_OK)
+ return false;
+
+ // Create the input layout
+ D3D11_INPUT_ELEMENT_DESC local_layout[] =
+ {
+ { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (size_t)(&((ImDrawVert*)0)->col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
+ };
+ if (g_pd3dDevice->CreateInputLayout(local_layout, 3, g_pVertexShaderBlob->GetBufferPointer(), g_pVertexShaderBlob->GetBufferSize(), &g_pInputLayout) != S_OK)
+ return false;
+
+ // Create the constant buffer
+ {
+ D3D11_BUFFER_DESC desc;
+ desc.ByteWidth = sizeof(VERTEX_CONSTANT_BUFFER);
+ desc.Usage = D3D11_USAGE_DYNAMIC;
+ desc.BindFlags = D3D11_BIND_CONSTANT_BUFFER;
+ desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
+ desc.MiscFlags = 0;
+ g_pd3dDevice->CreateBuffer(&desc, NULL, &g_pVertexConstantBuffer);
+ }
+ }
+
+ // Create the pixel shader
+ {
+ static const char* pixelShader =
+ "struct PS_INPUT\
+ {\
+ float4 pos : SV_POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ sampler sampler0;\
+ Texture2D texture0;\
+ \
+ float4 main(PS_INPUT input) : SV_Target\
+ {\
+ float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
+ return out_col; \
+ }";
+
+ D3DCompile(pixelShader, strlen(pixelShader), NULL, NULL, NULL, "main", "ps_4_0", 0, 0, &g_pPixelShaderBlob, NULL);
+ if (g_pPixelShaderBlob == NULL) // NB: Pass ID3D10Blob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
+ return false;
+ if (g_pd3dDevice->CreatePixelShader((DWORD*)g_pPixelShaderBlob->GetBufferPointer(), g_pPixelShaderBlob->GetBufferSize(), NULL, &g_pPixelShader) != S_OK)
+ return false;
+ }
+
+ // Create the blending setup
+ {
+ D3D11_BLEND_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.AlphaToCoverageEnable = false;
+ desc.RenderTarget[0].BlendEnable = true;
+ desc.RenderTarget[0].SrcBlend = D3D11_BLEND_SRC_ALPHA;
+ desc.RenderTarget[0].DestBlend = D3D11_BLEND_INV_SRC_ALPHA;
+ desc.RenderTarget[0].BlendOp = D3D11_BLEND_OP_ADD;
+ desc.RenderTarget[0].SrcBlendAlpha = D3D11_BLEND_INV_SRC_ALPHA;
+ desc.RenderTarget[0].DestBlendAlpha = D3D11_BLEND_ZERO;
+ desc.RenderTarget[0].BlendOpAlpha = D3D11_BLEND_OP_ADD;
+ desc.RenderTarget[0].RenderTargetWriteMask = D3D11_COLOR_WRITE_ENABLE_ALL;
+ g_pd3dDevice->CreateBlendState(&desc, &g_pBlendState);
+ }
+
+ // Create the rasterizer state
+ {
+ D3D11_RASTERIZER_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.FillMode = D3D11_FILL_SOLID;
+ desc.CullMode = D3D11_CULL_NONE;
+ desc.ScissorEnable = true;
+ desc.DepthClipEnable = true;
+ g_pd3dDevice->CreateRasterizerState(&desc, &g_pRasterizerState);
+ }
+
+ // Create depth-stencil State
+ {
+ D3D11_DEPTH_STENCIL_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.DepthEnable = false;
+ desc.DepthWriteMask = D3D11_DEPTH_WRITE_MASK_ALL;
+ desc.DepthFunc = D3D11_COMPARISON_ALWAYS;
+ desc.StencilEnable = false;
+ desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D11_STENCIL_OP_KEEP;
+ desc.FrontFace.StencilFunc = D3D11_COMPARISON_ALWAYS;
+ desc.BackFace = desc.FrontFace;
+ g_pd3dDevice->CreateDepthStencilState(&desc, &g_pDepthStencilState);
+ }
+
+ ImGui_ImplDX11_CreateFontsTexture();
+
+ return true;
+}
+
+void ImGui_ImplDX11_InvalidateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return;
+
+ if (g_pFontSampler) { g_pFontSampler->Release(); g_pFontSampler = NULL; }
+ if (g_pFontTextureView) { g_pFontTextureView->Release(); g_pFontTextureView = NULL; ImGui::GetIO().Fonts->TexID = NULL; } // We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
+ if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
+ if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }
+
+ if (g_pBlendState) { g_pBlendState->Release(); g_pBlendState = NULL; }
+ if (g_pDepthStencilState) { g_pDepthStencilState->Release(); g_pDepthStencilState = NULL; }
+ if (g_pRasterizerState) { g_pRasterizerState->Release(); g_pRasterizerState = NULL; }
+ if (g_pPixelShader) { g_pPixelShader->Release(); g_pPixelShader = NULL; }
+ if (g_pPixelShaderBlob) { g_pPixelShaderBlob->Release(); g_pPixelShaderBlob = NULL; }
+ if (g_pVertexConstantBuffer) { g_pVertexConstantBuffer->Release(); g_pVertexConstantBuffer = NULL; }
+ if (g_pInputLayout) { g_pInputLayout->Release(); g_pInputLayout = NULL; }
+ if (g_pVertexShader) { g_pVertexShader->Release(); g_pVertexShader = NULL; }
+ if (g_pVertexShaderBlob) { g_pVertexShaderBlob->Release(); g_pVertexShaderBlob = NULL; }
+}
+
+bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context)
+{
+ // Get factory from device
+ IDXGIDevice* pDXGIDevice = NULL;
+ IDXGIAdapter* pDXGIAdapter = NULL;
+ IDXGIFactory* pFactory = NULL;
+
+ if (device->QueryInterface(IID_PPV_ARGS(&pDXGIDevice)) == S_OK)
+ if (pDXGIDevice->GetParent(IID_PPV_ARGS(&pDXGIAdapter)) == S_OK)
+ if (pDXGIAdapter->GetParent(IID_PPV_ARGS(&pFactory)) == S_OK)
+ {
+ g_pd3dDevice = device;
+ g_pd3dDeviceContext = device_context;
+ g_pFactory = pFactory;
+ }
+ if (pDXGIDevice) pDXGIDevice->Release();
+ if (pDXGIAdapter) pDXGIAdapter->Release();
+
+ return true;
+}
+
+void ImGui_ImplDX11_Shutdown()
+{
+ ImGui_ImplDX11_InvalidateDeviceObjects();
+ if (g_pFactory) { g_pFactory->Release(); g_pFactory = NULL; }
+ g_pd3dDevice = NULL;
+ g_pd3dDeviceContext = NULL;
+}
+
+void ImGui_ImplDX11_NewFrame()
+{
+ if (!g_pFontSampler)
+ ImGui_ImplDX11_CreateDeviceObjects();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_dx11.h b/3rdparty/imgui/examples/imgui_impl_dx11.h
new file mode 100644
index 00000000..724b4696
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx11.h
@@ -0,0 +1,21 @@
+// dear imgui: Renderer for DirectX11
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'ID3D11ShaderResourceView*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+struct ID3D11Device;
+struct ID3D11DeviceContext;
+
+IMGUI_IMPL_API bool ImGui_ImplDX11_Init(ID3D11Device* device, ID3D11DeviceContext* device_context);
+IMGUI_IMPL_API void ImGui_ImplDX11_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplDX11_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplDX11_RenderDrawData(ImDrawData* draw_data);
+
+// Use if you want to reset your rendering device without losing ImGui state.
+IMGUI_IMPL_API void ImGui_ImplDX11_InvalidateDeviceObjects();
+IMGUI_IMPL_API bool ImGui_ImplDX11_CreateDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_dx12.cpp b/3rdparty/imgui/examples/imgui_impl_dx12.cpp
new file mode 100644
index 00000000..a59939e0
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx12.cpp
@@ -0,0 +1,625 @@
+// dear imgui: Renderer for DirectX12
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+// Issues:
+// [ ] 64-bit only for now! (Because sizeof(ImTextureId) == sizeof(void*)). See github.com/ocornut/imgui/pull/301
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-06-12: DirectX12: Moved the ID3D12GraphicsCommandList* parameter from NewFrame() to RenderDrawData().
+// 2018-06-08: Misc: Extracted imgui_impl_dx12.cpp/.h away from the old combined DX12+Win32 example.
+// 2018-06-08: DirectX12: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle (to ease support for future multi-viewport).
+// 2018-02-22: Merged into master with all Win32 code synchronized to other examples.
+
+#include "imgui.h"
+#include "imgui_impl_dx12.h"
+
+// DirectX
+#include
+#include
+#include
+
+// DirectX data
+static ID3D12Device* g_pd3dDevice = NULL;
+static ID3D10Blob* g_pVertexShaderBlob = NULL;
+static ID3D10Blob* g_pPixelShaderBlob = NULL;
+static ID3D12RootSignature* g_pRootSignature = NULL;
+static ID3D12PipelineState* g_pPipelineState = NULL;
+static DXGI_FORMAT g_RTVFormat = DXGI_FORMAT_UNKNOWN;
+static ID3D12Resource* g_pFontTextureResource = NULL;
+static D3D12_CPU_DESCRIPTOR_HANDLE g_hFontSrvCpuDescHandle = {};
+static D3D12_GPU_DESCRIPTOR_HANDLE g_hFontSrvGpuDescHandle = {};
+
+struct FrameResources
+{
+ ID3D12Resource* IB;
+ ID3D12Resource* VB;
+ int VertexBufferSize;
+ int IndexBufferSize;
+};
+static FrameResources* g_pFrameResources = NULL;
+static UINT g_numFramesInFlight = 0;
+static UINT g_frameIndex = UINT_MAX;
+
+struct VERTEX_CONSTANT_BUFFER
+{
+ float mvp[4][4];
+};
+
+// Render function
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* ctx)
+{
+ // FIXME: I'm assuming that this only gets called once per frame!
+ // If not, we can't just re-allocate the IB or VB, we'll have to do a proper allocator.
+ g_frameIndex = g_frameIndex + 1;
+ FrameResources* frameResources = &g_pFrameResources[g_frameIndex % g_numFramesInFlight];
+ ID3D12Resource* g_pVB = frameResources->VB;
+ ID3D12Resource* g_pIB = frameResources->IB;
+ int g_VertexBufferSize = frameResources->VertexBufferSize;
+ int g_IndexBufferSize = frameResources->IndexBufferSize;
+
+ // Create and grow vertex/index buffers if needed
+ if (!g_pVB || g_VertexBufferSize < draw_data->TotalVtxCount)
+ {
+ if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }
+ g_VertexBufferSize = draw_data->TotalVtxCount + 5000;
+ D3D12_HEAP_PROPERTIES props;
+ memset(&props, 0, sizeof(D3D12_HEAP_PROPERTIES));
+ props.Type = D3D12_HEAP_TYPE_UPLOAD;
+ props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ D3D12_RESOURCE_DESC desc;
+ memset(&desc, 0, sizeof(D3D12_RESOURCE_DESC));
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ desc.Width = g_VertexBufferSize * sizeof(ImDrawVert);
+ desc.Height = 1;
+ desc.DepthOrArraySize = 1;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_UNKNOWN;
+ desc.SampleDesc.Count = 1;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+ if (g_pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, NULL, IID_PPV_ARGS(&g_pVB)) < 0)
+ return;
+ frameResources->VB = g_pVB;
+ frameResources->VertexBufferSize = g_VertexBufferSize;
+ }
+ if (!g_pIB || g_IndexBufferSize < draw_data->TotalIdxCount)
+ {
+ if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
+ g_IndexBufferSize = draw_data->TotalIdxCount + 10000;
+ D3D12_HEAP_PROPERTIES props;
+ memset(&props, 0, sizeof(D3D12_HEAP_PROPERTIES));
+ props.Type = D3D12_HEAP_TYPE_UPLOAD;
+ props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+ D3D12_RESOURCE_DESC desc;
+ memset(&desc, 0, sizeof(D3D12_RESOURCE_DESC));
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ desc.Width = g_IndexBufferSize * sizeof(ImDrawIdx);
+ desc.Height = 1;
+ desc.DepthOrArraySize = 1;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_UNKNOWN;
+ desc.SampleDesc.Count = 1;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+ if (g_pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc, D3D12_RESOURCE_STATE_GENERIC_READ, NULL, IID_PPV_ARGS(&g_pIB)) < 0)
+ return;
+ frameResources->IB = g_pIB;
+ frameResources->IndexBufferSize = g_IndexBufferSize;
+ }
+
+ // Copy and convert all vertices into a single contiguous buffer
+ void* vtx_resource, *idx_resource;
+ D3D12_RANGE range;
+ memset(&range, 0, sizeof(D3D12_RANGE));
+ if (g_pVB->Map(0, &range, &vtx_resource) != S_OK)
+ return;
+ if (g_pIB->Map(0, &range, &idx_resource) != S_OK)
+ return;
+ ImDrawVert* vtx_dst = (ImDrawVert*)vtx_resource;
+ ImDrawIdx* idx_dst = (ImDrawIdx*)idx_resource;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ memcpy(vtx_dst, cmd_list->VtxBuffer.Data, cmd_list->VtxBuffer.Size * sizeof(ImDrawVert));
+ memcpy(idx_dst, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
+ vtx_dst += cmd_list->VtxBuffer.Size;
+ idx_dst += cmd_list->IdxBuffer.Size;
+ }
+ g_pVB->Unmap(0, &range);
+ g_pIB->Unmap(0, &range);
+
+ // Setup orthographic projection matrix into our constant buffer
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
+ VERTEX_CONSTANT_BUFFER vertex_constant_buffer;
+ {
+ VERTEX_CONSTANT_BUFFER* constant_buffer = &vertex_constant_buffer;
+ float L = draw_data->DisplayPos.x;
+ float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
+ float T = draw_data->DisplayPos.y;
+ float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
+ float mvp[4][4] =
+ {
+ { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
+ { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
+ { 0.0f, 0.0f, 0.5f, 0.0f },
+ { (R+L)/(L-R), (T+B)/(B-T), 0.5f, 1.0f },
+ };
+ memcpy(&constant_buffer->mvp, mvp, sizeof(mvp));
+ }
+
+ // Setup viewport
+ D3D12_VIEWPORT vp;
+ memset(&vp, 0, sizeof(D3D12_VIEWPORT));
+ vp.Width = draw_data->DisplaySize.x;
+ vp.Height = draw_data->DisplaySize.y;
+ vp.MinDepth = 0.0f;
+ vp.MaxDepth = 1.0f;
+ vp.TopLeftX = vp.TopLeftY = 0.0f;
+ ctx->RSSetViewports(1, &vp);
+
+ // Bind shader and vertex buffers
+ unsigned int stride = sizeof(ImDrawVert);
+ unsigned int offset = 0;
+ D3D12_VERTEX_BUFFER_VIEW vbv;
+ memset(&vbv, 0, sizeof(D3D12_VERTEX_BUFFER_VIEW));
+ vbv.BufferLocation = g_pVB->GetGPUVirtualAddress() + offset;
+ vbv.SizeInBytes = g_VertexBufferSize * stride;
+ vbv.StrideInBytes = stride;
+ ctx->IASetVertexBuffers(0, 1, &vbv);
+ D3D12_INDEX_BUFFER_VIEW ibv;
+ memset(&ibv, 0, sizeof(D3D12_INDEX_BUFFER_VIEW));
+ ibv.BufferLocation = g_pIB->GetGPUVirtualAddress();
+ ibv.SizeInBytes = g_IndexBufferSize * sizeof(ImDrawIdx);
+ ibv.Format = sizeof(ImDrawIdx) == 2 ? DXGI_FORMAT_R16_UINT : DXGI_FORMAT_R32_UINT;
+ ctx->IASetIndexBuffer(&ibv);
+ ctx->IASetPrimitiveTopology(D3D_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
+ ctx->SetPipelineState(g_pPipelineState);
+ ctx->SetGraphicsRootSignature(g_pRootSignature);
+ ctx->SetGraphicsRoot32BitConstants(0, 16, &vertex_constant_buffer, 0);
+
+ // Setup render state
+ const float blend_factor[4] = { 0.f, 0.f, 0.f, 0.f };
+ ctx->OMSetBlendFactor(blend_factor);
+
+ // Render command lists
+ int vtx_offset = 0;
+ int idx_offset = 0;
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ const D3D12_RECT r = { (LONG)(pcmd->ClipRect.x - pos.x), (LONG)(pcmd->ClipRect.y - pos.y), (LONG)(pcmd->ClipRect.z - pos.x), (LONG)(pcmd->ClipRect.w - pos.y) };
+ ctx->SetGraphicsRootDescriptorTable(1, *(D3D12_GPU_DESCRIPTOR_HANDLE*)&pcmd->TextureId);
+ ctx->RSSetScissorRects(1, &r);
+ ctx->DrawIndexedInstanced(pcmd->ElemCount, 1, idx_offset, vtx_offset, 0);
+ }
+ idx_offset += pcmd->ElemCount;
+ }
+ vtx_offset += cmd_list->VtxBuffer.Size;
+ }
+}
+
+static void ImGui_ImplDX12_CreateFontsTexture()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+
+ // Upload texture to graphics system
+ {
+ D3D12_HEAP_PROPERTIES props;
+ memset(&props, 0, sizeof(D3D12_HEAP_PROPERTIES));
+ props.Type = D3D12_HEAP_TYPE_DEFAULT;
+ props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+
+ D3D12_RESOURCE_DESC desc;
+ ZeroMemory(&desc, sizeof(desc));
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_TEXTURE2D;
+ desc.Alignment = 0;
+ desc.Width = width;
+ desc.Height = height;
+ desc.DepthOrArraySize = 1;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ desc.SampleDesc.Count = 1;
+ desc.SampleDesc.Quality = 0;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_UNKNOWN;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ ID3D12Resource* pTexture = NULL;
+ g_pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc,
+ D3D12_RESOURCE_STATE_COPY_DEST, NULL, IID_PPV_ARGS(&pTexture));
+
+ UINT uploadPitch = (width * 4 + D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1u) & ~(D3D12_TEXTURE_DATA_PITCH_ALIGNMENT - 1u);
+ UINT uploadSize = height * uploadPitch;
+ desc.Dimension = D3D12_RESOURCE_DIMENSION_BUFFER;
+ desc.Alignment = 0;
+ desc.Width = uploadSize;
+ desc.Height = 1;
+ desc.DepthOrArraySize = 1;
+ desc.MipLevels = 1;
+ desc.Format = DXGI_FORMAT_UNKNOWN;
+ desc.SampleDesc.Count = 1;
+ desc.SampleDesc.Quality = 0;
+ desc.Layout = D3D12_TEXTURE_LAYOUT_ROW_MAJOR;
+ desc.Flags = D3D12_RESOURCE_FLAG_NONE;
+
+ props.Type = D3D12_HEAP_TYPE_UPLOAD;
+ props.CPUPageProperty = D3D12_CPU_PAGE_PROPERTY_UNKNOWN;
+ props.MemoryPoolPreference = D3D12_MEMORY_POOL_UNKNOWN;
+
+ ID3D12Resource* uploadBuffer = NULL;
+ HRESULT hr = g_pd3dDevice->CreateCommittedResource(&props, D3D12_HEAP_FLAG_NONE, &desc,
+ D3D12_RESOURCE_STATE_GENERIC_READ, NULL, IID_PPV_ARGS(&uploadBuffer));
+ IM_ASSERT(SUCCEEDED(hr));
+
+ void* mapped = NULL;
+ D3D12_RANGE range = { 0, uploadSize };
+ hr = uploadBuffer->Map(0, &range, &mapped);
+ IM_ASSERT(SUCCEEDED(hr));
+ for (int y = 0; y < height; y++)
+ memcpy((void*) ((uintptr_t) mapped + y * uploadPitch), pixels + y * width * 4, width * 4);
+ uploadBuffer->Unmap(0, &range);
+
+ D3D12_TEXTURE_COPY_LOCATION srcLocation = {};
+ srcLocation.pResource = uploadBuffer;
+ srcLocation.Type = D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT;
+ srcLocation.PlacedFootprint.Footprint.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ srcLocation.PlacedFootprint.Footprint.Width = width;
+ srcLocation.PlacedFootprint.Footprint.Height = height;
+ srcLocation.PlacedFootprint.Footprint.Depth = 1;
+ srcLocation.PlacedFootprint.Footprint.RowPitch = uploadPitch;
+
+ D3D12_TEXTURE_COPY_LOCATION dstLocation = {};
+ dstLocation.pResource = pTexture;
+ dstLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
+ dstLocation.SubresourceIndex = 0;
+
+ D3D12_RESOURCE_BARRIER barrier = {};
+ barrier.Type = D3D12_RESOURCE_BARRIER_TYPE_TRANSITION;
+ barrier.Flags = D3D12_RESOURCE_BARRIER_FLAG_NONE;
+ barrier.Transition.pResource = pTexture;
+ barrier.Transition.Subresource = D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES;
+ barrier.Transition.StateBefore = D3D12_RESOURCE_STATE_COPY_DEST;
+ barrier.Transition.StateAfter = D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE;
+
+ ID3D12Fence* fence = NULL;
+ hr = g_pd3dDevice->CreateFence(0, D3D12_FENCE_FLAG_NONE, IID_PPV_ARGS(&fence));
+ IM_ASSERT(SUCCEEDED(hr));
+
+ HANDLE event = CreateEvent(0, 0, 0, 0);
+ IM_ASSERT(event != NULL);
+
+ D3D12_COMMAND_QUEUE_DESC queueDesc = {};
+ queueDesc.Type = D3D12_COMMAND_LIST_TYPE_DIRECT;
+ queueDesc.Flags = D3D12_COMMAND_QUEUE_FLAG_NONE;
+ queueDesc.NodeMask = 1;
+
+ ID3D12CommandQueue* cmdQueue = NULL;
+ hr = g_pd3dDevice->CreateCommandQueue(&queueDesc, IID_PPV_ARGS(&cmdQueue));
+ IM_ASSERT(SUCCEEDED(hr));
+
+ ID3D12CommandAllocator* cmdAlloc = NULL;
+ hr = g_pd3dDevice->CreateCommandAllocator(D3D12_COMMAND_LIST_TYPE_DIRECT, IID_PPV_ARGS(&cmdAlloc));
+ IM_ASSERT(SUCCEEDED(hr));
+
+ ID3D12GraphicsCommandList* cmdList = NULL;
+ hr = g_pd3dDevice->CreateCommandList(0, D3D12_COMMAND_LIST_TYPE_DIRECT, cmdAlloc, NULL, IID_PPV_ARGS(&cmdList));
+ IM_ASSERT(SUCCEEDED(hr));
+
+ cmdList->CopyTextureRegion(&dstLocation, 0, 0, 0, &srcLocation, NULL);
+ cmdList->ResourceBarrier(1, &barrier);
+
+ hr = cmdList->Close();
+ IM_ASSERT(SUCCEEDED(hr));
+
+ cmdQueue->ExecuteCommandLists(1, (ID3D12CommandList* const*) &cmdList);
+ hr = cmdQueue->Signal(fence, 1);
+ IM_ASSERT(SUCCEEDED(hr));
+
+ fence->SetEventOnCompletion(1, event);
+ WaitForSingleObject(event, INFINITE);
+
+ cmdList->Release();
+ cmdAlloc->Release();
+ cmdQueue->Release();
+ CloseHandle(event);
+ fence->Release();
+ uploadBuffer->Release();
+
+ // Create texture view
+ D3D12_SHADER_RESOURCE_VIEW_DESC srvDesc;
+ ZeroMemory(&srvDesc, sizeof(srvDesc));
+ srvDesc.Format = DXGI_FORMAT_R8G8B8A8_UNORM;
+ srvDesc.ViewDimension = D3D12_SRV_DIMENSION_TEXTURE2D;
+ srvDesc.Texture2D.MipLevels = desc.MipLevels;
+ srvDesc.Texture2D.MostDetailedMip = 0;
+ srvDesc.Shader4ComponentMapping = D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING;
+ g_pd3dDevice->CreateShaderResourceView(pTexture, &srvDesc, g_hFontSrvCpuDescHandle);
+ if (g_pFontTextureResource != NULL)
+ g_pFontTextureResource->Release();
+ g_pFontTextureResource = pTexture;
+ }
+
+ // Store our identifier
+ static_assert(sizeof(ImTextureID) >= sizeof(g_hFontSrvGpuDescHandle.ptr), "Can't pack descriptor handle into TexID, 32-bit not supported yet.");
+ io.Fonts->TexID = (ImTextureID)g_hFontSrvGpuDescHandle.ptr;
+}
+
+bool ImGui_ImplDX12_CreateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return false;
+ if (g_pPipelineState)
+ ImGui_ImplDX12_InvalidateDeviceObjects();
+
+ // Create the root signature
+ {
+ D3D12_DESCRIPTOR_RANGE descRange = {};
+ descRange.RangeType = D3D12_DESCRIPTOR_RANGE_TYPE_SRV;
+ descRange.NumDescriptors = 1;
+ descRange.BaseShaderRegister = 0;
+ descRange.RegisterSpace = 0;
+ descRange.OffsetInDescriptorsFromTableStart = 0;
+
+ D3D12_ROOT_PARAMETER param[2] = {};
+
+ param[0].ParameterType = D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS;
+ param[0].Constants.ShaderRegister = 0;
+ param[0].Constants.RegisterSpace = 0;
+ param[0].Constants.Num32BitValues = 16;
+ param[0].ShaderVisibility = D3D12_SHADER_VISIBILITY_VERTEX;
+
+ param[1].ParameterType = D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE;
+ param[1].DescriptorTable.NumDescriptorRanges = 1;
+ param[1].DescriptorTable.pDescriptorRanges = &descRange;
+ param[1].ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
+
+ D3D12_STATIC_SAMPLER_DESC staticSampler = {};
+ staticSampler.Filter = D3D12_FILTER_MIN_MAG_MIP_LINEAR;
+ staticSampler.AddressU = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
+ staticSampler.AddressV = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
+ staticSampler.AddressW = D3D12_TEXTURE_ADDRESS_MODE_WRAP;
+ staticSampler.MipLODBias = 0.f;
+ staticSampler.MaxAnisotropy = 0;
+ staticSampler.ComparisonFunc = D3D12_COMPARISON_FUNC_ALWAYS;
+ staticSampler.BorderColor = D3D12_STATIC_BORDER_COLOR_TRANSPARENT_BLACK;
+ staticSampler.MinLOD = 0.f;
+ staticSampler.MaxLOD = 0.f;
+ staticSampler.ShaderRegister = 0;
+ staticSampler.RegisterSpace = 0;
+ staticSampler.ShaderVisibility = D3D12_SHADER_VISIBILITY_PIXEL;
+
+ D3D12_ROOT_SIGNATURE_DESC desc = {};
+ desc.NumParameters = _countof(param);
+ desc.pParameters = param;
+ desc.NumStaticSamplers = 1;
+ desc.pStaticSamplers = &staticSampler;
+ desc.Flags =
+ D3D12_ROOT_SIGNATURE_FLAG_ALLOW_INPUT_ASSEMBLER_INPUT_LAYOUT |
+ D3D12_ROOT_SIGNATURE_FLAG_DENY_HULL_SHADER_ROOT_ACCESS |
+ D3D12_ROOT_SIGNATURE_FLAG_DENY_DOMAIN_SHADER_ROOT_ACCESS |
+ D3D12_ROOT_SIGNATURE_FLAG_DENY_GEOMETRY_SHADER_ROOT_ACCESS;
+
+ ID3DBlob* blob = NULL;
+ if (D3D12SerializeRootSignature(&desc, D3D_ROOT_SIGNATURE_VERSION_1, &blob, NULL) != S_OK)
+ return false;
+
+ g_pd3dDevice->CreateRootSignature(0, blob->GetBufferPointer(), blob->GetBufferSize(), IID_PPV_ARGS(&g_pRootSignature));
+ blob->Release();
+ }
+
+ // By using D3DCompile() from / d3dcompiler.lib, we introduce a dependency to a given version of d3dcompiler_XX.dll (see D3DCOMPILER_DLL_A)
+ // If you would like to use this DX12 sample code but remove this dependency you can:
+ // 1) compile once, save the compiled shader blobs into a file or source code and pass them to CreateVertexShader()/CreatePixelShader() [preferred solution]
+ // 2) use code to detect any version of the DLL and grab a pointer to D3DCompile from the DLL.
+ // See https://github.com/ocornut/imgui/pull/638 for sources and details.
+
+ D3D12_GRAPHICS_PIPELINE_STATE_DESC psoDesc;
+ memset(&psoDesc, 0, sizeof(D3D12_GRAPHICS_PIPELINE_STATE_DESC));
+ psoDesc.NodeMask = 1;
+ psoDesc.PrimitiveTopologyType = D3D12_PRIMITIVE_TOPOLOGY_TYPE_TRIANGLE;
+ psoDesc.pRootSignature = g_pRootSignature;
+ psoDesc.SampleMask = UINT_MAX;
+ psoDesc.NumRenderTargets = 1;
+ psoDesc.RTVFormats[0] = g_RTVFormat;
+ psoDesc.SampleDesc.Count = 1;
+ psoDesc.Flags = D3D12_PIPELINE_STATE_FLAG_NONE;
+
+ // Create the vertex shader
+ {
+ static const char* vertexShader =
+ "cbuffer vertexBuffer : register(b0) \
+ {\
+ float4x4 ProjectionMatrix; \
+ };\
+ struct VS_INPUT\
+ {\
+ float2 pos : POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ \
+ struct PS_INPUT\
+ {\
+ float4 pos : SV_POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ \
+ PS_INPUT main(VS_INPUT input)\
+ {\
+ PS_INPUT output;\
+ output.pos = mul( ProjectionMatrix, float4(input.pos.xy, 0.f, 1.f));\
+ output.col = input.col;\
+ output.uv = input.uv;\
+ return output;\
+ }";
+
+ D3DCompile(vertexShader, strlen(vertexShader), NULL, NULL, NULL, "main", "vs_5_0", 0, 0, &g_pVertexShaderBlob, NULL);
+ if (g_pVertexShaderBlob == NULL) // NB: Pass ID3D10Blob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
+ return false;
+ psoDesc.VS = { g_pVertexShaderBlob->GetBufferPointer(), g_pVertexShaderBlob->GetBufferSize() };
+
+ // Create the input layout
+ static D3D12_INPUT_ELEMENT_DESC local_layout[] = {
+ { "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->pos), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (size_t)(&((ImDrawVert*)0)->uv), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ { "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (size_t)(&((ImDrawVert*)0)->col), D3D12_INPUT_CLASSIFICATION_PER_VERTEX_DATA, 0 },
+ };
+ psoDesc.InputLayout = { local_layout, 3 };
+ }
+
+ // Create the pixel shader
+ {
+ static const char* pixelShader =
+ "struct PS_INPUT\
+ {\
+ float4 pos : SV_POSITION;\
+ float4 col : COLOR0;\
+ float2 uv : TEXCOORD0;\
+ };\
+ SamplerState sampler0 : register(s0);\
+ Texture2D texture0 : register(t0);\
+ \
+ float4 main(PS_INPUT input) : SV_Target\
+ {\
+ float4 out_col = input.col * texture0.Sample(sampler0, input.uv); \
+ return out_col; \
+ }";
+
+ D3DCompile(pixelShader, strlen(pixelShader), NULL, NULL, NULL, "main", "ps_5_0", 0, 0, &g_pPixelShaderBlob, NULL);
+ if (g_pPixelShaderBlob == NULL) // NB: Pass ID3D10Blob* pErrorBlob to D3DCompile() to get error showing in (const char*)pErrorBlob->GetBufferPointer(). Make sure to Release() the blob!
+ return false;
+ psoDesc.PS = { g_pPixelShaderBlob->GetBufferPointer(), g_pPixelShaderBlob->GetBufferSize() };
+ }
+
+ // Create the blending setup
+ {
+ D3D12_BLEND_DESC& desc = psoDesc.BlendState;
+ desc.AlphaToCoverageEnable = false;
+ desc.RenderTarget[0].BlendEnable = true;
+ desc.RenderTarget[0].SrcBlend = D3D12_BLEND_SRC_ALPHA;
+ desc.RenderTarget[0].DestBlend = D3D12_BLEND_INV_SRC_ALPHA;
+ desc.RenderTarget[0].BlendOp = D3D12_BLEND_OP_ADD;
+ desc.RenderTarget[0].SrcBlendAlpha = D3D12_BLEND_INV_SRC_ALPHA;
+ desc.RenderTarget[0].DestBlendAlpha = D3D12_BLEND_ZERO;
+ desc.RenderTarget[0].BlendOpAlpha = D3D12_BLEND_OP_ADD;
+ desc.RenderTarget[0].RenderTargetWriteMask = D3D12_COLOR_WRITE_ENABLE_ALL;
+ }
+
+ // Create the rasterizer state
+ {
+ D3D12_RASTERIZER_DESC& desc = psoDesc.RasterizerState;
+ desc.FillMode = D3D12_FILL_MODE_SOLID;
+ desc.CullMode = D3D12_CULL_MODE_NONE;
+ desc.FrontCounterClockwise = FALSE;
+ desc.DepthBias = D3D12_DEFAULT_DEPTH_BIAS;
+ desc.DepthBiasClamp = D3D12_DEFAULT_DEPTH_BIAS_CLAMP;
+ desc.SlopeScaledDepthBias = D3D12_DEFAULT_SLOPE_SCALED_DEPTH_BIAS;
+ desc.DepthClipEnable = true;
+ desc.MultisampleEnable = FALSE;
+ desc.AntialiasedLineEnable = FALSE;
+ desc.ForcedSampleCount = 0;
+ desc.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
+ }
+
+ // Create depth-stencil State
+ {
+ D3D12_DEPTH_STENCIL_DESC& desc = psoDesc.DepthStencilState;
+ desc.DepthEnable = false;
+ desc.DepthWriteMask = D3D12_DEPTH_WRITE_MASK_ALL;
+ desc.DepthFunc = D3D12_COMPARISON_FUNC_ALWAYS;
+ desc.StencilEnable = false;
+ desc.FrontFace.StencilFailOp = desc.FrontFace.StencilDepthFailOp = desc.FrontFace.StencilPassOp = D3D12_STENCIL_OP_KEEP;
+ desc.FrontFace.StencilFunc = D3D12_COMPARISON_FUNC_ALWAYS;
+ desc.BackFace = desc.FrontFace;
+ }
+
+ if (g_pd3dDevice->CreateGraphicsPipelineState(&psoDesc, IID_PPV_ARGS(&g_pPipelineState)) != S_OK)
+ return false;
+
+ ImGui_ImplDX12_CreateFontsTexture();
+
+ return true;
+}
+
+void ImGui_ImplDX12_InvalidateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return;
+
+ if (g_pVertexShaderBlob) { g_pVertexShaderBlob->Release(); g_pVertexShaderBlob = NULL; }
+ if (g_pPixelShaderBlob) { g_pPixelShaderBlob->Release(); g_pPixelShaderBlob = NULL; }
+ if (g_pRootSignature) { g_pRootSignature->Release(); g_pRootSignature = NULL; }
+ if (g_pPipelineState) { g_pPipelineState->Release(); g_pPipelineState = NULL; }
+ if (g_pFontTextureResource) { g_pFontTextureResource->Release(); g_pFontTextureResource = NULL; ImGui::GetIO().Fonts->TexID = NULL; } // We copied g_pFontTextureView to io.Fonts->TexID so let's clear that as well.
+ for (UINT i = 0; i < g_numFramesInFlight; i++)
+ {
+ if (g_pFrameResources[i].IB) { g_pFrameResources[i].IB->Release(); g_pFrameResources[i].IB = NULL; }
+ if (g_pFrameResources[i].VB) { g_pFrameResources[i].VB->Release(); g_pFrameResources[i].VB = NULL; }
+ }
+}
+
+bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format,
+ D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle)
+{
+ g_pd3dDevice = device;
+ g_RTVFormat = rtv_format;
+ g_hFontSrvCpuDescHandle = font_srv_cpu_desc_handle;
+ g_hFontSrvGpuDescHandle = font_srv_gpu_desc_handle;
+ g_pFrameResources = new FrameResources[num_frames_in_flight];
+ g_numFramesInFlight = num_frames_in_flight;
+ g_frameIndex = UINT_MAX;
+
+ // Create buffers with a default size (they will later be grown as needed)
+ for (int i = 0; i < num_frames_in_flight; i++)
+ {
+ g_pFrameResources[i].IB = NULL;
+ g_pFrameResources[i].VB = NULL;
+ g_pFrameResources[i].VertexBufferSize = 5000;
+ g_pFrameResources[i].IndexBufferSize = 10000;
+ }
+
+ return true;
+}
+
+void ImGui_ImplDX12_Shutdown()
+{
+ ImGui_ImplDX12_InvalidateDeviceObjects();
+ delete[] g_pFrameResources;
+ g_pd3dDevice = NULL;
+ g_hFontSrvCpuDescHandle.ptr = 0;
+ g_hFontSrvGpuDescHandle.ptr = 0;
+ g_pFrameResources = NULL;
+ g_numFramesInFlight = 0;
+ g_frameIndex = UINT_MAX;
+}
+
+void ImGui_ImplDX12_NewFrame()
+{
+ if (!g_pPipelineState)
+ ImGui_ImplDX12_CreateDeviceObjects();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_dx12.h b/3rdparty/imgui/examples/imgui_impl_dx12.h
new file mode 100644
index 00000000..8c462547
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx12.h
@@ -0,0 +1,31 @@
+// dear imgui: Renderer for DirectX12
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'D3D12_GPU_DESCRIPTOR_HANDLE' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+// Issues:
+// [ ] 64-bit only for now! (Because sizeof(ImTextureId) == sizeof(void*)). See github.com/ocornut/imgui/pull/301
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+enum DXGI_FORMAT;
+struct ID3D12Device;
+struct ID3D12GraphicsCommandList;
+struct D3D12_CPU_DESCRIPTOR_HANDLE;
+struct D3D12_GPU_DESCRIPTOR_HANDLE;
+
+// cmd_list is the command list that the implementation will use to render imgui draw lists.
+// Before calling the render function, caller must prepare cmd_list by resetting it and setting the appropriate
+// render target and descriptor heap that contains font_srv_cpu_desc_handle/font_srv_gpu_desc_handle.
+// font_srv_cpu_desc_handle and font_srv_gpu_desc_handle are handles to a single SRV descriptor to use for the internal font texture.
+IMGUI_IMPL_API bool ImGui_ImplDX12_Init(ID3D12Device* device, int num_frames_in_flight, DXGI_FORMAT rtv_format,
+ D3D12_CPU_DESCRIPTOR_HANDLE font_srv_cpu_desc_handle, D3D12_GPU_DESCRIPTOR_HANDLE font_srv_gpu_desc_handle);
+IMGUI_IMPL_API void ImGui_ImplDX12_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplDX12_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplDX12_RenderDrawData(ImDrawData* draw_data, ID3D12GraphicsCommandList* graphics_command_list);
+
+// Use if you want to reset your rendering device without losing ImGui state.
+IMGUI_IMPL_API void ImGui_ImplDX12_InvalidateDeviceObjects();
+IMGUI_IMPL_API bool ImGui_ImplDX12_CreateDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_dx9.cpp b/3rdparty/imgui/examples/imgui_impl_dx9.cpp
new file mode 100644
index 00000000..4aa139d4
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx9.cpp
@@ -0,0 +1,274 @@
+// dear imgui: Renderer for DirectX9
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-06-08: Misc: Extracted imgui_impl_dx9.cpp/.h away from the old combined DX9+Win32 example.
+// 2018-06-08: DirectX9: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-05-07: Render: Saving/restoring Transform because they don't seem to be included in the StateBlock. Setting shading mode to Gouraud.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplDX9_RenderDrawData() in the .h file so you can call it yourself.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+
+#include "imgui.h"
+#include "imgui_impl_dx9.h"
+
+// DirectX
+#include
+#define DIRECTINPUT_VERSION 0x0800
+#include
+
+// DirectX data
+static LPDIRECT3DDEVICE9 g_pd3dDevice = NULL;
+static LPDIRECT3DVERTEXBUFFER9 g_pVB = NULL;
+static LPDIRECT3DINDEXBUFFER9 g_pIB = NULL;
+static LPDIRECT3DTEXTURE9 g_FontTexture = NULL;
+static int g_VertexBufferSize = 5000, g_IndexBufferSize = 10000;
+
+struct CUSTOMVERTEX
+{
+ float pos[3];
+ D3DCOLOR col;
+ float uv[2];
+};
+#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZ|D3DFVF_DIFFUSE|D3DFVF_TEX1)
+
+// Render function.
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data)
+{
+ // Avoid rendering when minimized
+ if (draw_data->DisplaySize.x <= 0.0f || draw_data->DisplaySize.y <= 0.0f)
+ return;
+
+ // Create and grow buffers if needed
+ if (!g_pVB || g_VertexBufferSize < draw_data->TotalVtxCount)
+ {
+ if (g_pVB) { g_pVB->Release(); g_pVB = NULL; }
+ g_VertexBufferSize = draw_data->TotalVtxCount + 5000;
+ if (g_pd3dDevice->CreateVertexBuffer(g_VertexBufferSize * sizeof(CUSTOMVERTEX), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &g_pVB, NULL) < 0)
+ return;
+ }
+ if (!g_pIB || g_IndexBufferSize < draw_data->TotalIdxCount)
+ {
+ if (g_pIB) { g_pIB->Release(); g_pIB = NULL; }
+ g_IndexBufferSize = draw_data->TotalIdxCount + 10000;
+ if (g_pd3dDevice->CreateIndexBuffer(g_IndexBufferSize * sizeof(ImDrawIdx), D3DUSAGE_DYNAMIC | D3DUSAGE_WRITEONLY, sizeof(ImDrawIdx) == 2 ? D3DFMT_INDEX16 : D3DFMT_INDEX32, D3DPOOL_DEFAULT, &g_pIB, NULL) < 0)
+ return;
+ }
+
+ // Backup the DX9 state
+ IDirect3DStateBlock9* d3d9_state_block = NULL;
+ if (g_pd3dDevice->CreateStateBlock(D3DSBT_ALL, &d3d9_state_block) < 0)
+ return;
+
+ // Backup the DX9 transform (DX9 documentation suggests that it is included in the StateBlock but it doesn't appear to)
+ D3DMATRIX last_world, last_view, last_projection;
+ g_pd3dDevice->GetTransform(D3DTS_WORLD, &last_world);
+ g_pd3dDevice->GetTransform(D3DTS_VIEW, &last_view);
+ g_pd3dDevice->GetTransform(D3DTS_PROJECTION, &last_projection);
+
+ // Copy and convert all vertices into a single contiguous buffer, convert colors to DX9 default format.
+ // FIXME-OPT: This is a waste of resource, the ideal is to use imconfig.h and
+ // 1) to avoid repacking colors: #define IMGUI_USE_BGRA_PACKED_COLOR
+ // 2) to avoid repacking vertices: #define IMGUI_OVERRIDE_DRAWVERT_STRUCT_LAYOUT struct ImDrawVert { ImVec2 pos; float z; ImU32 col; ImVec2 uv; }
+ CUSTOMVERTEX* vtx_dst;
+ ImDrawIdx* idx_dst;
+ if (g_pVB->Lock(0, (UINT)(draw_data->TotalVtxCount * sizeof(CUSTOMVERTEX)), (void**)&vtx_dst, D3DLOCK_DISCARD) < 0)
+ return;
+ if (g_pIB->Lock(0, (UINT)(draw_data->TotalIdxCount * sizeof(ImDrawIdx)), (void**)&idx_dst, D3DLOCK_DISCARD) < 0)
+ return;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ const ImDrawVert* vtx_src = cmd_list->VtxBuffer.Data;
+ for (int i = 0; i < cmd_list->VtxBuffer.Size; i++)
+ {
+ vtx_dst->pos[0] = vtx_src->pos.x;
+ vtx_dst->pos[1] = vtx_src->pos.y;
+ vtx_dst->pos[2] = 0.0f;
+ vtx_dst->col = (vtx_src->col & 0xFF00FF00) | ((vtx_src->col & 0xFF0000) >> 16) | ((vtx_src->col & 0xFF) << 16); // RGBA --> ARGB for DirectX9
+ vtx_dst->uv[0] = vtx_src->uv.x;
+ vtx_dst->uv[1] = vtx_src->uv.y;
+ vtx_dst++;
+ vtx_src++;
+ }
+ memcpy(idx_dst, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
+ idx_dst += cmd_list->IdxBuffer.Size;
+ }
+ g_pVB->Unlock();
+ g_pIB->Unlock();
+ g_pd3dDevice->SetStreamSource(0, g_pVB, 0, sizeof(CUSTOMVERTEX));
+ g_pd3dDevice->SetIndices(g_pIB);
+ g_pd3dDevice->SetFVF(D3DFVF_CUSTOMVERTEX);
+
+ // Setup viewport
+ D3DVIEWPORT9 vp;
+ vp.X = vp.Y = 0;
+ vp.Width = (DWORD)draw_data->DisplaySize.x;
+ vp.Height = (DWORD)draw_data->DisplaySize.y;
+ vp.MinZ = 0.0f;
+ vp.MaxZ = 1.0f;
+ g_pd3dDevice->SetViewport(&vp);
+
+ // Setup render state: fixed-pipeline, alpha-blending, no face culling, no depth testing, shade mode (for gradient)
+ g_pd3dDevice->SetPixelShader(NULL);
+ g_pd3dDevice->SetVertexShader(NULL);
+ g_pd3dDevice->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE);
+ g_pd3dDevice->SetRenderState(D3DRS_LIGHTING, false);
+ g_pd3dDevice->SetRenderState(D3DRS_ZENABLE, false);
+ g_pd3dDevice->SetRenderState(D3DRS_ALPHABLENDENABLE, true);
+ g_pd3dDevice->SetRenderState(D3DRS_ALPHATESTENABLE, false);
+ g_pd3dDevice->SetRenderState(D3DRS_BLENDOP, D3DBLENDOP_ADD);
+ g_pd3dDevice->SetRenderState(D3DRS_SRCBLEND, D3DBLEND_SRCALPHA);
+ g_pd3dDevice->SetRenderState(D3DRS_DESTBLEND, D3DBLEND_INVSRCALPHA);
+ g_pd3dDevice->SetRenderState(D3DRS_SCISSORTESTENABLE, true);
+ g_pd3dDevice->SetRenderState(D3DRS_SHADEMODE, D3DSHADE_GOURAUD);
+ g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLOROP, D3DTOP_MODULATE);
+ g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG1, D3DTA_TEXTURE);
+ g_pd3dDevice->SetTextureStageState(0, D3DTSS_COLORARG2, D3DTA_DIFFUSE);
+ g_pd3dDevice->SetTextureStageState(0, D3DTSS_ALPHAOP, D3DTOP_MODULATE);
+ g_pd3dDevice->SetTextureStageState(0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE);
+ g_pd3dDevice->SetTextureStageState(0, D3DTSS_ALPHAARG2, D3DTA_DIFFUSE);
+ g_pd3dDevice->SetSamplerState(0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR);
+ g_pd3dDevice->SetSamplerState(0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR);
+
+ // Setup orthographic projection matrix
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right).
+ // Being agnostic of whether or can be used, we aren't relying on D3DXMatrixIdentity()/D3DXMatrixOrthoOffCenterLH() or DirectX::XMMatrixIdentity()/DirectX::XMMatrixOrthographicOffCenterLH()
+ {
+ float L = draw_data->DisplayPos.x + 0.5f;
+ float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x + 0.5f;
+ float T = draw_data->DisplayPos.y + 0.5f;
+ float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y + 0.5f;
+ D3DMATRIX mat_identity = { { 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f } };
+ D3DMATRIX mat_projection =
+ {
+ 2.0f/(R-L), 0.0f, 0.0f, 0.0f,
+ 0.0f, 2.0f/(T-B), 0.0f, 0.0f,
+ 0.0f, 0.0f, 0.5f, 0.0f,
+ (L+R)/(L-R), (T+B)/(B-T), 0.5f, 1.0f,
+ };
+ g_pd3dDevice->SetTransform(D3DTS_WORLD, &mat_identity);
+ g_pd3dDevice->SetTransform(D3DTS_VIEW, &mat_identity);
+ g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &mat_projection);
+ }
+
+ // Render command lists
+ int vtx_offset = 0;
+ int idx_offset = 0;
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ const RECT r = { (LONG)(pcmd->ClipRect.x - pos.x), (LONG)(pcmd->ClipRect.y - pos.y), (LONG)(pcmd->ClipRect.z - pos.x), (LONG)(pcmd->ClipRect.w - pos.y) };
+ const LPDIRECT3DTEXTURE9 texture = (LPDIRECT3DTEXTURE9)pcmd->TextureId;
+ g_pd3dDevice->SetTexture(0, texture);
+ g_pd3dDevice->SetScissorRect(&r);
+ g_pd3dDevice->DrawIndexedPrimitive(D3DPT_TRIANGLELIST, vtx_offset, 0, (UINT)cmd_list->VtxBuffer.Size, idx_offset, pcmd->ElemCount/3);
+ }
+ idx_offset += pcmd->ElemCount;
+ }
+ vtx_offset += cmd_list->VtxBuffer.Size;
+ }
+
+ // Restore the DX9 transform
+ g_pd3dDevice->SetTransform(D3DTS_WORLD, &last_world);
+ g_pd3dDevice->SetTransform(D3DTS_VIEW, &last_view);
+ g_pd3dDevice->SetTransform(D3DTS_PROJECTION, &last_projection);
+
+ // Restore the DX9 state
+ d3d9_state_block->Apply();
+ d3d9_state_block->Release();
+}
+
+bool ImGui_ImplDX9_Init(IDirect3DDevice9* device)
+{
+ g_pd3dDevice = device;
+ return true;
+}
+
+void ImGui_ImplDX9_Shutdown()
+{
+ ImGui_ImplDX9_InvalidateDeviceObjects();
+ g_pd3dDevice = NULL;
+}
+
+static bool ImGui_ImplDX9_CreateFontsTexture()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height, bytes_per_pixel;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height, &bytes_per_pixel);
+
+ // Upload texture to graphics system
+ g_FontTexture = NULL;
+ if (g_pd3dDevice->CreateTexture(width, height, 1, D3DUSAGE_DYNAMIC, D3DFMT_A8R8G8B8, D3DPOOL_DEFAULT, &g_FontTexture, NULL) < 0)
+ return false;
+ D3DLOCKED_RECT tex_locked_rect;
+ if (g_FontTexture->LockRect(0, &tex_locked_rect, NULL, 0) != D3D_OK)
+ return false;
+ for (int y = 0; y < height; y++)
+ memcpy((unsigned char *)tex_locked_rect.pBits + tex_locked_rect.Pitch * y, pixels + (width * bytes_per_pixel) * y, (width * bytes_per_pixel));
+ g_FontTexture->UnlockRect(0);
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)g_FontTexture;
+
+ return true;
+}
+
+bool ImGui_ImplDX9_CreateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return false;
+ if (!ImGui_ImplDX9_CreateFontsTexture())
+ return false;
+ return true;
+}
+
+void ImGui_ImplDX9_InvalidateDeviceObjects()
+{
+ if (!g_pd3dDevice)
+ return;
+ if (g_pVB)
+ {
+ g_pVB->Release();
+ g_pVB = NULL;
+ }
+ if (g_pIB)
+ {
+ g_pIB->Release();
+ g_pIB = NULL;
+ }
+
+ // At this point note that we set ImGui::GetIO().Fonts->TexID to be == g_FontTexture, so clear both.
+ ImGuiIO& io = ImGui::GetIO();
+ IM_ASSERT(g_FontTexture == io.Fonts->TexID);
+ if (g_FontTexture)
+ g_FontTexture->Release();
+ g_FontTexture = NULL;
+ io.Fonts->TexID = NULL;
+}
+
+void ImGui_ImplDX9_NewFrame()
+{
+ if (!g_FontTexture)
+ ImGui_ImplDX9_CreateDeviceObjects();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_dx9.h b/3rdparty/imgui/examples/imgui_impl_dx9.h
new file mode 100644
index 00000000..03da1bda
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_dx9.h
@@ -0,0 +1,20 @@
+// dear imgui: Renderer for DirectX9
+// This needs to be used along with a Platform Binding (e.g. Win32)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'LPDIRECT3DTEXTURE9' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+struct IDirect3DDevice9;
+
+IMGUI_IMPL_API bool ImGui_ImplDX9_Init(IDirect3DDevice9* device);
+IMGUI_IMPL_API void ImGui_ImplDX9_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplDX9_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplDX9_RenderDrawData(ImDrawData* draw_data);
+
+// Use if you want to reset your rendering device without losing ImGui state.
+IMGUI_IMPL_API void ImGui_ImplDX9_InvalidateDeviceObjects();
+IMGUI_IMPL_API bool ImGui_ImplDX9_CreateDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_freeglut.cpp b/3rdparty/imgui/examples/imgui_impl_freeglut.cpp
new file mode 100644
index 00000000..4058876a
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_freeglut.cpp
@@ -0,0 +1,188 @@
+// dear imgui: Platform Binding for FreeGLUT
+// This needs to be used along with a Renderer (e.g. OpenGL2)
+
+// Issues:
+// [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I
+// [ ] Platform: Missing gamepad support.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-03-22: Added FreeGLUT Platform binding.
+
+#include "imgui.h"
+#include "imgui_impl_freeglut.h"
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4505) // unreferenced local function has been removed (stb stuff)
+#endif
+
+static int g_Time = 0; // Current time, in milliseconds
+
+bool ImGui_ImplFreeGLUT_Init()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ g_Time = 0;
+
+ // Glut has 1 function for characters and one for "special keys". We map the characters in the 0..255 range and the keys above.
+ io.KeyMap[ImGuiKey_Tab] = '\t'; // == 9 == CTRL+I
+ io.KeyMap[ImGuiKey_LeftArrow] = 256 + GLUT_KEY_LEFT;
+ io.KeyMap[ImGuiKey_RightArrow] = 256 + GLUT_KEY_RIGHT;
+ io.KeyMap[ImGuiKey_UpArrow] = 256 + GLUT_KEY_UP;
+ io.KeyMap[ImGuiKey_DownArrow] = 256 + GLUT_KEY_DOWN;
+ io.KeyMap[ImGuiKey_PageUp] = 256 + GLUT_KEY_PAGE_UP;
+ io.KeyMap[ImGuiKey_PageDown] = 256 + GLUT_KEY_PAGE_DOWN;
+ io.KeyMap[ImGuiKey_Home] = 256 + GLUT_KEY_HOME;
+ io.KeyMap[ImGuiKey_End] = 256 + GLUT_KEY_END;
+ io.KeyMap[ImGuiKey_Insert] = 256 + GLUT_KEY_INSERT;
+ io.KeyMap[ImGuiKey_Delete] = 127;
+ io.KeyMap[ImGuiKey_Backspace] = 8; // == CTRL+H
+ io.KeyMap[ImGuiKey_Space] = ' ';
+ io.KeyMap[ImGuiKey_Enter] = 13; // == CTRL+M
+ io.KeyMap[ImGuiKey_Escape] = 27;
+ io.KeyMap[ImGuiKey_A] = 'A';
+ io.KeyMap[ImGuiKey_C] = 'C';
+ io.KeyMap[ImGuiKey_V] = 'V';
+ io.KeyMap[ImGuiKey_X] = 'X';
+ io.KeyMap[ImGuiKey_Y] = 'Y';
+ io.KeyMap[ImGuiKey_Z] = 'Z';
+
+ return true;
+}
+
+void ImGui_ImplFreeGLUT_InstallFuncs()
+{
+ glutReshapeFunc(ImGui_ImplFreeGLUT_ReshapeFunc);
+ glutMotionFunc(ImGui_ImplFreeGLUT_MotionFunc);
+ glutPassiveMotionFunc(ImGui_ImplFreeGLUT_MotionFunc);
+ glutMouseFunc(ImGui_ImplFreeGLUT_MouseFunc);
+ glutMouseWheelFunc(ImGui_ImplFreeGLUT_MouseWheelFunc);
+ glutKeyboardFunc(ImGui_ImplFreeGLUT_KeyboardFunc);
+ glutKeyboardUpFunc(ImGui_ImplFreeGLUT_KeyboardUpFunc);
+ glutSpecialFunc(ImGui_ImplFreeGLUT_SpecialFunc);
+ glutSpecialUpFunc(ImGui_ImplFreeGLUT_SpecialUpFunc);
+}
+
+void ImGui_ImplFreeGLUT_Shutdown()
+{
+}
+
+void ImGui_ImplFreeGLUT_NewFrame()
+{
+ // Setup time step
+ ImGuiIO& io = ImGui::GetIO();
+ int current_time = glutGet(GLUT_ELAPSED_TIME);
+ io.DeltaTime = (current_time - g_Time) / 1000.0f;
+ g_Time = current_time;
+
+ // Start the frame
+ ImGui::NewFrame();
+}
+
+static void ImGui_ImplFreeGLUT_UpdateKeyboardMods()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ int mods = glutGetModifiers();
+ io.KeyCtrl = (mods & GLUT_ACTIVE_CTRL) != 0;
+ io.KeyShift = (mods & GLUT_ACTIVE_SHIFT) != 0;
+ io.KeyAlt = (mods & GLUT_ACTIVE_ALT) != 0;
+}
+
+void ImGui_ImplFreeGLUT_KeyboardFunc(unsigned char c, int x, int y)
+{
+ // Send character to imgui
+ //printf("char_down_func %d '%c'\n", c, c);
+ ImGuiIO& io = ImGui::GetIO();
+ if (c >= 32)
+ io.AddInputCharacter((unsigned short)c);
+
+ // Store letters in KeysDown[] array as both uppercase and lowercase + Handle GLUT translating CTRL+A..CTRL+Z as 1..26.
+ // This is a hacky mess but GLUT is unable to distinguish e.g. a TAB key from CTRL+I so this is probably the best we can do here.
+ if (c >= 1 && c <= 26)
+ io.KeysDown[c] = io.KeysDown[c - 1 + 'a'] = io.KeysDown[c - 1 + 'A'] = true;
+ else if (c >= 'a' && c <= 'z')
+ io.KeysDown[c] = io.KeysDown[c - 'a' + 'A'] = true;
+ else if (c >= 'A' && c <= 'Z')
+ io.KeysDown[c] = io.KeysDown[c - 'A' + 'a'] = true;
+ else
+ io.KeysDown[c] = true;
+ ImGui_ImplFreeGLUT_UpdateKeyboardMods();
+ (void)x; (void)y; // Unused
+}
+
+void ImGui_ImplFreeGLUT_KeyboardUpFunc(unsigned char c, int x, int y)
+{
+ //printf("char_up_func %d '%c'\n", c, c);
+ ImGuiIO& io = ImGui::GetIO();
+ if (c >= 1 && c <= 26)
+ io.KeysDown[c] = io.KeysDown[c - 1 + 'a'] = io.KeysDown[c - 1 + 'A'] = false;
+ else if (c >= 'a' && c <= 'z')
+ io.KeysDown[c] = io.KeysDown[c - 'a' + 'A'] = false;
+ else if (c >= 'A' && c <= 'Z')
+ io.KeysDown[c] = io.KeysDown[c - 'A' + 'a'] = false;
+ else
+ io.KeysDown[c] = false;
+ ImGui_ImplFreeGLUT_UpdateKeyboardMods();
+ (void)x; (void)y; // Unused
+}
+
+void ImGui_ImplFreeGLUT_SpecialFunc(int key, int x, int y)
+{
+ //printf("key_down_func %d\n", key);
+ ImGuiIO& io = ImGui::GetIO();
+ if (key + 256 < IM_ARRAYSIZE(io.KeysDown))
+ io.KeysDown[key + 256] = true;
+ ImGui_ImplFreeGLUT_UpdateKeyboardMods();
+ (void)x; (void)y; // Unused
+}
+
+void ImGui_ImplFreeGLUT_SpecialUpFunc(int key, int x, int y)
+{
+ //printf("key_up_func %d\n", key);
+ ImGuiIO& io = ImGui::GetIO();
+ if (key + 256 < IM_ARRAYSIZE(io.KeysDown))
+ io.KeysDown[key + 256] = false;
+ ImGui_ImplFreeGLUT_UpdateKeyboardMods();
+ (void)x; (void)y; // Unused
+}
+
+void ImGui_ImplFreeGLUT_MouseFunc(int glut_button, int state, int x, int y)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ io.MousePos = ImVec2((float)x, (float)y);
+ int button = -1;
+ if (glut_button == GLUT_LEFT_BUTTON) button = 0;
+ if (glut_button == GLUT_RIGHT_BUTTON) button = 1;
+ if (glut_button == GLUT_MIDDLE_BUTTON) button = 2;
+ if (button != -1 && state == GLUT_DOWN)
+ io.MouseDown[button] = true;
+ if (button != -1 && state == GLUT_UP)
+ io.MouseDown[button] = false;
+}
+
+void ImGui_ImplFreeGLUT_MouseWheelFunc(int button, int dir, int x, int y)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ io.MousePos = ImVec2((float)x, (float)y);
+ if (dir > 0)
+ io.MouseWheel += 1.0;
+ else if (dir < 0)
+ io.MouseWheel -= 1.0;
+ (void)button; // Unused
+}
+
+void ImGui_ImplFreeGLUT_ReshapeFunc(int w, int h)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ io.DisplaySize = ImVec2((float)w, (float)h);
+}
+
+void ImGui_ImplFreeGLUT_MotionFunc(int x, int y)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ io.MousePos = ImVec2((float)x, (float)y);
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_freeglut.h b/3rdparty/imgui/examples/imgui_impl_freeglut.h
new file mode 100644
index 00000000..6289ed4d
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_freeglut.h
@@ -0,0 +1,27 @@
+// dear imgui: Platform Binding for FreeGLUT
+// This needs to be used along with a Renderer (e.g. OpenGL2)
+
+// Issues:
+// [ ] Platform: GLUT is unable to distinguish e.g. Backspace from CTRL+H or TAB from CTRL+I
+// [ ] Platform: Missing gamepad support.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+IMGUI_IMPL_API bool ImGui_ImplFreeGLUT_Init();
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_InstallFuncs();
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_NewFrame();
+
+// You can call ImGui_ImplFreeGLUT_InstallFuncs() to get all those functions installed automatically,
+// or call them yourself from your own GLUT handlers. We are using the same weird names as GLUT for consistency..
+//---------------------------------------- GLUT name --------------------------------------------- Decent Name ---------
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_ReshapeFunc(int w, int h); // ~ ResizeFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_MotionFunc(int x, int y); // ~ MouseMoveFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_MouseFunc(int button, int state, int x, int y); // ~ MouseButtonFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_MouseWheelFunc(int button, int dir, int x, int y); // ~ MouseWheelFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_KeyboardFunc(unsigned char c, int x, int y); // ~ CharPressedFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_KeyboardUpFunc(unsigned char c, int x, int y); // ~ CharReleasedFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_SpecialFunc(int key, int x, int y); // ~ KeyPressedFunc
+IMGUI_IMPL_API void ImGui_ImplFreeGLUT_SpecialUpFunc(int key, int x, int y); // ~ KeyReleasedFunc
diff --git a/3rdparty/imgui/examples/imgui_impl_glfw.cpp b/3rdparty/imgui/examples/imgui_impl_glfw.cpp
new file mode 100644
index 00000000..753909ed
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_glfw.cpp
@@ -0,0 +1,298 @@
+// dear imgui: Platform Binding for GLFW
+// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..)
+// (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
+
+// Implemented features:
+// [X] Platform: Clipboard support.
+// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
+// [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: 3 cursors types are missing from GLFW.
+// [X] Platform: Keyboard arrays indexed using GLFW_KEY_* codes, e.g. ImGui::IsKeyPressed(GLFW_KEY_SPACE).
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-08-01: Inputs: Workaround for Emscripten which doesn't seem to handle focus related calls.
+// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
+// 2018-06-08: Misc: Extracted imgui_impl_glfw.cpp/.h away from the old combined GLFW+OpenGL/Vulkan examples.
+// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag.
+// 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value, passed to glfwSetCursor()).
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
+// 2018-01-25: Inputs: Added gamepad support if ImGuiConfigFlags_NavEnableGamepad is set.
+// 2018-01-25: Inputs: Honoring the io.WantSetMousePos by repositioning the mouse (when using navigation and ImGuiConfigFlags_NavMoveMouse is set).
+// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
+// 2018-01-18: Inputs: Added mapping for ImGuiKey_Insert.
+// 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1).
+// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.
+
+#include "imgui.h"
+#include "imgui_impl_glfw.h"
+
+// GLFW
+#include
+#ifdef _WIN32
+#undef APIENTRY
+#define GLFW_EXPOSE_NATIVE_WIN32
+#include // for glfwGetWin32Window
+#endif
+#define GLFW_HAS_WINDOW_TOPMOST (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200) // 3.2+ GLFW_FLOATING
+#define GLFW_HAS_WINDOW_HOVERED (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ GLFW_HOVERED
+#define GLFW_HAS_WINDOW_ALPHA (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ glfwSetWindowOpacity
+#define GLFW_HAS_PER_MONITOR_DPI (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3300) // 3.3+ glfwGetMonitorContentScale
+#define GLFW_HAS_VULKAN (GLFW_VERSION_MAJOR * 1000 + GLFW_VERSION_MINOR * 100 >= 3200) // 3.2+ glfwCreateWindowSurface
+
+// Data
+enum GlfwClientApi
+{
+ GlfwClientApi_Unknown,
+ GlfwClientApi_OpenGL,
+ GlfwClientApi_Vulkan
+};
+static GLFWwindow* g_Window = NULL;
+static GlfwClientApi g_ClientApi = GlfwClientApi_Unknown;
+static double g_Time = 0.0;
+static bool g_MouseJustPressed[5] = { false, false, false, false, false };
+static GLFWcursor* g_MouseCursors[ImGuiMouseCursor_COUNT] = { 0 };
+
+static const char* ImGui_ImplGlfw_GetClipboardText(void* user_data)
+{
+ return glfwGetClipboardString((GLFWwindow*)user_data);
+}
+
+static void ImGui_ImplGlfw_SetClipboardText(void* user_data, const char* text)
+{
+ glfwSetClipboardString((GLFWwindow*)user_data, text);
+}
+
+void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow*, int button, int action, int /*mods*/)
+{
+ if (action == GLFW_PRESS && button >= 0 && button < IM_ARRAYSIZE(g_MouseJustPressed))
+ g_MouseJustPressed[button] = true;
+}
+
+void ImGui_ImplGlfw_ScrollCallback(GLFWwindow*, double xoffset, double yoffset)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ io.MouseWheelH += (float)xoffset;
+ io.MouseWheel += (float)yoffset;
+}
+
+void ImGui_ImplGlfw_KeyCallback(GLFWwindow*, int key, int, int action, int mods)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ if (action == GLFW_PRESS)
+ io.KeysDown[key] = true;
+ if (action == GLFW_RELEASE)
+ io.KeysDown[key] = false;
+
+ (void)mods; // Modifiers are not reliable across systems
+ io.KeyCtrl = io.KeysDown[GLFW_KEY_LEFT_CONTROL] || io.KeysDown[GLFW_KEY_RIGHT_CONTROL];
+ io.KeyShift = io.KeysDown[GLFW_KEY_LEFT_SHIFT] || io.KeysDown[GLFW_KEY_RIGHT_SHIFT];
+ io.KeyAlt = io.KeysDown[GLFW_KEY_LEFT_ALT] || io.KeysDown[GLFW_KEY_RIGHT_ALT];
+ io.KeySuper = io.KeysDown[GLFW_KEY_LEFT_SUPER] || io.KeysDown[GLFW_KEY_RIGHT_SUPER];
+}
+
+void ImGui_ImplGlfw_CharCallback(GLFWwindow*, unsigned int c)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ if (c > 0 && c < 0x10000)
+ io.AddInputCharacter((unsigned short)c);
+}
+
+void ImGui_ImplGlfw_InstallCallbacks(GLFWwindow* window)
+{
+ glfwSetMouseButtonCallback(window, ImGui_ImplGlfw_MouseButtonCallback);
+ glfwSetScrollCallback(window, ImGui_ImplGlfw_ScrollCallback);
+ glfwSetKeyCallback(window, ImGui_ImplGlfw_KeyCallback);
+ glfwSetCharCallback(window, ImGui_ImplGlfw_CharCallback);
+}
+
+static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, GlfwClientApi client_api)
+{
+ g_Window = window;
+ g_Time = 0.0;
+
+ // Setup back-end capabilities flags
+ ImGuiIO& io = ImGui::GetIO();
+ io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
+ io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
+
+ // Keyboard mapping. ImGui will use those indices to peek into the io.KeysDown[] array.
+ io.KeyMap[ImGuiKey_Tab] = GLFW_KEY_TAB;
+ io.KeyMap[ImGuiKey_LeftArrow] = GLFW_KEY_LEFT;
+ io.KeyMap[ImGuiKey_RightArrow] = GLFW_KEY_RIGHT;
+ io.KeyMap[ImGuiKey_UpArrow] = GLFW_KEY_UP;
+ io.KeyMap[ImGuiKey_DownArrow] = GLFW_KEY_DOWN;
+ io.KeyMap[ImGuiKey_PageUp] = GLFW_KEY_PAGE_UP;
+ io.KeyMap[ImGuiKey_PageDown] = GLFW_KEY_PAGE_DOWN;
+ io.KeyMap[ImGuiKey_Home] = GLFW_KEY_HOME;
+ io.KeyMap[ImGuiKey_End] = GLFW_KEY_END;
+ io.KeyMap[ImGuiKey_Insert] = GLFW_KEY_INSERT;
+ io.KeyMap[ImGuiKey_Delete] = GLFW_KEY_DELETE;
+ io.KeyMap[ImGuiKey_Backspace] = GLFW_KEY_BACKSPACE;
+ io.KeyMap[ImGuiKey_Space] = GLFW_KEY_SPACE;
+ io.KeyMap[ImGuiKey_Enter] = GLFW_KEY_ENTER;
+ io.KeyMap[ImGuiKey_Escape] = GLFW_KEY_ESCAPE;
+ io.KeyMap[ImGuiKey_A] = GLFW_KEY_A;
+ io.KeyMap[ImGuiKey_C] = GLFW_KEY_C;
+ io.KeyMap[ImGuiKey_V] = GLFW_KEY_V;
+ io.KeyMap[ImGuiKey_X] = GLFW_KEY_X;
+ io.KeyMap[ImGuiKey_Y] = GLFW_KEY_Y;
+ io.KeyMap[ImGuiKey_Z] = GLFW_KEY_Z;
+
+ io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
+ io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
+ io.ClipboardUserData = g_Window;
+#if defined(_WIN32)
+ io.ImeWindowHandle = (void*)glfwGetWin32Window(g_Window);
+#endif
+
+ g_MouseCursors[ImGuiMouseCursor_Arrow] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR);
+ g_MouseCursors[ImGuiMouseCursor_TextInput] = glfwCreateStandardCursor(GLFW_IBEAM_CURSOR);
+ g_MouseCursors[ImGuiMouseCursor_ResizeAll] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); // FIXME: GLFW doesn't have this.
+ g_MouseCursors[ImGuiMouseCursor_ResizeNS] = glfwCreateStandardCursor(GLFW_VRESIZE_CURSOR);
+ g_MouseCursors[ImGuiMouseCursor_ResizeEW] = glfwCreateStandardCursor(GLFW_HRESIZE_CURSOR);
+ g_MouseCursors[ImGuiMouseCursor_ResizeNESW] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); // FIXME: GLFW doesn't have this.
+ g_MouseCursors[ImGuiMouseCursor_ResizeNWSE] = glfwCreateStandardCursor(GLFW_ARROW_CURSOR); // FIXME: GLFW doesn't have this.
+ g_MouseCursors[ImGuiMouseCursor_Hand] = glfwCreateStandardCursor(GLFW_HAND_CURSOR);
+
+ if (install_callbacks)
+ ImGui_ImplGlfw_InstallCallbacks(window);
+
+ g_ClientApi = client_api;
+ return true;
+}
+
+bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks)
+{
+ return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_OpenGL);
+}
+
+bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks)
+{
+ return ImGui_ImplGlfw_Init(window, install_callbacks, GlfwClientApi_Vulkan);
+}
+
+void ImGui_ImplGlfw_Shutdown()
+{
+ for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
+ {
+ glfwDestroyCursor(g_MouseCursors[cursor_n]);
+ g_MouseCursors[cursor_n] = NULL;
+ }
+ g_ClientApi = GlfwClientApi_Unknown;
+}
+
+static void ImGui_ImplGlfw_UpdateMousePosAndButtons()
+{
+ // Update buttons
+ ImGuiIO& io = ImGui::GetIO();
+ for (int i = 0; i < IM_ARRAYSIZE(io.MouseDown); i++)
+ {
+ // If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
+ io.MouseDown[i] = g_MouseJustPressed[i] || glfwGetMouseButton(g_Window, i) != 0;
+ g_MouseJustPressed[i] = false;
+ }
+
+ // Update mouse position
+ const ImVec2 mouse_pos_backup = io.MousePos;
+ io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
+#ifdef __EMSCRIPTEN__
+ const bool focused = true; // Emscripten
+#else
+ const bool focused = glfwGetWindowAttrib(g_Window, GLFW_FOCUSED) != 0;
+#endif
+ if (focused)
+ {
+ if (io.WantSetMousePos)
+ {
+ glfwSetCursorPos(g_Window, (double)mouse_pos_backup.x, (double)mouse_pos_backup.y);
+ }
+ else
+ {
+ double mouse_x, mouse_y;
+ glfwGetCursorPos(g_Window, &mouse_x, &mouse_y);
+ io.MousePos = ImVec2((float)mouse_x, (float)mouse_y);
+ }
+ }
+}
+
+static void ImGui_ImplGlfw_UpdateMouseCursor()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ if ((io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange) || glfwGetInputMode(g_Window, GLFW_CURSOR) == GLFW_CURSOR_DISABLED)
+ return;
+
+ ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
+ if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor)
+ {
+ // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
+ glfwSetInputMode(g_Window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
+ }
+ else
+ {
+ // Show OS mouse cursor
+ // FIXME-PLATFORM: Unfocused windows seems to fail changing the mouse cursor with GLFW 3.2, but 3.3 works here.
+ glfwSetCursor(g_Window, g_MouseCursors[imgui_cursor] ? g_MouseCursors[imgui_cursor] : g_MouseCursors[ImGuiMouseCursor_Arrow]);
+ glfwSetInputMode(g_Window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
+ }
+}
+
+void ImGui_ImplGlfw_NewFrame()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ IM_ASSERT(io.Fonts->IsBuilt()); // Font atlas needs to be built, call renderer _NewFrame() function e.g. ImGui_ImplOpenGL3_NewFrame()
+
+ // Setup display size
+ int w, h;
+ int display_w, display_h;
+ glfwGetWindowSize(g_Window, &w, &h);
+ glfwGetFramebufferSize(g_Window, &display_w, &display_h);
+ io.DisplaySize = ImVec2((float)w, (float)h);
+ io.DisplayFramebufferScale = ImVec2(w > 0 ? ((float)display_w / w) : 0, h > 0 ? ((float)display_h / h) : 0);
+
+ // Setup time step
+ double current_time = glfwGetTime();
+ io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f/60.0f);
+ g_Time = current_time;
+
+ ImGui_ImplGlfw_UpdateMousePosAndButtons();
+ ImGui_ImplGlfw_UpdateMouseCursor();
+
+ // Gamepad navigation mapping [BETA]
+ memset(io.NavInputs, 0, sizeof(io.NavInputs));
+ if (io.ConfigFlags & ImGuiConfigFlags_NavEnableGamepad)
+ {
+ // Update gamepad inputs
+ #define MAP_BUTTON(NAV_NO, BUTTON_NO) { if (buttons_count > BUTTON_NO && buttons[BUTTON_NO] == GLFW_PRESS) io.NavInputs[NAV_NO] = 1.0f; }
+ #define MAP_ANALOG(NAV_NO, AXIS_NO, V0, V1) { float v = (axes_count > AXIS_NO) ? axes[AXIS_NO] : V0; v = (v - V0) / (V1 - V0); if (v > 1.0f) v = 1.0f; if (io.NavInputs[NAV_NO] < v) io.NavInputs[NAV_NO] = v; }
+ int axes_count = 0, buttons_count = 0;
+ const float* axes = glfwGetJoystickAxes(GLFW_JOYSTICK_1, &axes_count);
+ const unsigned char* buttons = glfwGetJoystickButtons(GLFW_JOYSTICK_1, &buttons_count);
+ MAP_BUTTON(ImGuiNavInput_Activate, 0); // Cross / A
+ MAP_BUTTON(ImGuiNavInput_Cancel, 1); // Circle / B
+ MAP_BUTTON(ImGuiNavInput_Menu, 2); // Square / X
+ MAP_BUTTON(ImGuiNavInput_Input, 3); // Triangle / Y
+ MAP_BUTTON(ImGuiNavInput_DpadLeft, 13); // D-Pad Left
+ MAP_BUTTON(ImGuiNavInput_DpadRight, 11); // D-Pad Right
+ MAP_BUTTON(ImGuiNavInput_DpadUp, 10); // D-Pad Up
+ MAP_BUTTON(ImGuiNavInput_DpadDown, 12); // D-Pad Down
+ MAP_BUTTON(ImGuiNavInput_FocusPrev, 4); // L1 / LB
+ MAP_BUTTON(ImGuiNavInput_FocusNext, 5); // R1 / RB
+ MAP_BUTTON(ImGuiNavInput_TweakSlow, 4); // L1 / LB
+ MAP_BUTTON(ImGuiNavInput_TweakFast, 5); // R1 / RB
+ MAP_ANALOG(ImGuiNavInput_LStickLeft, 0, -0.3f, -0.9f);
+ MAP_ANALOG(ImGuiNavInput_LStickRight,0, +0.3f, +0.9f);
+ MAP_ANALOG(ImGuiNavInput_LStickUp, 1, +0.3f, +0.9f);
+ MAP_ANALOG(ImGuiNavInput_LStickDown, 1, -0.3f, -0.9f);
+ #undef MAP_BUTTON
+ #undef MAP_ANALOG
+ if (axes_count > 0 && buttons_count > 0)
+ io.BackendFlags |= ImGuiBackendFlags_HasGamepad;
+ else
+ io.BackendFlags &= ~ImGuiBackendFlags_HasGamepad;
+ }
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_glfw.h b/3rdparty/imgui/examples/imgui_impl_glfw.h
new file mode 100644
index 00000000..a9bab99d
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_glfw.h
@@ -0,0 +1,32 @@
+// dear imgui: Platform Binding for GLFW
+// This needs to be used along with a Renderer (e.g. OpenGL3, Vulkan..)
+// (Info: GLFW is a cross-platform general purpose library for handling windows, inputs, OpenGL/Vulkan graphics context creation, etc.)
+
+// Implemented features:
+// [X] Platform: Clipboard support.
+// [X] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
+// [x] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: 3 cursors types are missing from GLFW.
+// [X] Platform: Keyboard arrays indexed using GLFW_KEY_* codes, e.g. ImGui::IsKeyPressed(GLFW_KEY_SPACE).
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// About GLSL version:
+// The 'glsl_version' initialization parameter defaults to "#version 150" if NULL.
+// Only override if your GL version doesn't handle this GLSL version. Keep NULL if unsure!
+
+struct GLFWwindow;
+
+IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForOpenGL(GLFWwindow* window, bool install_callbacks);
+IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool install_callbacks);
+IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();
+
+// GLFW callbacks (installed by default if you enable 'install_callbacks' during initialization)
+// Provided here if you want to chain callbacks.
+// You can also handle inputs yourself and use those as a reference.
+IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
+IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
+IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);
+IMGUI_IMPL_API void ImGui_ImplGlfw_CharCallback(GLFWwindow* window, unsigned int c);
diff --git a/3rdparty/imgui/examples/imgui_impl_marmalade.cpp b/3rdparty/imgui/examples/imgui_impl_marmalade.cpp
new file mode 100644
index 00000000..d3aa6983
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_marmalade.cpp
@@ -0,0 +1,308 @@
+// dear imgui: Renderer + Platform Binding for Marmalade + IwGx
+// Marmalade code: Copyright (C) 2015 by Giovanni Zito (this file is part of Dear ImGui)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_Marmalade_RenderDrawData() in the .h file so you can call it yourself.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
+
+#include "imgui.h"
+#include "imgui_impl_marmalade.h"
+
+#include
+#include
+#include
+#include
+#include
+
+// Data
+static double g_Time = 0.0f;
+static bool g_MousePressed[3] = { false, false, false };
+static CIwTexture* g_FontTexture = NULL;
+static char* g_ClipboardText = NULL;
+static bool g_osdKeyboardEnabled = false;
+
+// use this setting to scale the interface - e.g. on device you could use 2 or 3 scale factor
+static ImVec2 g_RenderScale = ImVec2(1.0f,1.0f);
+
+// Render function.
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_Marmalade_RenderDrawData(ImDrawData* draw_data)
+{
+ // Handle cases of screen coordinates != from framebuffer coordinates (e.g. retina displays)
+ ImGuiIO& io = ImGui::GetIO();
+ draw_data->ScaleClipRects(io.DisplayFramebufferScale);
+
+ // Render command lists
+ for(int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data;
+ const int nVert = cmd_list->VtxBuffer.Size;
+ CIwFVec2* pVertStream = IW_GX_ALLOC(CIwFVec2, nVert);
+ CIwFVec2* pUVStream = IW_GX_ALLOC(CIwFVec2, nVert);
+ CIwColour* pColStream = IW_GX_ALLOC(CIwColour, nVert);
+
+ for( int i=0; i < nVert; i++ )
+ {
+ // TODO: optimize multiplication on gpu using vertex shader/projection matrix.
+ pVertStream[i].x = cmd_list->VtxBuffer[i].pos.x * g_RenderScale.x;
+ pVertStream[i].y = cmd_list->VtxBuffer[i].pos.y * g_RenderScale.y;
+ pUVStream[i].x = cmd_list->VtxBuffer[i].uv.x;
+ pUVStream[i].y = cmd_list->VtxBuffer[i].uv.y;
+ pColStream[i] = cmd_list->VtxBuffer[i].col;
+ }
+
+ IwGxSetVertStreamScreenSpace(pVertStream, nVert);
+ IwGxSetUVStream(pUVStream);
+ IwGxSetColStream(pColStream, nVert);
+ IwGxSetNormStream(0);
+
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ CIwMaterial* pCurrentMaterial = IW_GX_ALLOC_MATERIAL();
+ pCurrentMaterial->SetShadeMode(CIwMaterial::SHADE_FLAT);
+ pCurrentMaterial->SetCullMode(CIwMaterial::CULL_NONE);
+ pCurrentMaterial->SetFiltering(false);
+ pCurrentMaterial->SetAlphaMode(CIwMaterial::ALPHA_BLEND);
+ pCurrentMaterial->SetDepthWriteMode(CIwMaterial::DEPTH_WRITE_NORMAL);
+ pCurrentMaterial->SetAlphaTestMode(CIwMaterial::ALPHATEST_DISABLED);
+ pCurrentMaterial->SetTexture((CIwTexture*)pcmd->TextureId);
+ IwGxSetMaterial(pCurrentMaterial);
+ IwGxDrawPrims(IW_GX_TRI_LIST, (uint16*)idx_buffer, pcmd->ElemCount);
+ }
+ idx_buffer += pcmd->ElemCount;
+ }
+ IwGxFlush();
+ }
+
+ // TODO: restore modified state (i.e. mvp matrix)
+}
+
+static const char* ImGui_Marmalade_GetClipboardText(void* /*user_data*/)
+{
+ if (!s3eClipboardAvailable())
+ return NULL;
+
+ if (int size = s3eClipboardGetText(NULL, 0))
+ {
+ if (g_ClipboardText)
+ delete[] g_ClipboardText;
+ g_ClipboardText = new char[size];
+ g_ClipboardText[0] = '\0';
+ s3eClipboardGetText(g_ClipboardText, size);
+ }
+
+ return g_ClipboardText;
+}
+
+static void ImGui_Marmalade_SetClipboardText(void* /*user_data*/, const char* text)
+{
+ if (s3eClipboardAvailable())
+ s3eClipboardSetText(text);
+}
+
+int32 ImGui_Marmalade_PointerButtonEventCallback(void* system_data, void* user_data)
+{
+ // pEvent->m_Button is of type s3ePointerButton and indicates which mouse
+ // button was pressed. For touchscreen this should always have the value
+ // S3E_POINTER_BUTTON_SELECT
+ s3ePointerEvent* pEvent = (s3ePointerEvent*)system_data;
+
+ if (pEvent->m_Pressed == 1)
+ {
+ if (pEvent->m_Button == S3E_POINTER_BUTTON_LEFTMOUSE)
+ g_MousePressed[0] = true;
+ if (pEvent->m_Button == S3E_POINTER_BUTTON_RIGHTMOUSE)
+ g_MousePressed[1] = true;
+ if (pEvent->m_Button == S3E_POINTER_BUTTON_MIDDLEMOUSE)
+ g_MousePressed[2] = true;
+ if (pEvent->m_Button == S3E_POINTER_BUTTON_MOUSEWHEELUP)
+ io.MouseWheel += pEvent->m_y;
+ if (pEvent->m_Button == S3E_POINTER_BUTTON_MOUSEWHEELDOWN)
+ io.MouseWheel += pEvent->m_y;
+ }
+
+ return 0;
+}
+
+int32 ImGui_Marmalade_KeyCallback(void* system_data, void* user_data)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ s3eKeyboardEvent* e = (s3eKeyboardEvent*)system_data;
+ if (e->m_Pressed == 1)
+ io.KeysDown[e->m_Key] = true;
+ if (e->m_Pressed == 0)
+ io.KeysDown[e->m_Key] = false;
+
+ io.KeyCtrl = s3eKeyboardGetState(s3eKeyLeftControl) == S3E_KEY_STATE_DOWN || s3eKeyboardGetState(s3eKeyRightControl) == S3E_KEY_STATE_DOWN;
+ io.KeyShift = s3eKeyboardGetState(s3eKeyLeftShift) == S3E_KEY_STATE_DOWN || s3eKeyboardGetState(s3eKeyRightShift) == S3E_KEY_STATE_DOWN;
+ io.KeyAlt = s3eKeyboardGetState(s3eKeyLeftAlt) == S3E_KEY_STATE_DOWN || s3eKeyboardGetState(s3eKeyRightAlt) == S3E_KEY_STATE_DOWN;
+ io.KeySuper = s3eKeyboardGetState(s3eKeyLeftWindows) == S3E_KEY_STATE_DOWN || s3eKeyboardGetState(s3eKeyRightWindows) == S3E_KEY_STATE_DOWN;
+
+ return 0;
+}
+
+int32 ImGui_Marmalade_CharCallback(void* system_data, void* user_data)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ s3eKeyboardCharEvent* e = (s3eKeyboardCharEvent*)system_data;
+ if ((e->m_Char > 0 && e->m_Char < 0x10000))
+ io.AddInputCharacter((unsigned short)e->m_Char);
+
+ return 0;
+}
+
+bool ImGui_Marmalade_CreateDeviceObjects()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+
+ // Upload texture to graphics system
+ g_FontTexture = new CIwTexture();
+ g_FontTexture->SetModifiable(true);
+ CIwImage& image = g_FontTexture->GetImage();
+ image.SetFormat(CIwImage::ARGB_8888);
+ image.SetWidth(width);
+ image.SetHeight(height);
+ image.SetBuffers(); // allocates and own buffers
+ image.ReadTexels(pixels);
+ g_FontTexture->SetMipMapping(false);
+ g_FontTexture->SetFiltering(false);
+ g_FontTexture->Upload();
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)g_FontTexture;
+
+ return true;
+}
+
+void ImGui_Marmalade_InvalidateDeviceObjects()
+{
+ if (g_ClipboardText)
+ {
+ delete[] g_ClipboardText;
+ g_ClipboardText = NULL;
+ }
+
+ if (g_FontTexture)
+ {
+ delete g_FontTexture;
+ ImGui::GetIO().Fonts->TexID = 0;
+ g_FontTexture = NULL;
+ }
+}
+
+bool ImGui_Marmalade_Init(bool install_callbacks)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ io.KeyMap[ImGuiKey_Tab] = s3eKeyTab; // Keyboard mapping. ImGui will use those indices to peek into the io.KeysDown[] array.
+ io.KeyMap[ImGuiKey_LeftArrow] = s3eKeyLeft;
+ io.KeyMap[ImGuiKey_RightArrow] = s3eKeyRight;
+ io.KeyMap[ImGuiKey_UpArrow] = s3eKeyUp;
+ io.KeyMap[ImGuiKey_DownArrow] = s3eKeyDown;
+ io.KeyMap[ImGuiKey_PageUp] = s3eKeyPageUp;
+ io.KeyMap[ImGuiKey_PageDown] = s3eKeyPageDown;
+ io.KeyMap[ImGuiKey_Home] = s3eKeyHome;
+ io.KeyMap[ImGuiKey_End] = s3eKeyEnd;
+ io.KeyMap[ImGuiKey_Insert] = s3eKeyInsert;
+ io.KeyMap[ImGuiKey_Delete] = s3eKeyDelete;
+ io.KeyMap[ImGuiKey_Backspace] = s3eKeyBackspace;
+ io.KeyMap[ImGuiKey_Space] = s3eKeySpace;
+ io.KeyMap[ImGuiKey_Enter] = s3eKeyEnter;
+ io.KeyMap[ImGuiKey_Escape] = s3eKeyEsc;
+ io.KeyMap[ImGuiKey_A] = s3eKeyA;
+ io.KeyMap[ImGuiKey_C] = s3eKeyC;
+ io.KeyMap[ImGuiKey_V] = s3eKeyV;
+ io.KeyMap[ImGuiKey_X] = s3eKeyX;
+ io.KeyMap[ImGuiKey_Y] = s3eKeyY;
+ io.KeyMap[ImGuiKey_Z] = s3eKeyZ;
+
+ io.SetClipboardTextFn = ImGui_Marmalade_SetClipboardText;
+ io.GetClipboardTextFn = ImGui_Marmalade_GetClipboardText;
+
+ if (install_callbacks)
+ {
+ s3ePointerRegister(S3E_POINTER_BUTTON_EVENT, ImGui_Marmalade_PointerButtonEventCallback, 0);
+ s3eKeyboardRegister(S3E_KEYBOARD_KEY_EVENT, ImGui_Marmalade_KeyCallback, 0);
+ s3eKeyboardRegister(S3E_KEYBOARD_CHAR_EVENT, ImGui_Marmalade_CharCallback, 0);
+ }
+
+ return true;
+}
+
+void ImGui_Marmalade_Shutdown()
+{
+ ImGui_Marmalade_InvalidateDeviceObjects();
+}
+
+void ImGui_Marmalade_NewFrame()
+{
+ if (!g_FontTexture)
+ ImGui_Marmalade_CreateDeviceObjects();
+
+ ImGuiIO& io = ImGui::GetIO();
+
+ // Setup display size (every frame to accommodate for window resizing)
+ int w = IwGxGetScreenWidth(), h = IwGxGetScreenHeight();
+ io.DisplaySize = ImVec2((float)w, (float)h);
+ // For retina display or other situations where window coordinates are different from framebuffer coordinates. User storage only, presently not used by ImGui.
+ io.DisplayFramebufferScale = g_scale;
+
+ // Setup time step
+ double current_time = s3eTimerGetUST() / 1000.0f;
+ io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f/60.0f);
+ g_Time = current_time;
+
+ double mouse_x, mouse_y;
+ mouse_x = s3ePointerGetX();
+ mouse_y = s3ePointerGetY();
+ io.MousePos = ImVec2((float)mouse_x/g_scale.x, (float)mouse_y/g_scale.y); // Mouse position (set to -FLT_MAX,-FLT_MAX if no mouse / on another screen, etc.)
+
+ for (int i = 0; i < 3; i++)
+ {
+ io.MouseDown[i] = g_MousePressed[i] || s3ePointerGetState((s3ePointerButton)i) != S3E_POINTER_STATE_UP; // If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
+ g_MousePressed[i] = false;
+ }
+
+ // TODO: Hide OS mouse cursor if ImGui is drawing it
+ // s3ePointerSetInt(S3E_POINTER_HIDE_CURSOR,(io.MouseDrawCursor ? 0 : 1));
+
+ // Show/hide OSD keyboard
+ if (io.WantTextInput)
+ {
+ // Some text input widget is active?
+ if (!g_osdKeyboardEnabled)
+ {
+ g_osdKeyboardEnabled = true;
+ s3eKeyboardSetInt(S3E_KEYBOARD_GET_CHAR, 1); // show OSD keyboard
+ }
+ }
+ else
+ {
+ // No text input widget is active
+ if (g_osdKeyboardEnabled)
+ {
+ g_osdKeyboardEnabled = false;
+ s3eKeyboardSetInt(S3E_KEYBOARD_GET_CHAR, 0); // hide OSD keyboard
+ }
+ }
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_marmalade.h b/3rdparty/imgui/examples/imgui_impl_marmalade.h
new file mode 100644
index 00000000..96c43337
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_marmalade.h
@@ -0,0 +1,24 @@
+// dear imgui: Renderer + Platform Binding for Marmalade + IwGx
+// Marmalade code: Copyright (C) 2015 by Giovanni Zito (this file is part of Dear ImGui)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'CIwTexture*' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+IMGUI_IMPL_API bool ImGui_Marmalade_Init(bool install_callbacks);
+IMGUI_IMPL_API void ImGui_Marmalade_Shutdown();
+IMGUI_IMPL_API void ImGui_Marmalade_NewFrame();
+IMGUI_IMPL_API void ImGui_Marmalade_RenderDrawData(ImDrawData* draw_data);
+
+// Use if you want to reset your rendering device without losing ImGui state.
+IMGUI_IMPL_API void ImGui_Marmalade_InvalidateDeviceObjects();
+IMGUI_IMPL_API bool ImGui_Marmalade_CreateDeviceObjects();
+
+// Callbacks (installed by default if you enable 'install_callbacks' during initialization)
+// You can also handle inputs yourself and use those as a reference.
+IMGUI_IMPL_API int32 ImGui_Marmalade_PointerButtonEventCallback(void* system_data, void* user_data);
+IMGUI_IMPL_API int32 ImGui_Marmalade_KeyCallback(void* system_data, void* user_data);
+IMGUI_IMPL_API int32 ImGui_Marmalade_CharCallback(void* system_data, void* user_data);
diff --git a/3rdparty/imgui/examples/imgui_impl_metal.h b/3rdparty/imgui/examples/imgui_impl_metal.h
new file mode 100644
index 00000000..f6846851
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_metal.h
@@ -0,0 +1,25 @@
+// dear imgui: Renderer for Metal
+// This needs to be used along with a Platform Binding (e.g. OSX)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+@class MTLRenderPassDescriptor;
+@protocol MTLDevice, MTLCommandBuffer, MTLRenderCommandEncoder;
+
+IMGUI_IMPL_API bool ImGui_ImplMetal_Init(id device);
+IMGUI_IMPL_API void ImGui_ImplMetal_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor *renderPassDescriptor);
+IMGUI_IMPL_API void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data,
+ id commandBuffer,
+ id commandEncoder);
+
+// Called by Init/NewFrame/Shutdown
+IMGUI_IMPL_API bool ImGui_ImplMetal_CreateFontsTexture(id device);
+IMGUI_IMPL_API void ImGui_ImplMetal_DestroyFontsTexture();
+IMGUI_IMPL_API bool ImGui_ImplMetal_CreateDeviceObjects(id device);
+IMGUI_IMPL_API void ImGui_ImplMetal_DestroyDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_metal.mm b/3rdparty/imgui/examples/imgui_impl_metal.mm
new file mode 100644
index 00000000..fc6254c0
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_metal.mm
@@ -0,0 +1,517 @@
+// dear imgui: Renderer for Metal
+// This needs to be used along with a Platform Binding (e.g. OSX)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'MTLTexture' as ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-07-05: Metal: Added new Metal backend implementation.
+
+#include "imgui.h"
+#include "imgui_impl_metal.h"
+
+#import
+#import
+#import
+
+#pragma mark - Support classes
+
+// A wrapper around a MTLBuffer object that knows the last time it was reused
+@interface MetalBuffer : NSObject
+@property (nonatomic, strong) id buffer;
+@property (nonatomic, assign) NSTimeInterval lastReuseTime;
+- (instancetype)initWithBuffer:(id)buffer;
+@end
+
+// An object that encapsulates the data necessary to uniquely identify a
+// render pipeline state. These are used as cache keys.
+@interface FramebufferDescriptor : NSObject
+@property (nonatomic, assign) unsigned long sampleCount;
+@property (nonatomic, assign) MTLPixelFormat colorPixelFormat;
+@property (nonatomic, assign) MTLPixelFormat depthPixelFormat;
+@property (nonatomic, assign) MTLPixelFormat stencilPixelFormat;
+- (instancetype)initWithRenderPassDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor;
+@end
+
+// A singleton that stores long-lived objects that are needed by the Metal
+// renderer backend. Stores the render pipeline state cache and the default
+// font texture, and manages the reusable buffer cache.
+@interface MetalContext : NSObject
+@property (nonatomic, strong) id depthStencilState;
+@property (nonatomic, strong) FramebufferDescriptor *framebufferDescriptor; // framebuffer descriptor for current frame; transient
+@property (nonatomic, strong) NSMutableDictionary *renderPipelineStateCache; // pipeline cache; keyed on framebuffer descriptors
+@property (nonatomic, strong, nullable) id fontTexture;
+@property (nonatomic, strong) NSMutableArray *bufferCache;
+@property (nonatomic, assign) NSTimeInterval lastBufferCachePurge;
+- (void)makeDeviceObjectsWithDevice:(id)device;
+- (void)makeFontTextureWithDevice:(id)device;
+- (MetalBuffer *)dequeueReusableBufferOfLength:(NSUInteger)length device:(id)device;
+- (void)enqueueReusableBuffer:(MetalBuffer *)buffer;
+- (id)renderPipelineStateForFrameAndDevice:(id)device;
+- (void)emptyRenderPipelineStateCache;
+- (void)renderDrawData:(ImDrawData *)drawData
+ commandBuffer:(id)commandBuffer
+ commandEncoder:(id)commandEncoder;
+@end
+
+static MetalContext *g_sharedMetalContext = nil;
+
+#pragma mark - ImGui API implementation
+
+bool ImGui_ImplMetal_Init(id device)
+{
+ static dispatch_once_t onceToken;
+ dispatch_once(&onceToken, ^{
+ g_sharedMetalContext = [[MetalContext alloc] init];
+ });
+
+ ImGui_ImplMetal_CreateDeviceObjects(device);
+
+ return true;
+}
+
+void ImGui_ImplMetal_Shutdown()
+{
+ ImGui_ImplMetal_DestroyDeviceObjects();
+}
+
+void ImGui_ImplMetal_NewFrame(MTLRenderPassDescriptor *renderPassDescriptor)
+{
+ IM_ASSERT(g_sharedMetalContext != nil && "No Metal context. Did you call ImGui_ImplMetal_Init?");
+
+ g_sharedMetalContext.framebufferDescriptor = [[FramebufferDescriptor alloc] initWithRenderPassDescriptor:renderPassDescriptor];
+}
+
+// Metal Render function.
+void ImGui_ImplMetal_RenderDrawData(ImDrawData* draw_data, id commandBuffer, id commandEncoder)
+{
+ [g_sharedMetalContext renderDrawData:draw_data commandBuffer:commandBuffer commandEncoder:commandEncoder];
+}
+
+bool ImGui_ImplMetal_CreateFontsTexture(id device)
+{
+ [g_sharedMetalContext makeFontTextureWithDevice:device];
+
+ ImGuiIO& io = ImGui::GetIO();
+ io.Fonts->TexID = (__bridge void *)g_sharedMetalContext.fontTexture; // ImTextureID == void*
+
+ return (g_sharedMetalContext.fontTexture != nil);
+}
+
+void ImGui_ImplMetal_DestroyFontsTexture()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ g_sharedMetalContext.fontTexture = nil;
+ io.Fonts->TexID = nullptr;
+}
+
+bool ImGui_ImplMetal_CreateDeviceObjects(id device)
+{
+ [g_sharedMetalContext makeDeviceObjectsWithDevice:device];
+
+ ImGui_ImplMetal_CreateFontsTexture(device);
+
+ return true;
+}
+
+void ImGui_ImplMetal_DestroyDeviceObjects()
+{
+ ImGui_ImplMetal_DestroyFontsTexture();
+ [g_sharedMetalContext emptyRenderPipelineStateCache];
+}
+
+#pragma mark - MetalBuffer implementation
+
+@implementation MetalBuffer
+- (instancetype)initWithBuffer:(id)buffer
+{
+ if ((self = [super init]))
+ {
+ _buffer = buffer;
+ _lastReuseTime = [NSDate date].timeIntervalSince1970;
+ }
+ return self;
+}
+@end
+
+#pragma mark - FramebufferDescriptor implementation
+
+@implementation FramebufferDescriptor
+- (instancetype)initWithRenderPassDescriptor:(MTLRenderPassDescriptor *)renderPassDescriptor
+{
+ if ((self = [super init]))
+ {
+ _sampleCount = renderPassDescriptor.colorAttachments[0].texture.sampleCount;
+ _colorPixelFormat = renderPassDescriptor.colorAttachments[0].texture.pixelFormat;
+ _depthPixelFormat = renderPassDescriptor.depthAttachment.texture.pixelFormat;
+ _stencilPixelFormat = renderPassDescriptor.stencilAttachment.texture.pixelFormat;
+ }
+ return self;
+}
+
+- (nonnull id)copyWithZone:(nullable NSZone *)zone
+{
+ FramebufferDescriptor *copy = [[FramebufferDescriptor allocWithZone:zone] init];
+ copy.sampleCount = self.sampleCount;
+ copy.colorPixelFormat = self.colorPixelFormat;
+ copy.depthPixelFormat = self.depthPixelFormat;
+ copy.stencilPixelFormat = self.stencilPixelFormat;
+ return copy;
+}
+
+- (NSUInteger)hash
+{
+ NSUInteger sc = _sampleCount & 0x3;
+ NSUInteger cf = _colorPixelFormat & 0x3FF;
+ NSUInteger df = _depthPixelFormat & 0x3FF;
+ NSUInteger sf = _stencilPixelFormat & 0x3FF;
+ NSUInteger hash = (sf << 22) | (df << 12) | (cf << 2) | sc;
+ return hash;
+}
+
+- (BOOL)isEqual:(id)object
+{
+ FramebufferDescriptor *other = object;
+ if (![other isKindOfClass:[FramebufferDescriptor class]])
+ return NO;
+ return other.sampleCount == self.sampleCount &&
+ other.colorPixelFormat == self.colorPixelFormat &&
+ other.depthPixelFormat == self.depthPixelFormat &&
+ other.stencilPixelFormat == self.stencilPixelFormat;
+}
+
+@end
+
+#pragma mark - MetalContext implementation
+
+@implementation MetalContext
+- (instancetype)init {
+ if ((self = [super init]))
+ {
+ _renderPipelineStateCache = [NSMutableDictionary dictionary];
+ _bufferCache = [NSMutableArray array];
+ _lastBufferCachePurge = [NSDate date].timeIntervalSince1970;
+ }
+ return self;
+}
+
+- (void)makeDeviceObjectsWithDevice:(id)device
+{
+ MTLDepthStencilDescriptor *depthStencilDescriptor = [[MTLDepthStencilDescriptor alloc] init];
+ depthStencilDescriptor.depthWriteEnabled = NO;
+ depthStencilDescriptor.depthCompareFunction = MTLCompareFunctionAlways;
+ self.depthStencilState = [device newDepthStencilStateWithDescriptor:depthStencilDescriptor];
+}
+
+// We are retrieving and uploading the font atlas as a 4-channels RGBA texture here.
+// In theory we could call GetTexDataAsAlpha8() and upload a 1-channel texture to save on memory access bandwidth.
+// However, using a shader designed for 1-channel texture would make it less obvious to use the ImTextureID facility to render users own textures.
+// You can make that change in your implementation.
+- (void)makeFontTextureWithDevice:(id)device
+{
+ ImGuiIO &io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+ MTLTextureDescriptor *textureDescriptor = [MTLTextureDescriptor texture2DDescriptorWithPixelFormat:MTLPixelFormatRGBA8Unorm
+ width:width
+ height:height
+ mipmapped:NO];
+ textureDescriptor.usage = MTLTextureUsageShaderRead;
+#if TARGET_OS_OSX
+ textureDescriptor.storageMode = MTLStorageModeManaged;
+#else
+ textureDescriptor.storageMode = MTLStorageModeShared;
+#endif
+ id texture = [device newTextureWithDescriptor:textureDescriptor];
+ [texture replaceRegion:MTLRegionMake2D(0, 0, width, height) mipmapLevel:0 withBytes:pixels bytesPerRow:width * 4];
+ self.fontTexture = texture;
+}
+
+- (MetalBuffer *)dequeueReusableBufferOfLength:(NSUInteger)length device:(id)device
+{
+ NSTimeInterval now = [NSDate date].timeIntervalSince1970;
+
+ // Purge old buffers that haven't been useful for a while
+ if (now - self.lastBufferCachePurge > 1.0)
+ {
+ NSMutableArray *survivors = [NSMutableArray array];
+ for (MetalBuffer *candidate in self.bufferCache)
+ {
+ if (candidate.lastReuseTime > self.lastBufferCachePurge)
+ {
+ [survivors addObject:candidate];
+ }
+ }
+ self.bufferCache = [survivors mutableCopy];
+ self.lastBufferCachePurge = now;
+ }
+
+ // See if we have a buffer we can reuse
+ MetalBuffer *bestCandidate = nil;
+ for (MetalBuffer *candidate in self.bufferCache)
+ if (candidate.buffer.length >= length && (bestCandidate == nil || bestCandidate.lastReuseTime > candidate.lastReuseTime))
+ bestCandidate = candidate;
+
+ if (bestCandidate != nil)
+ {
+ [self.bufferCache removeObject:bestCandidate];
+ bestCandidate.lastReuseTime = now;
+ return bestCandidate;
+ }
+
+ // No luck; make a new buffer
+ id backing = [device newBufferWithLength:length options:MTLResourceStorageModeShared];
+ return [[MetalBuffer alloc] initWithBuffer:backing];
+}
+
+- (void)enqueueReusableBuffer:(MetalBuffer *)buffer
+{
+ [self.bufferCache addObject:buffer];
+}
+
+- (_Nullable id)renderPipelineStateForFrameAndDevice:(id)device
+{
+ // Try to retrieve a render pipeline state that is compatible with the framebuffer config for this frame
+ // Thie hit rate for this cache should be very near 100%.
+ id renderPipelineState = self.renderPipelineStateCache[self.framebufferDescriptor];
+
+ if (renderPipelineState == nil)
+ {
+ // No luck; make a new render pipeline state
+ renderPipelineState = [self _renderPipelineStateForFramebufferDescriptor:self.framebufferDescriptor device:device];
+ // Cache render pipeline state for later reuse
+ self.renderPipelineStateCache[self.framebufferDescriptor] = renderPipelineState;
+ }
+
+ return renderPipelineState;
+}
+
+- (id)_renderPipelineStateForFramebufferDescriptor:(FramebufferDescriptor *)descriptor device:(id)device
+{
+ NSError *error = nil;
+
+ NSString *shaderSource = @""
+ "#include \n"
+ "using namespace metal;\n"
+ "\n"
+ "struct Uniforms {\n"
+ " float4x4 projectionMatrix;\n"
+ "};\n"
+ "\n"
+ "struct VertexIn {\n"
+ " float2 position [[attribute(0)]];\n"
+ " float2 texCoords [[attribute(1)]];\n"
+ " uchar4 color [[attribute(2)]];\n"
+ "};\n"
+ "\n"
+ "struct VertexOut {\n"
+ " float4 position [[position]];\n"
+ " float2 texCoords;\n"
+ " float4 color;\n"
+ "};\n"
+ "\n"
+ "vertex VertexOut vertex_main(VertexIn in [[stage_in]],\n"
+ " constant Uniforms &uniforms [[buffer(1)]]) {\n"
+ " VertexOut out;\n"
+ " out.position = uniforms.projectionMatrix * float4(in.position, 0, 1);\n"
+ " out.texCoords = in.texCoords;\n"
+ " out.color = float4(in.color) / float4(255.0);\n"
+ " return out;\n"
+ "}\n"
+ "\n"
+ "fragment half4 fragment_main(VertexOut in [[stage_in]],\n"
+ " texture2d texture [[texture(0)]]) {\n"
+ " constexpr sampler linearSampler(coord::normalized, min_filter::linear, mag_filter::linear, mip_filter::linear);\n"
+ " half4 texColor = texture.sample(linearSampler, in.texCoords);\n"
+ " return half4(in.color) * texColor;\n"
+ "}\n";
+
+ id library = [device newLibraryWithSource:shaderSource options:nil error:&error];
+ if (library == nil)
+ {
+ NSLog(@"Error: failed to create Metal library: %@", error);
+ return nil;
+ }
+
+ id vertexFunction = [library newFunctionWithName:@"vertex_main"];
+ id fragmentFunction = [library newFunctionWithName:@"fragment_main"];
+
+ if (vertexFunction == nil || fragmentFunction == nil)
+ {
+ NSLog(@"Error: failed to find Metal shader functions in library: %@", error);
+ return nil;
+ }
+
+ MTLVertexDescriptor *vertexDescriptor = [MTLVertexDescriptor vertexDescriptor];
+ vertexDescriptor.attributes[0].offset = IM_OFFSETOF(ImDrawVert, pos);
+ vertexDescriptor.attributes[0].format = MTLVertexFormatFloat2; // position
+ vertexDescriptor.attributes[0].bufferIndex = 0;
+ vertexDescriptor.attributes[1].offset = IM_OFFSETOF(ImDrawVert, uv);
+ vertexDescriptor.attributes[1].format = MTLVertexFormatFloat2; // texCoords
+ vertexDescriptor.attributes[1].bufferIndex = 0;
+ vertexDescriptor.attributes[2].offset = IM_OFFSETOF(ImDrawVert, col);
+ vertexDescriptor.attributes[2].format = MTLVertexFormatUChar4; // color
+ vertexDescriptor.attributes[2].bufferIndex = 0;
+ vertexDescriptor.layouts[0].stepRate = 1;
+ vertexDescriptor.layouts[0].stepFunction = MTLVertexStepFunctionPerVertex;
+ vertexDescriptor.layouts[0].stride = sizeof(ImDrawVert);
+
+ MTLRenderPipelineDescriptor *pipelineDescriptor = [[MTLRenderPipelineDescriptor alloc] init];
+ pipelineDescriptor.vertexFunction = vertexFunction;
+ pipelineDescriptor.fragmentFunction = fragmentFunction;
+ pipelineDescriptor.vertexDescriptor = vertexDescriptor;
+ pipelineDescriptor.sampleCount = self.framebufferDescriptor.sampleCount;
+ pipelineDescriptor.colorAttachments[0].pixelFormat = self.framebufferDescriptor.colorPixelFormat;
+ pipelineDescriptor.colorAttachments[0].blendingEnabled = YES;
+ pipelineDescriptor.colorAttachments[0].rgbBlendOperation = MTLBlendOperationAdd;
+ pipelineDescriptor.colorAttachments[0].alphaBlendOperation = MTLBlendOperationAdd;
+ pipelineDescriptor.colorAttachments[0].sourceRGBBlendFactor = MTLBlendFactorSourceAlpha;
+ pipelineDescriptor.colorAttachments[0].sourceAlphaBlendFactor = MTLBlendFactorSourceAlpha;
+ pipelineDescriptor.colorAttachments[0].destinationRGBBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
+ pipelineDescriptor.colorAttachments[0].destinationAlphaBlendFactor = MTLBlendFactorOneMinusSourceAlpha;
+ pipelineDescriptor.depthAttachmentPixelFormat = self.framebufferDescriptor.depthPixelFormat;
+ pipelineDescriptor.stencilAttachmentPixelFormat = self.framebufferDescriptor.stencilPixelFormat;
+
+ id renderPipelineState = [device newRenderPipelineStateWithDescriptor:pipelineDescriptor error:&error];
+ if (error != nil)
+ {
+ NSLog(@"Error: failed to create Metal pipeline state: %@", error);
+ }
+
+ return renderPipelineState;
+}
+
+- (void)emptyRenderPipelineStateCache
+{
+ [self.renderPipelineStateCache removeAllObjects];
+}
+
+- (void)renderDrawData:(ImDrawData *)drawData
+ commandBuffer:(id)commandBuffer
+ commandEncoder:(id)commandEncoder
+{
+ // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
+ ImGuiIO &io = ImGui::GetIO();
+ int fb_width = (int)(drawData->DisplaySize.x * io.DisplayFramebufferScale.x);
+ int fb_height = (int)(drawData->DisplaySize.y * io.DisplayFramebufferScale.y);
+ if (fb_width <= 0 || fb_height <= 0 || drawData->CmdListsCount == 0)
+ return;
+ drawData->ScaleClipRects(io.DisplayFramebufferScale);
+
+ [commandEncoder setCullMode:MTLCullModeNone];
+ [commandEncoder setDepthStencilState:g_sharedMetalContext.depthStencilState];
+
+ // Setup viewport, orthographic projection matrix
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to
+ // draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps.
+ MTLViewport viewport =
+ {
+ .originX = 0.0,
+ .originY = 0.0,
+ .width = double(fb_width),
+ .height = double(fb_height),
+ .znear = 0.0,
+ .zfar = 1.0
+ };
+ [commandEncoder setViewport:viewport];
+ float L = drawData->DisplayPos.x;
+ float R = drawData->DisplayPos.x + drawData->DisplaySize.x;
+ float T = drawData->DisplayPos.y;
+ float B = drawData->DisplayPos.y + drawData->DisplaySize.y;
+ float N = viewport.znear;
+ float F = viewport.zfar;
+ const float ortho_projection[4][4] =
+ {
+ { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
+ { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
+ { 0.0f, 0.0f, 1/(F-N), 0.0f },
+ { (R+L)/(L-R), (T+B)/(B-T), N/(F-N), 1.0f },
+ };
+
+ [commandEncoder setVertexBytes:&ortho_projection length:sizeof(ortho_projection) atIndex:1];
+
+ size_t vertexBufferLength = 0;
+ size_t indexBufferLength = 0;
+ for (int n = 0; n < drawData->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = drawData->CmdLists[n];
+ vertexBufferLength += cmd_list->VtxBuffer.Size * sizeof(ImDrawVert);
+ indexBufferLength += cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx);
+ }
+
+ MetalBuffer *vertexBuffer = [self dequeueReusableBufferOfLength:vertexBufferLength device:commandBuffer.device];
+ MetalBuffer *indexBuffer = [self dequeueReusableBufferOfLength:indexBufferLength device:commandBuffer.device];
+
+ id renderPipelineState = [self renderPipelineStateForFrameAndDevice:commandBuffer.device];
+ [commandEncoder setRenderPipelineState:renderPipelineState];
+
+ [commandEncoder setVertexBuffer:vertexBuffer.buffer offset:0 atIndex:0];
+
+ size_t vertexBufferOffset = 0;
+ size_t indexBufferOffset = 0;
+ ImVec2 pos = drawData->DisplayPos;
+ for (int n = 0; n < drawData->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = drawData->CmdLists[n];
+ ImDrawIdx idx_buffer_offset = 0;
+
+ memcpy((char *)vertexBuffer.buffer.contents + vertexBufferOffset, cmd_list->VtxBuffer.Data, cmd_list->VtxBuffer.Size * sizeof(ImDrawVert));
+ memcpy((char *)indexBuffer.buffer.contents + indexBufferOffset, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
+
+ [commandEncoder setVertexBufferOffset:vertexBufferOffset atIndex:0];
+
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ // User callback (registered via ImDrawList::AddCallback)
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ ImVec4 clip_rect = ImVec4(pcmd->ClipRect.x - pos.x, pcmd->ClipRect.y - pos.y, pcmd->ClipRect.z - pos.x, pcmd->ClipRect.w - pos.y);
+ if (clip_rect.x < fb_width && clip_rect.y < fb_height && clip_rect.z >= 0.0f && clip_rect.w >= 0.0f)
+ {
+ // Apply scissor/clipping rectangle
+ MTLScissorRect scissorRect = { .x = NSUInteger(clip_rect.x),
+ .y = NSUInteger(clip_rect.y),
+ .width = NSUInteger(clip_rect.z - clip_rect.x),
+ .height = NSUInteger(clip_rect.w - clip_rect.y) };
+ [commandEncoder setScissorRect:scissorRect];
+
+
+ // Bind texture, Draw
+ if (pcmd->TextureId != NULL)
+ [commandEncoder setFragmentTexture:(__bridge id)(pcmd->TextureId) atIndex:0];
+ [commandEncoder drawIndexedPrimitives:MTLPrimitiveTypeTriangle
+ indexCount:pcmd->ElemCount
+ indexType:sizeof(ImDrawIdx) == 2 ? MTLIndexTypeUInt16 : MTLIndexTypeUInt32
+ indexBuffer:indexBuffer.buffer
+ indexBufferOffset:indexBufferOffset + idx_buffer_offset];
+ }
+ }
+ idx_buffer_offset += pcmd->ElemCount * sizeof(ImDrawIdx);
+ }
+
+ vertexBufferOffset += cmd_list->VtxBuffer.Size * sizeof(ImDrawVert);
+ indexBufferOffset += cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx);
+ }
+
+ __weak id weakSelf = self;
+ [commandBuffer addCompletedHandler:^(id)
+ {
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [weakSelf enqueueReusableBuffer:vertexBuffer];
+ [weakSelf enqueueReusableBuffer:indexBuffer];
+ });
+ }];
+}
+
+@end
diff --git a/3rdparty/imgui/examples/imgui_impl_opengl2.cpp b/3rdparty/imgui/examples/imgui_impl_opengl2.cpp
new file mode 100644
index 00000000..5acf12f1
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_opengl2.cpp
@@ -0,0 +1,212 @@
+// dear imgui: Renderer for OpenGL2 (legacy OpenGL, fixed pipeline)
+// This needs to be used along with a Platform Binding (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 in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
+// **Prefer using the code in imgui_impl_opengl3.cpp**
+// This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
+// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
+// complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
+// confuse your GPU driver.
+// The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-08-03: OpenGL: Disabling/restoring GL_LIGHTING and GL_COLOR_MATERIAL to increase compatibility with legacy OpenGL applications.
+// 2018-06-08: Misc: Extracted imgui_impl_opengl2.cpp/.h away from the old combined GLFW/SDL+OpenGL2 examples.
+// 2018-06-08: OpenGL: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplGlfwGL2_RenderDrawData() in the .h file so you can call it yourself.
+// 2017-09-01: OpenGL: Save and restore current polygon mode.
+// 2016-09-10: OpenGL: Uploading font texture as RGBA32 to increase compatibility with users shaders (not ideal).
+// 2016-09-05: OpenGL: Fixed save and restore of current scissor rectangle.
+
+#include "imgui.h"
+#include "imgui_impl_opengl2.h"
+#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
+#include // intptr_t
+#else
+#include // intptr_t
+#endif
+
+// Include OpenGL header (without an OpenGL loader) requires a bit of fiddling
+#if defined(_WIN32) && !defined(APIENTRY)
+#define APIENTRY __stdcall // It is customary to use APIENTRY for OpenGL function pointer declarations on all platforms. Additionally, the Windows OpenGL header needs APIENTRY.
+#endif
+#if defined(_WIN32) && !defined(WINGDIAPI)
+#define WINGDIAPI __declspec(dllimport) // Some Windows OpenGL headers need this
+#endif
+#if defined(__APPLE__)
+#include
+#else
+#include
+#endif
+
+// OpenGL Data
+static GLuint g_FontTexture = 0;
+
+// Functions
+bool ImGui_ImplOpenGL2_Init()
+{
+ return true;
+}
+
+void ImGui_ImplOpenGL2_Shutdown()
+{
+ ImGui_ImplOpenGL2_DestroyDeviceObjects();
+}
+
+void ImGui_ImplOpenGL2_NewFrame()
+{
+ if (!g_FontTexture)
+ ImGui_ImplOpenGL2_CreateDeviceObjects();
+}
+
+// OpenGL2 Render function.
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+// Note that this implementation is little overcomplicated because we are saving/setting up/restoring every OpenGL state explicitly, in order to be able to run within any OpenGL engine that doesn't do so.
+void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data)
+{
+ // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
+ ImGuiIO& io = ImGui::GetIO();
+ int fb_width = (int)(draw_data->DisplaySize.x * io.DisplayFramebufferScale.x);
+ int fb_height = (int)(draw_data->DisplaySize.y * io.DisplayFramebufferScale.y);
+ if (fb_width == 0 || fb_height == 0)
+ return;
+ draw_data->ScaleClipRects(io.DisplayFramebufferScale);
+
+ // We are using the OpenGL fixed pipeline to make the example code simpler to read!
+ // Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled, vertex/texcoord/color pointers, polygon fill.
+ GLint last_texture; glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
+ GLint last_polygon_mode[2]; glGetIntegerv(GL_POLYGON_MODE, last_polygon_mode);
+ GLint last_viewport[4]; glGetIntegerv(GL_VIEWPORT, last_viewport);
+ GLint last_scissor_box[4]; glGetIntegerv(GL_SCISSOR_BOX, last_scissor_box);
+ glPushAttrib(GL_ENABLE_BIT | GL_COLOR_BUFFER_BIT | GL_TRANSFORM_BIT);
+ glEnable(GL_BLEND);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glDisable(GL_LIGHTING);
+ glDisable(GL_COLOR_MATERIAL);
+ glEnable(GL_SCISSOR_TEST);
+ glEnableClientState(GL_VERTEX_ARRAY);
+ glEnableClientState(GL_TEXTURE_COORD_ARRAY);
+ glEnableClientState(GL_COLOR_ARRAY);
+ glEnable(GL_TEXTURE_2D);
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+ //glUseProgram(0); // You may want this if using this code in an OpenGL 3+ context where shaders may be bound
+
+ // Setup viewport, orthographic projection matrix
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps.
+ glViewport(0, 0, (GLsizei)fb_width, (GLsizei)fb_height);
+ glMatrixMode(GL_PROJECTION);
+ glPushMatrix();
+ glLoadIdentity();
+ glOrtho(draw_data->DisplayPos.x, draw_data->DisplayPos.x + draw_data->DisplaySize.x, draw_data->DisplayPos.y + draw_data->DisplaySize.y, draw_data->DisplayPos.y, -1.0f, +1.0f);
+ glMatrixMode(GL_MODELVIEW);
+ glPushMatrix();
+ glLoadIdentity();
+
+ // Render command lists
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data;
+ const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data;
+ glVertexPointer(2, GL_FLOAT, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, pos)));
+ glTexCoordPointer(2, GL_FLOAT, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, uv)));
+ glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(ImDrawVert), (const GLvoid*)((const char*)vtx_buffer + IM_OFFSETOF(ImDrawVert, col)));
+
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ // User callback (registered via ImDrawList::AddCallback)
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ ImVec4 clip_rect = ImVec4(pcmd->ClipRect.x - pos.x, pcmd->ClipRect.y - pos.y, pcmd->ClipRect.z - pos.x, pcmd->ClipRect.w - pos.y);
+ if (clip_rect.x < fb_width && clip_rect.y < fb_height && clip_rect.z >= 0.0f && clip_rect.w >= 0.0f)
+ {
+ // Apply scissor/clipping rectangle
+ glScissor((int)clip_rect.x, (int)(fb_height - clip_rect.w), (int)(clip_rect.z - clip_rect.x), (int)(clip_rect.w - clip_rect.y));
+
+ // Bind texture, Draw
+ glBindTexture(GL_TEXTURE_2D, (GLuint)(intptr_t)pcmd->TextureId);
+ glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer);
+ }
+ }
+ idx_buffer += pcmd->ElemCount;
+ }
+ }
+
+ // Restore modified state
+ glDisableClientState(GL_COLOR_ARRAY);
+ glDisableClientState(GL_TEXTURE_COORD_ARRAY);
+ glDisableClientState(GL_VERTEX_ARRAY);
+ glBindTexture(GL_TEXTURE_2D, (GLuint)last_texture);
+ glMatrixMode(GL_MODELVIEW);
+ glPopMatrix();
+ glMatrixMode(GL_PROJECTION);
+ glPopMatrix();
+ glPopAttrib();
+ glPolygonMode(GL_FRONT, (GLenum)last_polygon_mode[0]); glPolygonMode(GL_BACK, (GLenum)last_polygon_mode[1]);
+ glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3]);
+ glScissor(last_scissor_box[0], last_scissor_box[1], (GLsizei)last_scissor_box[2], (GLsizei)last_scissor_box[3]);
+}
+
+bool ImGui_ImplOpenGL2_CreateFontsTexture()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory.
+
+ // Upload texture to graphics system
+ GLint last_texture;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
+ glGenTextures(1, &g_FontTexture);
+ glBindTexture(GL_TEXTURE_2D, g_FontTexture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)(intptr_t)g_FontTexture;
+
+ // Restore state
+ glBindTexture(GL_TEXTURE_2D, last_texture);
+
+ return true;
+}
+
+void ImGui_ImplOpenGL2_DestroyFontsTexture()
+{
+ if (g_FontTexture)
+ {
+ ImGuiIO& io = ImGui::GetIO();
+ glDeleteTextures(1, &g_FontTexture);
+ io.Fonts->TexID = 0;
+ g_FontTexture = 0;
+ }
+}
+
+bool ImGui_ImplOpenGL2_CreateDeviceObjects()
+{
+ return ImGui_ImplOpenGL2_CreateFontsTexture();
+}
+
+void ImGui_ImplOpenGL2_DestroyDeviceObjects()
+{
+ ImGui_ImplOpenGL2_DestroyFontsTexture();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_opengl2.h b/3rdparty/imgui/examples/imgui_impl_opengl2.h
new file mode 100644
index 00000000..911447a4
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_opengl2.h
@@ -0,0 +1,28 @@
+// dear imgui: Renderer for OpenGL2 (legacy OpenGL, fixed pipeline)
+// This needs to be used along with a Platform Binding (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 in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// **DO NOT USE THIS CODE IF YOUR CODE/ENGINE IS USING MODERN OPENGL (SHADERS, VBO, VAO, etc.)**
+// **Prefer using the code in imgui_impl_opengl3.cpp**
+// This code is mostly provided as a reference to learn how ImGui integration works, because it is shorter to read.
+// If your code is using GL3+ context or any semi modern OpenGL calls, using this is likely to make everything more
+// complicated, will require your code to reset every single OpenGL attributes to their initial state, and might
+// confuse your GPU driver.
+// The GL2 code is unable to reset attributes or even call e.g. "glUseProgram(0)" because they don't exist in that API.
+
+IMGUI_IMPL_API bool ImGui_ImplOpenGL2_Init();
+IMGUI_IMPL_API void ImGui_ImplOpenGL2_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplOpenGL2_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplOpenGL2_RenderDrawData(ImDrawData* draw_data);
+
+// Called by Init/NewFrame/Shutdown
+IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateFontsTexture();
+IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyFontsTexture();
+IMGUI_IMPL_API bool ImGui_ImplOpenGL2_CreateDeviceObjects();
+IMGUI_IMPL_API void ImGui_ImplOpenGL2_DestroyDeviceObjects();
diff --git a/3rdparty/imgui/examples/imgui_impl_opengl3.cpp b/3rdparty/imgui/examples/imgui_impl_opengl3.cpp
new file mode 100644
index 00000000..11109817
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_opengl3.cpp
@@ -0,0 +1,538 @@
+// dear imgui: Renderer for OpenGL3 / OpenGL ES2 / OpenGL ES3 (modern OpenGL with shaders / programmatic pipeline)
+// This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..)
+// (Note: We are using GL3W as a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc..)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-08-29: OpenGL: Added support for more OpenGL loaders: glew and glad, with comments indicative that any loader can be used.
+// 2018-08-09: OpenGL: Default to OpenGL ES 3 on iOS and Android. GLSL version default to "#version 300 ES".
+// 2018-07-30: OpenGL: Support for GLSL 300 ES and 410 core. Fixes for Emscripten compilation.
+// 2018-07-10: OpenGL: Support for more GLSL versions (based on the GLSL version string). Added error output when shaders fail to compile/link.
+// 2018-06-08: Misc: Extracted imgui_impl_opengl3.cpp/.h away from the old combined GLFW/SDL+OpenGL3 examples.
+// 2018-06-08: OpenGL: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-05-25: OpenGL: Removed unnecessary backup/restore of GL_ELEMENT_ARRAY_BUFFER_BINDING since this is part of the VAO state.
+// 2018-05-14: OpenGL: Making the call to glBindSampler() optional so 3.2 context won't fail if the function is a NULL pointer.
+// 2018-03-06: OpenGL: Added const char* glsl_version parameter to ImGui_ImplOpenGL3_Init() so user can override the GLSL version e.g. "#version 150".
+// 2018-02-23: OpenGL: Create the VAO in the render function so the setup can more easily be used with multiple shared GL context.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback and exposed ImGui_ImplSdlGL3_RenderDrawData() in the .h file so you can call it yourself.
+// 2018-01-07: OpenGL: Changed GLSL shader version from 330 to 150.
+// 2017-09-01: OpenGL: Save and restore current bound sampler. Save and restore current polygon mode.
+// 2017-05-01: OpenGL: Fixed save and restore of current blend func state.
+// 2017-05-01: OpenGL: Fixed save and restore of current GL_ACTIVE_TEXTURE.
+// 2016-09-05: OpenGL: Fixed save and restore of current scissor rectangle.
+// 2016-07-29: OpenGL: Explicitly setting GL_UNPACK_ROW_LENGTH to reduce issues because SDL changes it. (#752)
+
+//----------------------------------------
+// OpenGL GLSL GLSL
+// version version string
+//----------------------------------------
+// 2.0 110 "#version 110"
+// 2.1 120
+// 3.0 130
+// 3.1 140
+// 3.2 150 "#version 150"
+// 3.3 330
+// 4.0 400
+// 4.1 410 "#version 410 core"
+// 4.2 420
+// 4.3 430
+// ES 2.0 100 "#version 100"
+// ES 3.0 300 "#version 300 es"
+//----------------------------------------
+
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+
+#include "imgui.h"
+#include "imgui_impl_opengl3.h"
+#include
+#if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier
+#include // intptr_t
+#else
+#include // intptr_t
+#endif
+#if defined(__APPLE__)
+#include "TargetConditionals.h"
+#endif
+
+// iOS, Android and Emscripten can use GL ES 3
+// Call ImGui_ImplOpenGL3_Init() with "#version 300 es"
+#if (defined(__APPLE__) && TARGET_OS_IOS) || (defined(__ANDROID__)) || (defined(__EMSCRIPTEN__))
+#define USE_GL_ES3
+#endif
+
+#ifdef USE_GL_ES3
+// OpenGL ES 3
+#include // Use GL ES 3
+#else
+// Regular OpenGL
+// About OpenGL function loaders: modern OpenGL doesn't have a standard header file and requires individual function pointers to be loaded manually.
+// Helper libraries are often used for this purpose! Here we are supporting a few common ones: gl3w, glew, glad.
+// You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own.
+#if defined(IMGUI_IMPL_OPENGL_LOADER_GL3W)
+#include
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLEW)
+#include
+#elif defined(IMGUI_IMPL_OPENGL_LOADER_GLAD)
+#include
+#else
+#include IMGUI_IMPL_OPENGL_LOADER_CUSTOM
+#endif
+#endif
+
+// OpenGL Data
+static char g_GlslVersionString[32] = "";
+static GLuint g_FontTexture = 0;
+static GLuint g_ShaderHandle = 0, g_VertHandle = 0, g_FragHandle = 0;
+static int g_AttribLocationTex = 0, g_AttribLocationProjMtx = 0;
+static int g_AttribLocationPosition = 0, g_AttribLocationUV = 0, g_AttribLocationColor = 0;
+static unsigned int g_VboHandle = 0, g_ElementsHandle = 0;
+
+// Functions
+bool ImGui_ImplOpenGL3_Init(const char* glsl_version)
+{
+ // Store GLSL version string so we can refer to it later in case we recreate shaders. Note: GLSL version is NOT the same as GL version. Leave this to NULL if unsure.
+#ifdef USE_GL_ES3
+ if (glsl_version == NULL)
+ glsl_version = "#version 300 es";
+#else
+ if (glsl_version == NULL)
+ glsl_version = "#version 130";
+#endif
+ IM_ASSERT((int)strlen(glsl_version) + 2 < IM_ARRAYSIZE(g_GlslVersionString));
+ strcpy(g_GlslVersionString, glsl_version);
+ strcat(g_GlslVersionString, "\n");
+ return true;
+}
+
+void ImGui_ImplOpenGL3_Shutdown()
+{
+ ImGui_ImplOpenGL3_DestroyDeviceObjects();
+}
+
+void ImGui_ImplOpenGL3_NewFrame()
+{
+ if (!g_FontTexture)
+ ImGui_ImplOpenGL3_CreateDeviceObjects();
+}
+
+// OpenGL3 Render function.
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+// Note that this implementation is little overcomplicated because we are saving/setting up/restoring every OpenGL state explicitly, in order to be able to run within any OpenGL engine that doesn't do so.
+void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data)
+{
+ // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates)
+ ImGuiIO& io = ImGui::GetIO();
+ int fb_width = (int)(draw_data->DisplaySize.x * io.DisplayFramebufferScale.x);
+ int fb_height = (int)(draw_data->DisplaySize.y * io.DisplayFramebufferScale.y);
+ if (fb_width <= 0 || fb_height <= 0)
+ return;
+ draw_data->ScaleClipRects(io.DisplayFramebufferScale);
+
+ // Backup GL state
+ GLenum last_active_texture; glGetIntegerv(GL_ACTIVE_TEXTURE, (GLint*)&last_active_texture);
+ glActiveTexture(GL_TEXTURE0);
+ GLint last_program; glGetIntegerv(GL_CURRENT_PROGRAM, &last_program);
+ GLint last_texture; glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
+#ifdef GL_SAMPLER_BINDING
+ GLint last_sampler; glGetIntegerv(GL_SAMPLER_BINDING, &last_sampler);
+#endif
+ GLint last_array_buffer; glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer);
+ GLint last_vertex_array; glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array);
+#ifdef GL_POLYGON_MODE
+ GLint last_polygon_mode[2]; glGetIntegerv(GL_POLYGON_MODE, last_polygon_mode);
+#endif
+ GLint last_viewport[4]; glGetIntegerv(GL_VIEWPORT, last_viewport);
+ GLint last_scissor_box[4]; glGetIntegerv(GL_SCISSOR_BOX, last_scissor_box);
+ GLenum last_blend_src_rgb; glGetIntegerv(GL_BLEND_SRC_RGB, (GLint*)&last_blend_src_rgb);
+ GLenum last_blend_dst_rgb; glGetIntegerv(GL_BLEND_DST_RGB, (GLint*)&last_blend_dst_rgb);
+ GLenum last_blend_src_alpha; glGetIntegerv(GL_BLEND_SRC_ALPHA, (GLint*)&last_blend_src_alpha);
+ GLenum last_blend_dst_alpha; glGetIntegerv(GL_BLEND_DST_ALPHA, (GLint*)&last_blend_dst_alpha);
+ GLenum last_blend_equation_rgb; glGetIntegerv(GL_BLEND_EQUATION_RGB, (GLint*)&last_blend_equation_rgb);
+ GLenum last_blend_equation_alpha; glGetIntegerv(GL_BLEND_EQUATION_ALPHA, (GLint*)&last_blend_equation_alpha);
+ GLboolean last_enable_blend = glIsEnabled(GL_BLEND);
+ GLboolean last_enable_cull_face = glIsEnabled(GL_CULL_FACE);
+ GLboolean last_enable_depth_test = glIsEnabled(GL_DEPTH_TEST);
+ GLboolean last_enable_scissor_test = glIsEnabled(GL_SCISSOR_TEST);
+
+ // Setup render state: alpha-blending enabled, no face culling, no depth testing, scissor enabled, polygon fill
+ glEnable(GL_BLEND);
+ glBlendEquation(GL_FUNC_ADD);
+ glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+ glDisable(GL_CULL_FACE);
+ glDisable(GL_DEPTH_TEST);
+ glEnable(GL_SCISSOR_TEST);
+#ifdef GL_POLYGON_MODE
+ glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
+#endif
+
+ // Setup viewport, orthographic projection matrix
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps.
+ glViewport(0, 0, (GLsizei)fb_width, (GLsizei)fb_height);
+ float L = draw_data->DisplayPos.x;
+ float R = draw_data->DisplayPos.x + draw_data->DisplaySize.x;
+ float T = draw_data->DisplayPos.y;
+ float B = draw_data->DisplayPos.y + draw_data->DisplaySize.y;
+ const float ortho_projection[4][4] =
+ {
+ { 2.0f/(R-L), 0.0f, 0.0f, 0.0f },
+ { 0.0f, 2.0f/(T-B), 0.0f, 0.0f },
+ { 0.0f, 0.0f, -1.0f, 0.0f },
+ { (R+L)/(L-R), (T+B)/(B-T), 0.0f, 1.0f },
+ };
+ glUseProgram(g_ShaderHandle);
+ glUniform1i(g_AttribLocationTex, 0);
+ glUniformMatrix4fv(g_AttribLocationProjMtx, 1, GL_FALSE, &ortho_projection[0][0]);
+#ifdef GL_SAMPLER_BINDING
+ glBindSampler(0, 0); // We use combined texture/sampler state. Applications using GL 3.3 may set that otherwise.
+#endif
+ // Recreate the VAO every time
+ // (This is to easily allow multiple GL contexts. VAO are not shared among GL contexts, and we don't track creation/deletion of windows so we don't have an obvious key to use to cache them.)
+ GLuint vao_handle = 0;
+ glGenVertexArrays(1, &vao_handle);
+ glBindVertexArray(vao_handle);
+ glBindBuffer(GL_ARRAY_BUFFER, g_VboHandle);
+ glEnableVertexAttribArray(g_AttribLocationPosition);
+ glEnableVertexAttribArray(g_AttribLocationUV);
+ glEnableVertexAttribArray(g_AttribLocationColor);
+ glVertexAttribPointer(g_AttribLocationPosition, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, pos));
+ glVertexAttribPointer(g_AttribLocationUV, 2, GL_FLOAT, GL_FALSE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, uv));
+ glVertexAttribPointer(g_AttribLocationColor, 4, GL_UNSIGNED_BYTE, GL_TRUE, sizeof(ImDrawVert), (GLvoid*)IM_OFFSETOF(ImDrawVert, col));
+
+ // Draw
+ ImVec2 pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ const ImDrawIdx* idx_buffer_offset = 0;
+
+ glBindBuffer(GL_ARRAY_BUFFER, g_VboHandle);
+ glBufferData(GL_ARRAY_BUFFER, (GLsizeiptr)cmd_list->VtxBuffer.Size * sizeof(ImDrawVert), (const GLvoid*)cmd_list->VtxBuffer.Data, GL_STREAM_DRAW);
+
+ glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, g_ElementsHandle);
+ glBufferData(GL_ELEMENT_ARRAY_BUFFER, (GLsizeiptr)cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx), (const GLvoid*)cmd_list->IdxBuffer.Data, GL_STREAM_DRAW);
+
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ // User callback (registered via ImDrawList::AddCallback)
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ ImVec4 clip_rect = ImVec4(pcmd->ClipRect.x - pos.x, pcmd->ClipRect.y - pos.y, pcmd->ClipRect.z - pos.x, pcmd->ClipRect.w - pos.y);
+ if (clip_rect.x < fb_width && clip_rect.y < fb_height && clip_rect.z >= 0.0f && clip_rect.w >= 0.0f)
+ {
+ // Apply scissor/clipping rectangle
+ glScissor((int)clip_rect.x, (int)(fb_height - clip_rect.w), (int)(clip_rect.z - clip_rect.x), (int)(clip_rect.w - clip_rect.y));
+
+ // Bind texture, Draw
+ glBindTexture(GL_TEXTURE_2D, (GLuint)(intptr_t)pcmd->TextureId);
+ glDrawElements(GL_TRIANGLES, (GLsizei)pcmd->ElemCount, sizeof(ImDrawIdx) == 2 ? GL_UNSIGNED_SHORT : GL_UNSIGNED_INT, idx_buffer_offset);
+ }
+ }
+ idx_buffer_offset += pcmd->ElemCount;
+ }
+ }
+ glDeleteVertexArrays(1, &vao_handle);
+
+ // Restore modified GL state
+ glUseProgram(last_program);
+ glBindTexture(GL_TEXTURE_2D, last_texture);
+#ifdef GL_SAMPLER_BINDING
+ glBindSampler(0, last_sampler);
+#endif
+ glActiveTexture(last_active_texture);
+ glBindVertexArray(last_vertex_array);
+ glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);
+ glBlendEquationSeparate(last_blend_equation_rgb, last_blend_equation_alpha);
+ glBlendFuncSeparate(last_blend_src_rgb, last_blend_dst_rgb, last_blend_src_alpha, last_blend_dst_alpha);
+ if (last_enable_blend) glEnable(GL_BLEND); else glDisable(GL_BLEND);
+ if (last_enable_cull_face) glEnable(GL_CULL_FACE); else glDisable(GL_CULL_FACE);
+ if (last_enable_depth_test) glEnable(GL_DEPTH_TEST); else glDisable(GL_DEPTH_TEST);
+ if (last_enable_scissor_test) glEnable(GL_SCISSOR_TEST); else glDisable(GL_SCISSOR_TEST);
+#ifdef GL_POLYGON_MODE
+ glPolygonMode(GL_FRONT_AND_BACK, (GLenum)last_polygon_mode[0]);
+#endif
+ glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3]);
+ glScissor(last_scissor_box[0], last_scissor_box[1], (GLsizei)last_scissor_box[2], (GLsizei)last_scissor_box[3]);
+}
+
+bool ImGui_ImplOpenGL3_CreateFontsTexture()
+{
+ // Build texture atlas
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bits (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory.
+
+ // Upload texture to graphics system
+ GLint last_texture;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
+ glGenTextures(1, &g_FontTexture);
+ glBindTexture(GL_TEXTURE_2D, g_FontTexture);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+ glPixelStorei(GL_UNPACK_ROW_LENGTH, 0);
+ glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)(intptr_t)g_FontTexture;
+
+ // Restore state
+ glBindTexture(GL_TEXTURE_2D, last_texture);
+
+ return true;
+}
+
+void ImGui_ImplOpenGL3_DestroyFontsTexture()
+{
+ if (g_FontTexture)
+ {
+ ImGuiIO& io = ImGui::GetIO();
+ glDeleteTextures(1, &g_FontTexture);
+ io.Fonts->TexID = 0;
+ g_FontTexture = 0;
+ }
+}
+
+// If you get an error please report on github. You may try different GL context version or GLSL version.
+static bool CheckShader(GLuint handle, const char* desc)
+{
+ GLint status = 0, log_length = 0;
+ glGetShaderiv(handle, GL_COMPILE_STATUS, &status);
+ glGetShaderiv(handle, GL_INFO_LOG_LENGTH, &log_length);
+ if ((GLboolean)status == GL_FALSE)
+ fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to compile %s!\n", desc);
+ if (log_length > 0)
+ {
+ ImVector buf;
+ buf.resize((int)(log_length + 1));
+ glGetShaderInfoLog(handle, log_length, NULL, (GLchar*)buf.begin());
+ fprintf(stderr, "%s\n", buf.begin());
+ }
+ return (GLboolean)status == GL_TRUE;
+}
+
+// If you get an error please report on github. You may try different GL context version or GLSL version.
+static bool CheckProgram(GLuint handle, const char* desc)
+{
+ GLint status = 0, log_length = 0;
+ glGetProgramiv(handle, GL_LINK_STATUS, &status);
+ glGetProgramiv(handle, GL_INFO_LOG_LENGTH, &log_length);
+ if ((GLboolean)status == GL_FALSE)
+ fprintf(stderr, "ERROR: ImGui_ImplOpenGL3_CreateDeviceObjects: failed to link %s!\n", desc);
+ if (log_length > 0)
+ {
+ ImVector buf;
+ buf.resize((int)(log_length + 1));
+ glGetProgramInfoLog(handle, log_length, NULL, (GLchar*)buf.begin());
+ fprintf(stderr, "%s\n", buf.begin());
+ }
+ return (GLboolean)status == GL_TRUE;
+}
+
+bool ImGui_ImplOpenGL3_CreateDeviceObjects()
+{
+ // Backup GL state
+ GLint last_texture, last_array_buffer, last_vertex_array;
+ glGetIntegerv(GL_TEXTURE_BINDING_2D, &last_texture);
+ glGetIntegerv(GL_ARRAY_BUFFER_BINDING, &last_array_buffer);
+ glGetIntegerv(GL_VERTEX_ARRAY_BINDING, &last_vertex_array);
+
+ // Parse GLSL version string
+ int glsl_version = 130;
+ sscanf(g_GlslVersionString, "#version %d", &glsl_version);
+
+ const GLchar* vertex_shader_glsl_120 =
+ "uniform mat4 ProjMtx;\n"
+ "attribute vec2 Position;\n"
+ "attribute vec2 UV;\n"
+ "attribute vec4 Color;\n"
+ "varying vec2 Frag_UV;\n"
+ "varying vec4 Frag_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Frag_UV = UV;\n"
+ " Frag_Color = Color;\n"
+ " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
+ "}\n";
+
+ const GLchar* vertex_shader_glsl_130 =
+ "uniform mat4 ProjMtx;\n"
+ "in vec2 Position;\n"
+ "in vec2 UV;\n"
+ "in vec4 Color;\n"
+ "out vec2 Frag_UV;\n"
+ "out vec4 Frag_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Frag_UV = UV;\n"
+ " Frag_Color = Color;\n"
+ " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
+ "}\n";
+
+ const GLchar* vertex_shader_glsl_300_es =
+ "precision mediump float;\n"
+ "layout (location = 0) in vec2 Position;\n"
+ "layout (location = 1) in vec2 UV;\n"
+ "layout (location = 2) in vec4 Color;\n"
+ "uniform mat4 ProjMtx;\n"
+ "out vec2 Frag_UV;\n"
+ "out vec4 Frag_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Frag_UV = UV;\n"
+ " Frag_Color = Color;\n"
+ " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
+ "}\n";
+
+ const GLchar* vertex_shader_glsl_410_core =
+ "layout (location = 0) in vec2 Position;\n"
+ "layout (location = 1) in vec2 UV;\n"
+ "layout (location = 2) in vec4 Color;\n"
+ "uniform mat4 ProjMtx;\n"
+ "out vec2 Frag_UV;\n"
+ "out vec4 Frag_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Frag_UV = UV;\n"
+ " Frag_Color = Color;\n"
+ " gl_Position = ProjMtx * vec4(Position.xy,0,1);\n"
+ "}\n";
+
+ const GLchar* fragment_shader_glsl_120 =
+ "#ifdef GL_ES\n"
+ " precision mediump float;\n"
+ "#endif\n"
+ "uniform sampler2D Texture;\n"
+ "varying vec2 Frag_UV;\n"
+ "varying vec4 Frag_Color;\n"
+ "void main()\n"
+ "{\n"
+ " gl_FragColor = Frag_Color * texture2D(Texture, Frag_UV.st);\n"
+ "}\n";
+
+ const GLchar* fragment_shader_glsl_130 =
+ "uniform sampler2D Texture;\n"
+ "in vec2 Frag_UV;\n"
+ "in vec4 Frag_Color;\n"
+ "out vec4 Out_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
+ "}\n";
+
+ const GLchar* fragment_shader_glsl_300_es =
+ "precision mediump float;\n"
+ "uniform sampler2D Texture;\n"
+ "in vec2 Frag_UV;\n"
+ "in vec4 Frag_Color;\n"
+ "layout (location = 0) out vec4 Out_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
+ "}\n";
+
+ const GLchar* fragment_shader_glsl_410_core =
+ "in vec2 Frag_UV;\n"
+ "in vec4 Frag_Color;\n"
+ "uniform sampler2D Texture;\n"
+ "layout (location = 0) out vec4 Out_Color;\n"
+ "void main()\n"
+ "{\n"
+ " Out_Color = Frag_Color * texture(Texture, Frag_UV.st);\n"
+ "}\n";
+
+ // Select shaders matching our GLSL versions
+ const GLchar* vertex_shader = NULL;
+ const GLchar* fragment_shader = NULL;
+ if (glsl_version < 130)
+ {
+ vertex_shader = vertex_shader_glsl_120;
+ fragment_shader = fragment_shader_glsl_120;
+ }
+ else if (glsl_version == 410)
+ {
+ vertex_shader = vertex_shader_glsl_410_core;
+ fragment_shader = fragment_shader_glsl_410_core;
+ }
+ else if (glsl_version == 300)
+ {
+ vertex_shader = vertex_shader_glsl_300_es;
+ fragment_shader = fragment_shader_glsl_300_es;
+ }
+ else
+ {
+ vertex_shader = vertex_shader_glsl_130;
+ fragment_shader = fragment_shader_glsl_130;
+ }
+
+ // Create shaders
+ const GLchar* vertex_shader_with_version[2] = { g_GlslVersionString, vertex_shader };
+ g_VertHandle = glCreateShader(GL_VERTEX_SHADER);
+ glShaderSource(g_VertHandle, 2, vertex_shader_with_version, NULL);
+ glCompileShader(g_VertHandle);
+ CheckShader(g_VertHandle, "vertex shader");
+
+ const GLchar* fragment_shader_with_version[2] = { g_GlslVersionString, fragment_shader };
+ g_FragHandle = glCreateShader(GL_FRAGMENT_SHADER);
+ glShaderSource(g_FragHandle, 2, fragment_shader_with_version, NULL);
+ glCompileShader(g_FragHandle);
+ CheckShader(g_FragHandle, "fragment shader");
+
+ g_ShaderHandle = glCreateProgram();
+ glAttachShader(g_ShaderHandle, g_VertHandle);
+ glAttachShader(g_ShaderHandle, g_FragHandle);
+ glLinkProgram(g_ShaderHandle);
+ CheckProgram(g_ShaderHandle, "shader program");
+
+ g_AttribLocationTex = glGetUniformLocation(g_ShaderHandle, "Texture");
+ g_AttribLocationProjMtx = glGetUniformLocation(g_ShaderHandle, "ProjMtx");
+ g_AttribLocationPosition = glGetAttribLocation(g_ShaderHandle, "Position");
+ g_AttribLocationUV = glGetAttribLocation(g_ShaderHandle, "UV");
+ g_AttribLocationColor = glGetAttribLocation(g_ShaderHandle, "Color");
+
+ // Create buffers
+ glGenBuffers(1, &g_VboHandle);
+ glGenBuffers(1, &g_ElementsHandle);
+
+ ImGui_ImplOpenGL3_CreateFontsTexture();
+
+ // Restore modified GL state
+ glBindTexture(GL_TEXTURE_2D, last_texture);
+ glBindBuffer(GL_ARRAY_BUFFER, last_array_buffer);
+ glBindVertexArray(last_vertex_array);
+
+ return true;
+}
+
+void ImGui_ImplOpenGL3_DestroyDeviceObjects()
+{
+ if (g_VboHandle) glDeleteBuffers(1, &g_VboHandle);
+ if (g_ElementsHandle) glDeleteBuffers(1, &g_ElementsHandle);
+ g_VboHandle = g_ElementsHandle = 0;
+
+ if (g_ShaderHandle && g_VertHandle) glDetachShader(g_ShaderHandle, g_VertHandle);
+ if (g_VertHandle) glDeleteShader(g_VertHandle);
+ g_VertHandle = 0;
+
+ if (g_ShaderHandle && g_FragHandle) glDetachShader(g_ShaderHandle, g_FragHandle);
+ if (g_FragHandle) glDeleteShader(g_FragHandle);
+ g_FragHandle = 0;
+
+ if (g_ShaderHandle) glDeleteProgram(g_ShaderHandle);
+ g_ShaderHandle = 0;
+
+ ImGui_ImplOpenGL3_DestroyFontsTexture();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_opengl3.h b/3rdparty/imgui/examples/imgui_impl_opengl3.h
new file mode 100644
index 00000000..4c3321fc
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_opengl3.h
@@ -0,0 +1,39 @@
+// dear imgui: Renderer for OpenGL3 / OpenGL ES2 / OpenGL ES3 (modern OpenGL with shaders / programmatic pipeline)
+// This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..)
+// (Note: We are using GL3W as a helper library to access OpenGL functions since there is no standard header to access modern OpenGL functions easily. Alternatives are GLEW, Glad, etc..)
+
+// Implemented features:
+// [X] Renderer: User texture binding. Use 'GLuint' OpenGL texture identifier as void*/ImTextureID. Read the FAQ about ImTextureID in imgui.cpp.
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// About OpenGL function loaders:
+// About OpenGL function loaders: modern OpenGL doesn't have a standard header file and requires individual function pointers to be loaded manually.
+// Helper libraries are often used for this purpose! Here we are supporting a few common ones: gl3w, glew, glad.
+// You may use another loader/header of your choice (glext, glLoadGen, etc.), or chose to manually implement your own.
+
+// About GLSL version:
+// The 'glsl_version' initialization parameter should be NULL (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.
+
+// Set default OpenGL loader to be gl3w
+#if !defined(IMGUI_IMPL_OPENGL_LOADER_GL3W) \
+ && !defined(IMGUI_IMPL_OPENGL_LOADER_GLEW) \
+ && !defined(IMGUI_IMPL_OPENGL_LOADER_GLAD) \
+ && !defined(IMGUI_IMPL_OPENGL_LOADER_CUSTOM)
+#define IMGUI_IMPL_OPENGL_LOADER_GL3W
+#endif
+
+IMGUI_IMPL_API bool ImGui_ImplOpenGL3_Init(const char* glsl_version = NULL);
+IMGUI_IMPL_API void ImGui_ImplOpenGL3_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplOpenGL3_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplOpenGL3_RenderDrawData(ImDrawData* draw_data);
+
+// 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();
diff --git a/3rdparty/imgui/examples/imgui_impl_osx.h b/3rdparty/imgui/examples/imgui_impl_osx.h
new file mode 100644
index 00000000..b7f41cbc
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_osx.h
@@ -0,0 +1,15 @@
+// dear imgui: Platform Binding for OSX / Cocoa
+// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
+// [BETA] Beta bindings, not well tested. If you want a portable application, prefer using the Glfw or SDL platform bindings on Mac.
+
+// Issues:
+// [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
+// [ ] Platform: Mouse cursor shapes and visibility are not supported (see end of https://github.com/glfw/glfw/issues/427)
+
+@class NSEvent;
+@class NSView;
+
+IMGUI_API bool ImGui_ImplOSX_Init();
+IMGUI_API void ImGui_ImplOSX_Shutdown();
+IMGUI_API void ImGui_ImplOSX_NewFrame(NSView *_Nonnull view);
+IMGUI_API bool ImGui_ImplOSX_HandleEvent(NSEvent *_Nonnull event, NSView *_Nullable view);
diff --git a/3rdparty/imgui/examples/imgui_impl_osx.mm b/3rdparty/imgui/examples/imgui_impl_osx.mm
new file mode 100644
index 00000000..b1dbe7c4
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_osx.mm
@@ -0,0 +1,238 @@
+// dear imgui: Platform Binding for OSX / Cocoa
+// This needs to be used along with a Renderer (e.g. OpenGL2, OpenGL3, Vulkan, Metal..)
+// [BETA] Beta bindings, not well tested. If you want a portable application, prefer using the Glfw or SDL platform bindings on Mac.
+
+// Issues:
+// [ ] Platform: Keys are all generally very broken. Best using [event keycode] and not [event characters]..
+// [ ] Platform: Mouse cursor shapes and visibility are not supported (see end of https://github.com/glfw/glfw/issues/427)
+
+#include "imgui.h"
+#include "imgui_impl_osx.h"
+#import
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-07-07: Initial version.
+
+// Data
+static CFAbsoluteTime g_Time = 0.0;
+
+// Functions
+bool ImGui_ImplOSX_Init()
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ // Setup back-end capabilities flags
+ //io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
+ //io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
+ //io.BackendFlags |= ImGuiBackendFlags_PlatformHasViewports; // We can create multi-viewports on the Platform side (optional)
+ //io.BackendFlags |= ImGuiBackendFlags_HasMouseHoveredViewport; // We can set io.MouseHoveredViewport correctly (optional, not easy)
+
+ // Keyboard mapping. ImGui will use those indices to peek into the io.KeyDown[] array.
+ const int offset_for_function_keys = 256 - 0xF700;
+ io.KeyMap[ImGuiKey_Tab] = '\t';
+ io.KeyMap[ImGuiKey_LeftArrow] = NSLeftArrowFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_RightArrow] = NSRightArrowFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_UpArrow] = NSUpArrowFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_DownArrow] = NSDownArrowFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_PageUp] = NSPageUpFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_PageDown] = NSPageDownFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_Home] = NSHomeFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_End] = NSEndFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_Insert] = NSInsertFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_Delete] = NSDeleteFunctionKey + offset_for_function_keys;
+ io.KeyMap[ImGuiKey_Backspace] = 127;
+ io.KeyMap[ImGuiKey_Space] = 32;
+ io.KeyMap[ImGuiKey_Enter] = 13;
+ io.KeyMap[ImGuiKey_Escape] = 27;
+ io.KeyMap[ImGuiKey_A] = 'A';
+ io.KeyMap[ImGuiKey_C] = 'C';
+ io.KeyMap[ImGuiKey_V] = 'V';
+ io.KeyMap[ImGuiKey_X] = 'X';
+ io.KeyMap[ImGuiKey_Y] = 'Y';
+ io.KeyMap[ImGuiKey_Z] = 'Z';
+
+ io.SetClipboardTextFn = [](void*, const char* str) -> void
+ {
+ NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
+ [pasteboard declareTypes:[NSArray arrayWithObject:NSPasteboardTypeString] owner:nil];
+ [pasteboard setString:[NSString stringWithUTF8String:str] forType:NSPasteboardTypeString];
+ };
+
+ io.GetClipboardTextFn = [](void*) -> const char*
+ {
+ NSPasteboard* pasteboard = [NSPasteboard generalPasteboard];
+ NSString* available = [pasteboard availableTypeFromArray: [NSArray arrayWithObject:NSPasteboardTypeString]];
+ if (![available isEqualToString:NSPasteboardTypeString])
+ return NULL;
+
+ NSString* string = [pasteboard stringForType:NSPasteboardTypeString];
+ if (string == nil)
+ return NULL;
+
+ const char* string_c = (const char*)[string UTF8String];
+ size_t string_len = strlen(string_c);
+ static ImVector s_clipboard;
+ s_clipboard.resize((int)string_len + 1);
+ strcpy(s_clipboard.Data, string_c);
+ return s_clipboard.Data;
+ };
+
+ return true;
+}
+
+void ImGui_ImplOSX_Shutdown()
+{
+}
+
+void ImGui_ImplOSX_NewFrame(NSView* view)
+{
+ // Setup display size
+ ImGuiIO& io = ImGui::GetIO();
+ const float dpi = [view.window backingScaleFactor];
+ io.DisplaySize = ImVec2((float)view.bounds.size.width, (float)view.bounds.size.height);
+ io.DisplayFramebufferScale = ImVec2(dpi, dpi);
+
+ // Setup time step
+ if (g_Time == 0.0)
+ g_Time = CFAbsoluteTimeGetCurrent();
+ CFAbsoluteTime current_time = CFAbsoluteTimeGetCurrent();
+ io.DeltaTime = current_time - g_Time;
+ g_Time = current_time;
+}
+
+static int mapCharacterToKey(int c)
+{
+ if (c >= 'a' && c <= 'z')
+ return c - 'a' + 'A';
+ if (c == 25) // SHIFT+TAB -> TAB
+ return 9;
+ if (c >= 0 && c < 256)
+ return c;
+ if (c >= 0xF700 && c < 0xF700 + 256)
+ return c - 0xF700 + 256;
+ return -1;
+}
+
+static void resetKeys()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ for (int n = 0; n < IM_ARRAYSIZE(io.KeysDown); n++)
+ io.KeysDown[n] = false;
+}
+
+bool ImGui_ImplOSX_HandleEvent(NSEvent* event, NSView* view)
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ if (event.type == NSEventTypeLeftMouseDown || event.type == NSEventTypeRightMouseDown || event.type == NSEventTypeOtherMouseDown)
+ {
+ int button = (int)[event buttonNumber];
+ if (button >= 0 && button < IM_ARRAYSIZE(io.MouseDown))
+ io.MouseDown[button] = true;
+ return io.WantCaptureMouse;
+ }
+
+ if (event.type == NSEventTypeLeftMouseUp || event.type == NSEventTypeRightMouseUp || event.type == NSEventTypeOtherMouseUp)
+ {
+ int button = (int)[event buttonNumber];
+ if (button >= 0 && button < IM_ARRAYSIZE(io.MouseDown))
+ io.MouseDown[button] = false;
+ return io.WantCaptureMouse;
+ }
+
+ if (event.type == NSEventTypeMouseMoved || event.type == NSEventTypeLeftMouseDragged)
+ {
+ NSPoint mousePoint = event.locationInWindow;
+ mousePoint = [view convertPoint:mousePoint fromView:nil];
+ mousePoint = NSMakePoint(mousePoint.x, view.bounds.size.height - mousePoint.y);
+ io.MousePos = ImVec2(mousePoint.x, mousePoint.y);
+ }
+
+ if (event.type == NSEventTypeScrollWheel)
+ {
+ double wheel_dx = 0.0;
+ double wheel_dy = 0.0;
+
+ #if MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
+ if (floor(NSAppKitVersionNumber) > NSAppKitVersionNumber10_6)
+ {
+ wheel_dx = [event scrollingDeltaX];
+ wheel_dy = [event scrollingDeltaY];
+ if ([event hasPreciseScrollingDeltas])
+ {
+ wheel_dx *= 0.1;
+ wheel_dy *= 0.1;
+ }
+ }
+ else
+ #endif /*MAC_OS_X_VERSION_MAX_ALLOWED*/
+ {
+ wheel_dx = [event deltaX];
+ wheel_dy = [event deltaY];
+ }
+
+ if (fabs(wheel_dx) > 0.0)
+ io.MouseWheelH += wheel_dx * 0.1f;
+ if (fabs(wheel_dy) > 0.0)
+ io.MouseWheel += wheel_dy * 0.1f;
+ return io.WantCaptureMouse;
+ }
+
+ // FIXME: All the key handling is wrong and broken. Refer to GLFW's cocoa_init.mm and cocoa_window.mm.
+ if (event.type == NSEventTypeKeyDown)
+ {
+ NSString* str = [event characters];
+ int len = (int)[str length];
+ for (int i = 0; i < len; i++)
+ {
+ int c = [str characterAtIndex:i];
+ if (c < 0xF700 && !io.KeyCtrl)
+ io.AddInputCharacter((unsigned short)c);
+
+ // We must reset in case we're pressing a sequence of special keys while keeping the command pressed
+ int key = mapCharacterToKey(c);
+ if (key != -1 && key < 256 && !io.KeyCtrl)
+ resetKeys();
+ if (key != -1)
+ io.KeysDown[key] = true;
+ }
+ return io.WantCaptureKeyboard;
+ }
+
+ if (event.type == NSEventTypeKeyUp)
+ {
+ NSString* str = [event characters];
+ int len = (int)[str length];
+ for (int i = 0; i < len; i++)
+ {
+ int c = [str characterAtIndex:i];
+ int key = mapCharacterToKey(c);
+ if (key != -1)
+ io.KeysDown[key] = false;
+ }
+ return io.WantCaptureKeyboard;
+ }
+
+ if (event.type == NSEventTypeFlagsChanged)
+ {
+ ImGuiIO& io = ImGui::GetIO();
+ unsigned int flags = [event modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask;
+
+ bool oldKeyCtrl = io.KeyCtrl;
+ bool oldKeyShift = io.KeyShift;
+ bool oldKeyAlt = io.KeyAlt;
+ bool oldKeySuper = io.KeySuper;
+ io.KeyCtrl = flags & NSEventModifierFlagControl;
+ io.KeyShift = flags & NSEventModifierFlagShift;
+ io.KeyAlt = flags & NSEventModifierFlagOption;
+ io.KeySuper = flags & NSEventModifierFlagCommand;
+
+ // We must reset them as we will not receive any keyUp event if they where pressed with a modifier
+ if ((oldKeyShift && !io.KeyShift) || (oldKeyCtrl && !io.KeyCtrl) || (oldKeyAlt && !io.KeyAlt) || (oldKeySuper && !io.KeySuper))
+ resetKeys();
+ return io.WantCaptureKeyboard;
+ }
+
+ return false;
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_sdl.cpp b/3rdparty/imgui/examples/imgui_impl_sdl.cpp
new file mode 100644
index 00000000..21f8df71
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_sdl.cpp
@@ -0,0 +1,284 @@
+// dear imgui: Platform Binding for SDL2
+// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
+// (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
+
+// Implemented features:
+// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
+// [X] Platform: Clipboard support.
+// [X] Platform: Keyboard arrays indexed using SDL_SCANCODE_* codes, e.g. ImGui::IsKeyPressed(SDL_SCANCODE_SPACE).
+// Missing features:
+// [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME.
+// [ ] Platform: Gamepad support (need to use SDL_GameController API to fill the io.NavInputs[] value when ImGuiConfigFlags_NavEnableGamepad is set).
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-08-01: Inputs: Workaround for Emscripten which doesn't seem to handle focus related calls.
+// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
+// 2018-06-08: Misc: Extracted imgui_impl_sdl.cpp/.h away from the old combined SDL2+OpenGL/Vulkan examples.
+// 2018-06-08: Misc: ImGui_ImplSDL2_InitForOpenGL() now takes a SDL_GLContext parameter.
+// 2018-05-09: Misc: Fixed clipboard paste memory leak (we didn't call SDL_FreeMemory on the data returned by SDL_GetClipboardText).
+// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors flag + honor ImGuiConfigFlags_NoMouseCursorChange flag.
+// 2018-02-16: Inputs: Added support for mouse cursors, honoring ImGui::GetMouseCursor() value.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
+// 2018-02-05: Misc: Using SDL_GetPerformanceCounter() instead of SDL_GetTicks() to be able to handle very high framerate (1000+ FPS).
+// 2018-02-05: Inputs: Keyboard mapping is using scancodes everywhere instead of a confusing mixture of keycodes and scancodes.
+// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
+// 2018-01-19: Inputs: When available (SDL 2.0.4+) using SDL_CaptureMouse() to retrieve coordinates outside of client area when dragging. Otherwise (SDL 2.0.3 and before) testing for SDL_WINDOW_INPUT_FOCUS instead of SDL_WINDOW_MOUSE_FOCUS.
+// 2018-01-18: Inputs: Added mapping for ImGuiKey_Insert.
+// 2017-08-25: Inputs: MousePos set to -FLT_MAX,-FLT_MAX when mouse is unavailable/missing (instead of -1,-1).
+// 2016-10-15: Misc: Added a void* user_data parameter to Clipboard function handlers.
+
+#include "imgui.h"
+#include "imgui_impl_sdl.h"
+
+// SDL
+// (the multi-viewports feature requires SDL features supported from SDL 2.0.5+)
+#include
+#include
+
+#define SDL_HAS_CAPTURE_MOUSE SDL_VERSION_ATLEAST(2,0,4)
+#define SDL_HAS_VULKAN SDL_VERSION_ATLEAST(2,0,6)
+#define SDL_HAS_MOUSE_FOCUS_CLICKTHROUGH SDL_VERSION_ATLEAST(2,0,5)
+#if !SDL_HAS_VULKAN
+static const Uint32 SDL_WINDOW_VULKAN = 0x10000000;
+#endif
+
+// Data
+static SDL_Window* g_Window = NULL;
+static Uint64 g_Time = 0;
+static bool g_MousePressed[3] = { false, false, false };
+static SDL_Cursor* g_MouseCursors[ImGuiMouseCursor_COUNT] = { 0 };
+static char* g_ClipboardTextData = NULL;
+
+static const char* ImGui_ImplSDL2_GetClipboardText(void*)
+{
+ if (g_ClipboardTextData)
+ SDL_free(g_ClipboardTextData);
+ g_ClipboardTextData = SDL_GetClipboardText();
+ return g_ClipboardTextData;
+}
+
+static void ImGui_ImplSDL2_SetClipboardText(void*, const char* text)
+{
+ SDL_SetClipboardText(text);
+}
+
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+bool ImGui_ImplSDL2_ProcessEvent(SDL_Event* event)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ switch (event->type)
+ {
+ case SDL_MOUSEWHEEL:
+ {
+ if (event->wheel.x > 0) io.MouseWheelH += 1;
+ if (event->wheel.x < 0) io.MouseWheelH -= 1;
+ if (event->wheel.y > 0) io.MouseWheel += 1;
+ if (event->wheel.y < 0) io.MouseWheel -= 1;
+ return true;
+ }
+ case SDL_MOUSEBUTTONDOWN:
+ {
+ if (event->button.button == SDL_BUTTON_LEFT) g_MousePressed[0] = true;
+ if (event->button.button == SDL_BUTTON_RIGHT) g_MousePressed[1] = true;
+ if (event->button.button == SDL_BUTTON_MIDDLE) g_MousePressed[2] = true;
+ return true;
+ }
+ case SDL_TEXTINPUT:
+ {
+ io.AddInputCharactersUTF8(event->text.text);
+ return true;
+ }
+ case SDL_KEYDOWN:
+ case SDL_KEYUP:
+ {
+ int key = event->key.keysym.scancode;
+ IM_ASSERT(key >= 0 && key < IM_ARRAYSIZE(io.KeysDown));
+ io.KeysDown[key] = (event->type == SDL_KEYDOWN);
+ io.KeyShift = ((SDL_GetModState() & KMOD_SHIFT) != 0);
+ io.KeyCtrl = ((SDL_GetModState() & KMOD_CTRL) != 0);
+ io.KeyAlt = ((SDL_GetModState() & KMOD_ALT) != 0);
+ io.KeySuper = ((SDL_GetModState() & KMOD_GUI) != 0);
+ return true;
+ }
+ }
+ return false;
+}
+
+static bool ImGui_ImplSDL2_Init(SDL_Window* window)
+{
+ g_Window = window;
+
+ // Setup back-end capabilities flags
+ ImGuiIO& io = ImGui::GetIO();
+ io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
+ io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
+
+ // Keyboard mapping. ImGui will use those indices to peek into the io.KeysDown[] array.
+ io.KeyMap[ImGuiKey_Tab] = SDL_SCANCODE_TAB;
+ io.KeyMap[ImGuiKey_LeftArrow] = SDL_SCANCODE_LEFT;
+ io.KeyMap[ImGuiKey_RightArrow] = SDL_SCANCODE_RIGHT;
+ io.KeyMap[ImGuiKey_UpArrow] = SDL_SCANCODE_UP;
+ io.KeyMap[ImGuiKey_DownArrow] = SDL_SCANCODE_DOWN;
+ io.KeyMap[ImGuiKey_PageUp] = SDL_SCANCODE_PAGEUP;
+ io.KeyMap[ImGuiKey_PageDown] = SDL_SCANCODE_PAGEDOWN;
+ io.KeyMap[ImGuiKey_Home] = SDL_SCANCODE_HOME;
+ io.KeyMap[ImGuiKey_End] = SDL_SCANCODE_END;
+ io.KeyMap[ImGuiKey_Insert] = SDL_SCANCODE_INSERT;
+ io.KeyMap[ImGuiKey_Delete] = SDL_SCANCODE_DELETE;
+ io.KeyMap[ImGuiKey_Backspace] = SDL_SCANCODE_BACKSPACE;
+ io.KeyMap[ImGuiKey_Space] = SDL_SCANCODE_SPACE;
+ io.KeyMap[ImGuiKey_Enter] = SDL_SCANCODE_RETURN;
+ io.KeyMap[ImGuiKey_Escape] = SDL_SCANCODE_ESCAPE;
+ io.KeyMap[ImGuiKey_A] = SDL_SCANCODE_A;
+ io.KeyMap[ImGuiKey_C] = SDL_SCANCODE_C;
+ io.KeyMap[ImGuiKey_V] = SDL_SCANCODE_V;
+ io.KeyMap[ImGuiKey_X] = SDL_SCANCODE_X;
+ io.KeyMap[ImGuiKey_Y] = SDL_SCANCODE_Y;
+ io.KeyMap[ImGuiKey_Z] = SDL_SCANCODE_Z;
+
+ io.SetClipboardTextFn = ImGui_ImplSDL2_SetClipboardText;
+ io.GetClipboardTextFn = ImGui_ImplSDL2_GetClipboardText;
+ io.ClipboardUserData = NULL;
+
+ g_MouseCursors[ImGuiMouseCursor_Arrow] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_ARROW);
+ g_MouseCursors[ImGuiMouseCursor_TextInput] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_IBEAM);
+ g_MouseCursors[ImGuiMouseCursor_ResizeAll] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZEALL);
+ g_MouseCursors[ImGuiMouseCursor_ResizeNS] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENS);
+ g_MouseCursors[ImGuiMouseCursor_ResizeEW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZEWE);
+ g_MouseCursors[ImGuiMouseCursor_ResizeNESW] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENESW);
+ g_MouseCursors[ImGuiMouseCursor_ResizeNWSE] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_SIZENWSE);
+ g_MouseCursors[ImGuiMouseCursor_Hand] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
+
+#ifdef _WIN32
+ SDL_SysWMinfo wmInfo;
+ SDL_VERSION(&wmInfo.version);
+ SDL_GetWindowWMInfo(window, &wmInfo);
+ io.ImeWindowHandle = wmInfo.info.win.window;
+#else
+ (void)window;
+#endif
+
+ return true;
+}
+
+bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context)
+{
+ (void)sdl_gl_context; // Viewport branch will need this.
+ return ImGui_ImplSDL2_Init(window);
+}
+
+bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window)
+{
+ #if !SDL_HAS_VULKAN
+ IM_ASSERT(0 && "Unsupported");
+ #endif
+ return ImGui_ImplSDL2_Init(window);
+}
+
+void ImGui_ImplSDL2_Shutdown()
+{
+ g_Window = NULL;
+
+ // Destroy last known clipboard data
+ if (g_ClipboardTextData)
+ SDL_free(g_ClipboardTextData);
+ g_ClipboardTextData = NULL;
+
+ // Destroy SDL mouse cursors
+ for (ImGuiMouseCursor cursor_n = 0; cursor_n < ImGuiMouseCursor_COUNT; cursor_n++)
+ SDL_FreeCursor(g_MouseCursors[cursor_n]);
+ memset(g_MouseCursors, 0, sizeof(g_MouseCursors));
+}
+
+static void ImGui_ImplSDL2_UpdateMousePosAndButtons()
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ // Set OS mouse position if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user)
+ if (io.WantSetMousePos)
+ SDL_WarpMouseInWindow(g_Window, (int)io.MousePos.x, (int)io.MousePos.y);
+ else
+ io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
+
+ int mx, my;
+ Uint32 mouse_buttons = SDL_GetMouseState(&mx, &my);
+ io.MouseDown[0] = g_MousePressed[0] || (mouse_buttons & SDL_BUTTON(SDL_BUTTON_LEFT)) != 0; // If a mouse press event came, always pass it as "mouse held this frame", so we don't miss click-release events that are shorter than 1 frame.
+ io.MouseDown[1] = g_MousePressed[1] || (mouse_buttons & SDL_BUTTON(SDL_BUTTON_RIGHT)) != 0;
+ io.MouseDown[2] = g_MousePressed[2] || (mouse_buttons & SDL_BUTTON(SDL_BUTTON_MIDDLE)) != 0;
+ g_MousePressed[0] = g_MousePressed[1] = g_MousePressed[2] = false;
+
+#if SDL_HAS_CAPTURE_MOUSE && !defined(__EMSCRIPTEN__)
+ SDL_Window* focused_window = SDL_GetKeyboardFocus();
+ if (g_Window == focused_window)
+ {
+ // SDL_GetMouseState() gives mouse position seemingly based on the last window entered/focused(?)
+ // The creation of a new windows at runtime and SDL_CaptureMouse both seems to severely mess up with that, so we retrieve that position globally.
+ int wx, wy;
+ SDL_GetWindowPosition(focused_window, &wx, &wy);
+ SDL_GetGlobalMouseState(&mx, &my);
+ mx -= wx;
+ my -= wy;
+ io.MousePos = ImVec2((float)mx, (float)my);
+ }
+
+ // SDL_CaptureMouse() let the OS know e.g. that our imgui drag outside the SDL window boundaries shouldn't e.g. trigger the OS window resize cursor.
+ // The function is only supported from SDL 2.0.4 (released Jan 2016)
+ bool any_mouse_button_down = ImGui::IsAnyMouseDown();
+ SDL_CaptureMouse(any_mouse_button_down ? SDL_TRUE : SDL_FALSE);
+#else
+ if (SDL_GetWindowFlags(g_Window) & SDL_WINDOW_INPUT_FOCUS)
+ io.MousePos = ImVec2((float)mx, (float)my);
+#endif
+}
+
+static void ImGui_ImplSDL2_UpdateMouseCursor()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
+ return;
+
+ ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
+ if (io.MouseDrawCursor || imgui_cursor == ImGuiMouseCursor_None)
+ {
+ // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
+ SDL_ShowCursor(SDL_FALSE);
+ }
+ else
+ {
+ // Show OS mouse cursor
+ SDL_SetCursor(g_MouseCursors[imgui_cursor] ? g_MouseCursors[imgui_cursor] : g_MouseCursors[ImGuiMouseCursor_Arrow]);
+ SDL_ShowCursor(SDL_TRUE);
+ }
+}
+
+void ImGui_ImplSDL2_NewFrame(SDL_Window* window)
+{
+ ImGuiIO& io = ImGui::GetIO();
+ IM_ASSERT(io.Fonts->IsBuilt()); // Font atlas needs to be built, call renderer _NewFrame() function e.g. ImGui_ImplOpenGL3_NewFrame()
+
+ // Setup display size (every frame to accommodate for window resizing)
+ int w, h;
+ int display_w, display_h;
+ SDL_GetWindowSize(window, &w, &h);
+ SDL_GL_GetDrawableSize(window, &display_w, &display_h);
+ io.DisplaySize = ImVec2((float)w, (float)h);
+ io.DisplayFramebufferScale = ImVec2(w > 0 ? ((float)display_w / w) : 0, h > 0 ? ((float)display_h / h) : 0);
+
+ // Setup time step (we don't use SDL_GetTicks() because it is using millisecond resolution)
+ static Uint64 frequency = SDL_GetPerformanceFrequency();
+ Uint64 current_time = SDL_GetPerformanceCounter();
+ io.DeltaTime = g_Time > 0 ? (float)((double)(current_time - g_Time) / frequency) : (float)(1.0f / 60.0f);
+ g_Time = current_time;
+
+ ImGui_ImplSDL2_UpdateMousePosAndButtons();
+ ImGui_ImplSDL2_UpdateMouseCursor();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_sdl.h b/3rdparty/imgui/examples/imgui_impl_sdl.h
new file mode 100644
index 00000000..7fb2b864
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_sdl.h
@@ -0,0 +1,24 @@
+// dear imgui: Platform Binding for SDL2
+// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
+// (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.)
+
+// Implemented features:
+// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
+// [X] Platform: Clipboard support.
+// [X] Platform: Keyboard arrays indexed using SDL_SCANCODE_* codes, e.g. ImGui::IsKeyPressed(SDL_SCANCODE_SPACE).
+// Missing features:
+// [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME.
+// [ ] Platform: Gamepad support (need to use SDL_GameController API to fill the io.NavInputs[] value when ImGuiConfigFlags_NavEnableGamepad is set).
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+struct SDL_Window;
+typedef union SDL_Event SDL_Event;
+
+IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context);
+IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window);
+IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(SDL_Window* window);
+IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(SDL_Event* event);
diff --git a/3rdparty/imgui/examples/imgui_impl_vulkan.cpp b/3rdparty/imgui/examples/imgui_impl_vulkan.cpp
new file mode 100644
index 00000000..c1d10301
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_vulkan.cpp
@@ -0,0 +1,1066 @@
+// dear imgui: Renderer for Vulkan
+// This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..)
+
+// Missing features:
+// [ ] Renderer: User texture binding. Changes of ImTextureID aren't supported by this binding! See https://github.com/ocornut/imgui/pull/914
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// The aim of imgui_impl_vulkan.h/.cpp is to be usable in your engine without any modification.
+// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-08-25: Vulkan: Fixed mishandled VkSurfaceCapabilitiesKHR::maxImageCount=0 case.
+// 2018-06-22: Inverted the parameters to ImGui_ImplVulkan_RenderDrawData() to be consistent with other bindings.
+// 2018-06-08: Misc: Extracted imgui_impl_vulkan.cpp/.h away from the old combined GLFW+Vulkan example.
+// 2018-06-08: Vulkan: Use draw_data->DisplayPos and draw_data->DisplaySize to setup projection matrix and clipping rectangle.
+// 2018-03-03: Vulkan: Various refactor, created a couple of ImGui_ImplVulkanH_XXX helper that the example can use and that viewport support will use.
+// 2018-03-01: Vulkan: Renamed ImGui_ImplVulkan_Init_Info to ImGui_ImplVulkan_InitInfo and fields to match more closely Vulkan terminology.
+// 2018-02-16: Misc: Obsoleted the io.RenderDrawListsFn callback, ImGui_ImplVulkan_Render() calls ImGui_ImplVulkan_RenderDrawData() itself.
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2017-05-15: Vulkan: Fix scissor offset being negative. Fix new Vulkan validation warnings. Set required depth member for buffer image copy.
+// 2016-11-13: Vulkan: Fix validation layer warnings and errors and redeclare gl_PerVertex.
+// 2016-10-18: Vulkan: Add location decorators & change to use structs as in/out in glsl, update embedded spv (produced with glslangValidator -x). Null the released resources.
+// 2016-08-27: Vulkan: Fix Vulkan example for use when a depth buffer is active.
+
+#include "imgui.h"
+#include "imgui_impl_vulkan.h"
+#include
+
+// Vulkan data
+static const VkAllocationCallbacks* g_Allocator = NULL;
+static VkPhysicalDevice g_PhysicalDevice = VK_NULL_HANDLE;
+static VkInstance g_Instance = VK_NULL_HANDLE;
+static VkDevice g_Device = VK_NULL_HANDLE;
+static uint32_t g_QueueFamily = (uint32_t)-1;
+static VkQueue g_Queue = VK_NULL_HANDLE;
+static VkPipelineCache g_PipelineCache = VK_NULL_HANDLE;
+static VkDescriptorPool g_DescriptorPool = VK_NULL_HANDLE;
+static VkRenderPass g_RenderPass = VK_NULL_HANDLE;
+static void (*g_CheckVkResultFn)(VkResult err) = NULL;
+
+static VkDeviceSize g_BufferMemoryAlignment = 256;
+static VkPipelineCreateFlags g_PipelineCreateFlags = 0;
+
+static VkDescriptorSetLayout g_DescriptorSetLayout = VK_NULL_HANDLE;
+static VkPipelineLayout g_PipelineLayout = VK_NULL_HANDLE;
+static VkDescriptorSet g_DescriptorSet = VK_NULL_HANDLE;
+static VkPipeline g_Pipeline = VK_NULL_HANDLE;
+
+// Frame data
+struct FrameDataForRender
+{
+ VkDeviceMemory VertexBufferMemory;
+ VkDeviceMemory IndexBufferMemory;
+ VkDeviceSize VertexBufferSize;
+ VkDeviceSize IndexBufferSize;
+ VkBuffer VertexBuffer;
+ VkBuffer IndexBuffer;
+};
+static int g_FrameIndex = 0;
+static FrameDataForRender g_FramesDataBuffers[IMGUI_VK_QUEUED_FRAMES] = {};
+
+// Font data
+static VkSampler g_FontSampler = VK_NULL_HANDLE;
+static VkDeviceMemory g_FontMemory = VK_NULL_HANDLE;
+static VkImage g_FontImage = VK_NULL_HANDLE;
+static VkImageView g_FontView = VK_NULL_HANDLE;
+static VkDeviceMemory g_UploadBufferMemory = VK_NULL_HANDLE;
+static VkBuffer g_UploadBuffer = VK_NULL_HANDLE;
+
+// glsl_shader.vert, compiled with:
+// # glslangValidator -V -x -o glsl_shader.vert.u32 glsl_shader.vert
+static uint32_t __glsl_shader_vert_spv[] =
+{
+ 0x07230203,0x00010000,0x00080001,0x0000002e,0x00000000,0x00020011,0x00000001,0x0006000b,
+ 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
+ 0x000a000f,0x00000000,0x00000004,0x6e69616d,0x00000000,0x0000000b,0x0000000f,0x00000015,
+ 0x0000001b,0x0000001c,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d,
+ 0x00000000,0x00030005,0x00000009,0x00000000,0x00050006,0x00000009,0x00000000,0x6f6c6f43,
+ 0x00000072,0x00040006,0x00000009,0x00000001,0x00005655,0x00030005,0x0000000b,0x0074754f,
+ 0x00040005,0x0000000f,0x6c6f4361,0x0000726f,0x00030005,0x00000015,0x00565561,0x00060005,
+ 0x00000019,0x505f6c67,0x65567265,0x78657472,0x00000000,0x00060006,0x00000019,0x00000000,
+ 0x505f6c67,0x7469736f,0x006e6f69,0x00030005,0x0000001b,0x00000000,0x00040005,0x0000001c,
+ 0x736f5061,0x00000000,0x00060005,0x0000001e,0x73755075,0x6e6f4368,0x6e617473,0x00000074,
+ 0x00050006,0x0000001e,0x00000000,0x61635375,0x0000656c,0x00060006,0x0000001e,0x00000001,
+ 0x61725475,0x616c736e,0x00006574,0x00030005,0x00000020,0x00006370,0x00040047,0x0000000b,
+ 0x0000001e,0x00000000,0x00040047,0x0000000f,0x0000001e,0x00000002,0x00040047,0x00000015,
+ 0x0000001e,0x00000001,0x00050048,0x00000019,0x00000000,0x0000000b,0x00000000,0x00030047,
+ 0x00000019,0x00000002,0x00040047,0x0000001c,0x0000001e,0x00000000,0x00050048,0x0000001e,
+ 0x00000000,0x00000023,0x00000000,0x00050048,0x0000001e,0x00000001,0x00000023,0x00000008,
+ 0x00030047,0x0000001e,0x00000002,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,
+ 0x00030016,0x00000006,0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040017,
+ 0x00000008,0x00000006,0x00000002,0x0004001e,0x00000009,0x00000007,0x00000008,0x00040020,
+ 0x0000000a,0x00000003,0x00000009,0x0004003b,0x0000000a,0x0000000b,0x00000003,0x00040015,
+ 0x0000000c,0x00000020,0x00000001,0x0004002b,0x0000000c,0x0000000d,0x00000000,0x00040020,
+ 0x0000000e,0x00000001,0x00000007,0x0004003b,0x0000000e,0x0000000f,0x00000001,0x00040020,
+ 0x00000011,0x00000003,0x00000007,0x0004002b,0x0000000c,0x00000013,0x00000001,0x00040020,
+ 0x00000014,0x00000001,0x00000008,0x0004003b,0x00000014,0x00000015,0x00000001,0x00040020,
+ 0x00000017,0x00000003,0x00000008,0x0003001e,0x00000019,0x00000007,0x00040020,0x0000001a,
+ 0x00000003,0x00000019,0x0004003b,0x0000001a,0x0000001b,0x00000003,0x0004003b,0x00000014,
+ 0x0000001c,0x00000001,0x0004001e,0x0000001e,0x00000008,0x00000008,0x00040020,0x0000001f,
+ 0x00000009,0x0000001e,0x0004003b,0x0000001f,0x00000020,0x00000009,0x00040020,0x00000021,
+ 0x00000009,0x00000008,0x0004002b,0x00000006,0x00000028,0x00000000,0x0004002b,0x00000006,
+ 0x00000029,0x3f800000,0x00050036,0x00000002,0x00000004,0x00000000,0x00000003,0x000200f8,
+ 0x00000005,0x0004003d,0x00000007,0x00000010,0x0000000f,0x00050041,0x00000011,0x00000012,
+ 0x0000000b,0x0000000d,0x0003003e,0x00000012,0x00000010,0x0004003d,0x00000008,0x00000016,
+ 0x00000015,0x00050041,0x00000017,0x00000018,0x0000000b,0x00000013,0x0003003e,0x00000018,
+ 0x00000016,0x0004003d,0x00000008,0x0000001d,0x0000001c,0x00050041,0x00000021,0x00000022,
+ 0x00000020,0x0000000d,0x0004003d,0x00000008,0x00000023,0x00000022,0x00050085,0x00000008,
+ 0x00000024,0x0000001d,0x00000023,0x00050041,0x00000021,0x00000025,0x00000020,0x00000013,
+ 0x0004003d,0x00000008,0x00000026,0x00000025,0x00050081,0x00000008,0x00000027,0x00000024,
+ 0x00000026,0x00050051,0x00000006,0x0000002a,0x00000027,0x00000000,0x00050051,0x00000006,
+ 0x0000002b,0x00000027,0x00000001,0x00070050,0x00000007,0x0000002c,0x0000002a,0x0000002b,
+ 0x00000028,0x00000029,0x00050041,0x00000011,0x0000002d,0x0000001b,0x0000000d,0x0003003e,
+ 0x0000002d,0x0000002c,0x000100fd,0x00010038
+};
+
+// glsl_shader.frag, compiled with:
+// # glslangValidator -V -x -o glsl_shader.frag.u32 glsl_shader.frag
+static uint32_t __glsl_shader_frag_spv[] =
+{
+ 0x07230203,0x00010000,0x00080001,0x0000001e,0x00000000,0x00020011,0x00000001,0x0006000b,
+ 0x00000001,0x4c534c47,0x6474732e,0x3035342e,0x00000000,0x0003000e,0x00000000,0x00000001,
+ 0x0007000f,0x00000004,0x00000004,0x6e69616d,0x00000000,0x00000009,0x0000000d,0x00030010,
+ 0x00000004,0x00000007,0x00030003,0x00000002,0x000001c2,0x00040005,0x00000004,0x6e69616d,
+ 0x00000000,0x00040005,0x00000009,0x6c6f4366,0x0000726f,0x00030005,0x0000000b,0x00000000,
+ 0x00050006,0x0000000b,0x00000000,0x6f6c6f43,0x00000072,0x00040006,0x0000000b,0x00000001,
+ 0x00005655,0x00030005,0x0000000d,0x00006e49,0x00050005,0x00000016,0x78655473,0x65727574,
+ 0x00000000,0x00040047,0x00000009,0x0000001e,0x00000000,0x00040047,0x0000000d,0x0000001e,
+ 0x00000000,0x00040047,0x00000016,0x00000022,0x00000000,0x00040047,0x00000016,0x00000021,
+ 0x00000000,0x00020013,0x00000002,0x00030021,0x00000003,0x00000002,0x00030016,0x00000006,
+ 0x00000020,0x00040017,0x00000007,0x00000006,0x00000004,0x00040020,0x00000008,0x00000003,
+ 0x00000007,0x0004003b,0x00000008,0x00000009,0x00000003,0x00040017,0x0000000a,0x00000006,
+ 0x00000002,0x0004001e,0x0000000b,0x00000007,0x0000000a,0x00040020,0x0000000c,0x00000001,
+ 0x0000000b,0x0004003b,0x0000000c,0x0000000d,0x00000001,0x00040015,0x0000000e,0x00000020,
+ 0x00000001,0x0004002b,0x0000000e,0x0000000f,0x00000000,0x00040020,0x00000010,0x00000001,
+ 0x00000007,0x00090019,0x00000013,0x00000006,0x00000001,0x00000000,0x00000000,0x00000000,
+ 0x00000001,0x00000000,0x0003001b,0x00000014,0x00000013,0x00040020,0x00000015,0x00000000,
+ 0x00000014,0x0004003b,0x00000015,0x00000016,0x00000000,0x0004002b,0x0000000e,0x00000018,
+ 0x00000001,0x00040020,0x00000019,0x00000001,0x0000000a,0x00050036,0x00000002,0x00000004,
+ 0x00000000,0x00000003,0x000200f8,0x00000005,0x00050041,0x00000010,0x00000011,0x0000000d,
+ 0x0000000f,0x0004003d,0x00000007,0x00000012,0x00000011,0x0004003d,0x00000014,0x00000017,
+ 0x00000016,0x00050041,0x00000019,0x0000001a,0x0000000d,0x00000018,0x0004003d,0x0000000a,
+ 0x0000001b,0x0000001a,0x00050057,0x00000007,0x0000001c,0x00000017,0x0000001b,0x00050085,
+ 0x00000007,0x0000001d,0x00000012,0x0000001c,0x0003003e,0x00000009,0x0000001d,0x000100fd,
+ 0x00010038
+};
+
+static uint32_t ImGui_ImplVulkan_MemoryType(VkMemoryPropertyFlags properties, uint32_t type_bits)
+{
+ VkPhysicalDeviceMemoryProperties prop;
+ vkGetPhysicalDeviceMemoryProperties(g_PhysicalDevice, &prop);
+ for (uint32_t i = 0; i < prop.memoryTypeCount; i++)
+ if ((prop.memoryTypes[i].propertyFlags & properties) == properties && type_bits & (1< req.alignment) ? g_BufferMemoryAlignment : req.alignment;
+ VkMemoryAllocateInfo alloc_info = {};
+ alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
+ alloc_info.allocationSize = req.size;
+ alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, req.memoryTypeBits);
+ err = vkAllocateMemory(g_Device, &alloc_info, g_Allocator, &buffer_memory);
+ check_vk_result(err);
+
+ err = vkBindBufferMemory(g_Device, buffer, buffer_memory, 0);
+ check_vk_result(err);
+ p_buffer_size = new_size;
+}
+
+// Render function
+// (this used to be set in io.RenderDrawListsFn and called by ImGui::Render(), but you can now call this directly from your main loop)
+void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer)
+{
+ VkResult err;
+ if (draw_data->TotalVtxCount == 0)
+ return;
+
+ FrameDataForRender* fd = &g_FramesDataBuffers[g_FrameIndex];
+ g_FrameIndex = (g_FrameIndex + 1) % IMGUI_VK_QUEUED_FRAMES;
+
+ // Create the Vertex and Index buffers:
+ size_t vertex_size = draw_data->TotalVtxCount * sizeof(ImDrawVert);
+ size_t index_size = draw_data->TotalIdxCount * sizeof(ImDrawIdx);
+ if (!fd->VertexBuffer || fd->VertexBufferSize < vertex_size)
+ CreateOrResizeBuffer(fd->VertexBuffer, fd->VertexBufferMemory, fd->VertexBufferSize, vertex_size, VK_BUFFER_USAGE_VERTEX_BUFFER_BIT);
+ if (!fd->IndexBuffer || fd->IndexBufferSize < index_size)
+ CreateOrResizeBuffer(fd->IndexBuffer, fd->IndexBufferMemory, fd->IndexBufferSize, index_size, VK_BUFFER_USAGE_INDEX_BUFFER_BIT);
+
+ // Upload Vertex and index Data:
+ {
+ ImDrawVert* vtx_dst = NULL;
+ ImDrawIdx* idx_dst = NULL;
+ err = vkMapMemory(g_Device, fd->VertexBufferMemory, 0, vertex_size, 0, (void**)(&vtx_dst));
+ check_vk_result(err);
+ err = vkMapMemory(g_Device, fd->IndexBufferMemory, 0, index_size, 0, (void**)(&idx_dst));
+ check_vk_result(err);
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ memcpy(vtx_dst, cmd_list->VtxBuffer.Data, cmd_list->VtxBuffer.Size * sizeof(ImDrawVert));
+ memcpy(idx_dst, cmd_list->IdxBuffer.Data, cmd_list->IdxBuffer.Size * sizeof(ImDrawIdx));
+ vtx_dst += cmd_list->VtxBuffer.Size;
+ idx_dst += cmd_list->IdxBuffer.Size;
+ }
+ VkMappedMemoryRange range[2] = {};
+ range[0].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
+ range[0].memory = fd->VertexBufferMemory;
+ range[0].size = VK_WHOLE_SIZE;
+ range[1].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
+ range[1].memory = fd->IndexBufferMemory;
+ range[1].size = VK_WHOLE_SIZE;
+ err = vkFlushMappedMemoryRanges(g_Device, 2, range);
+ check_vk_result(err);
+ vkUnmapMemory(g_Device, fd->VertexBufferMemory);
+ vkUnmapMemory(g_Device, fd->IndexBufferMemory);
+ }
+
+ // Bind pipeline and descriptor sets:
+ {
+ vkCmdBindPipeline(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, g_Pipeline);
+ VkDescriptorSet desc_set[1] = { g_DescriptorSet };
+ vkCmdBindDescriptorSets(command_buffer, VK_PIPELINE_BIND_POINT_GRAPHICS, g_PipelineLayout, 0, 1, desc_set, 0, NULL);
+ }
+
+ // Bind Vertex And Index Buffer:
+ {
+ VkBuffer vertex_buffers[1] = { fd->VertexBuffer };
+ VkDeviceSize vertex_offset[1] = { 0 };
+ vkCmdBindVertexBuffers(command_buffer, 0, 1, vertex_buffers, vertex_offset);
+ vkCmdBindIndexBuffer(command_buffer, fd->IndexBuffer, 0, VK_INDEX_TYPE_UINT16);
+ }
+
+ // Setup viewport:
+ {
+ VkViewport viewport;
+ viewport.x = 0;
+ viewport.y = 0;
+ viewport.width = draw_data->DisplaySize.x;
+ viewport.height = draw_data->DisplaySize.y;
+ viewport.minDepth = 0.0f;
+ viewport.maxDepth = 1.0f;
+ vkCmdSetViewport(command_buffer, 0, 1, &viewport);
+ }
+
+ // Setup scale and translation:
+ // Our visible imgui space lies from draw_data->DisplayPos (top left) to draw_data->DisplayPos+data_data->DisplaySize (bottom right). DisplayMin is typically (0,0) for single viewport apps.
+ {
+ float scale[2];
+ scale[0] = 2.0f / draw_data->DisplaySize.x;
+ scale[1] = 2.0f / draw_data->DisplaySize.y;
+ float translate[2];
+ translate[0] = -1.0f - draw_data->DisplayPos.x * scale[0];
+ translate[1] = -1.0f - draw_data->DisplayPos.y * scale[1];
+ vkCmdPushConstants(command_buffer, g_PipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, sizeof(float) * 0, sizeof(float) * 2, scale);
+ vkCmdPushConstants(command_buffer, g_PipelineLayout, VK_SHADER_STAGE_VERTEX_BIT, sizeof(float) * 2, sizeof(float) * 2, translate);
+ }
+
+ // Render the command lists:
+ int vtx_offset = 0;
+ int idx_offset = 0;
+ ImVec2 display_pos = draw_data->DisplayPos;
+ for (int n = 0; n < draw_data->CmdListsCount; n++)
+ {
+ const ImDrawList* cmd_list = draw_data->CmdLists[n];
+ for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++)
+ {
+ const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i];
+ if (pcmd->UserCallback)
+ {
+ pcmd->UserCallback(cmd_list, pcmd);
+ }
+ else
+ {
+ // Apply scissor/clipping rectangle
+ // FIXME: We could clamp width/height based on clamped min/max values.
+ VkRect2D scissor;
+ scissor.offset.x = (int32_t)(pcmd->ClipRect.x - display_pos.x) > 0 ? (int32_t)(pcmd->ClipRect.x - display_pos.x) : 0;
+ scissor.offset.y = (int32_t)(pcmd->ClipRect.y - display_pos.y) > 0 ? (int32_t)(pcmd->ClipRect.y - display_pos.y) : 0;
+ scissor.extent.width = (uint32_t)(pcmd->ClipRect.z - pcmd->ClipRect.x);
+ scissor.extent.height = (uint32_t)(pcmd->ClipRect.w - pcmd->ClipRect.y + 1); // FIXME: Why +1 here?
+ vkCmdSetScissor(command_buffer, 0, 1, &scissor);
+
+ // Draw
+ vkCmdDrawIndexed(command_buffer, pcmd->ElemCount, 1, idx_offset, vtx_offset, 0);
+ }
+ idx_offset += pcmd->ElemCount;
+ }
+ vtx_offset += cmd_list->VtxBuffer.Size;
+ }
+}
+
+bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer)
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ unsigned char* pixels;
+ int width, height;
+ io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height);
+ size_t upload_size = width*height*4*sizeof(char);
+
+ VkResult err;
+
+ // Create the Image:
+ {
+ VkImageCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_IMAGE_CREATE_INFO;
+ info.imageType = VK_IMAGE_TYPE_2D;
+ info.format = VK_FORMAT_R8G8B8A8_UNORM;
+ info.extent.width = width;
+ info.extent.height = height;
+ info.extent.depth = 1;
+ info.mipLevels = 1;
+ info.arrayLayers = 1;
+ info.samples = VK_SAMPLE_COUNT_1_BIT;
+ info.tiling = VK_IMAGE_TILING_OPTIMAL;
+ info.usage = VK_IMAGE_USAGE_SAMPLED_BIT | VK_IMAGE_USAGE_TRANSFER_DST_BIT;
+ info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
+ info.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ err = vkCreateImage(g_Device, &info, g_Allocator, &g_FontImage);
+ check_vk_result(err);
+ VkMemoryRequirements req;
+ vkGetImageMemoryRequirements(g_Device, g_FontImage, &req);
+ VkMemoryAllocateInfo alloc_info = {};
+ alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
+ alloc_info.allocationSize = req.size;
+ alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT, req.memoryTypeBits);
+ err = vkAllocateMemory(g_Device, &alloc_info, g_Allocator, &g_FontMemory);
+ check_vk_result(err);
+ err = vkBindImageMemory(g_Device, g_FontImage, g_FontMemory, 0);
+ check_vk_result(err);
+ }
+
+ // Create the Image View:
+ {
+ VkImageViewCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
+ info.image = g_FontImage;
+ info.viewType = VK_IMAGE_VIEW_TYPE_2D;
+ info.format = VK_FORMAT_R8G8B8A8_UNORM;
+ info.subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ info.subresourceRange.levelCount = 1;
+ info.subresourceRange.layerCount = 1;
+ err = vkCreateImageView(g_Device, &info, g_Allocator, &g_FontView);
+ check_vk_result(err);
+ }
+
+ // Update the Descriptor Set:
+ {
+ VkDescriptorImageInfo desc_image[1] = {};
+ desc_image[0].sampler = g_FontSampler;
+ desc_image[0].imageView = g_FontView;
+ desc_image[0].imageLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+ VkWriteDescriptorSet write_desc[1] = {};
+ write_desc[0].sType = VK_STRUCTURE_TYPE_WRITE_DESCRIPTOR_SET;
+ write_desc[0].dstSet = g_DescriptorSet;
+ write_desc[0].descriptorCount = 1;
+ write_desc[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
+ write_desc[0].pImageInfo = desc_image;
+ vkUpdateDescriptorSets(g_Device, 1, write_desc, 0, NULL);
+ }
+
+ // Create the Upload Buffer:
+ {
+ VkBufferCreateInfo buffer_info = {};
+ buffer_info.sType = VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO;
+ buffer_info.size = upload_size;
+ buffer_info.usage = VK_BUFFER_USAGE_TRANSFER_SRC_BIT;
+ buffer_info.sharingMode = VK_SHARING_MODE_EXCLUSIVE;
+ err = vkCreateBuffer(g_Device, &buffer_info, g_Allocator, &g_UploadBuffer);
+ check_vk_result(err);
+ VkMemoryRequirements req;
+ vkGetBufferMemoryRequirements(g_Device, g_UploadBuffer, &req);
+ g_BufferMemoryAlignment = (g_BufferMemoryAlignment > req.alignment) ? g_BufferMemoryAlignment : req.alignment;
+ VkMemoryAllocateInfo alloc_info = {};
+ alloc_info.sType = VK_STRUCTURE_TYPE_MEMORY_ALLOCATE_INFO;
+ alloc_info.allocationSize = req.size;
+ alloc_info.memoryTypeIndex = ImGui_ImplVulkan_MemoryType(VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT, req.memoryTypeBits);
+ err = vkAllocateMemory(g_Device, &alloc_info, g_Allocator, &g_UploadBufferMemory);
+ check_vk_result(err);
+ err = vkBindBufferMemory(g_Device, g_UploadBuffer, g_UploadBufferMemory, 0);
+ check_vk_result(err);
+ }
+
+ // Upload to Buffer:
+ {
+ char* map = NULL;
+ err = vkMapMemory(g_Device, g_UploadBufferMemory, 0, upload_size, 0, (void**)(&map));
+ check_vk_result(err);
+ memcpy(map, pixels, upload_size);
+ VkMappedMemoryRange range[1] = {};
+ range[0].sType = VK_STRUCTURE_TYPE_MAPPED_MEMORY_RANGE;
+ range[0].memory = g_UploadBufferMemory;
+ range[0].size = upload_size;
+ err = vkFlushMappedMemoryRanges(g_Device, 1, range);
+ check_vk_result(err);
+ vkUnmapMemory(g_Device, g_UploadBufferMemory);
+ }
+
+ // Copy to Image:
+ {
+ VkImageMemoryBarrier copy_barrier[1] = {};
+ copy_barrier[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
+ copy_barrier[0].dstAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
+ copy_barrier[0].oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ copy_barrier[0].newLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
+ copy_barrier[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ copy_barrier[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ copy_barrier[0].image = g_FontImage;
+ copy_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ copy_barrier[0].subresourceRange.levelCount = 1;
+ copy_barrier[0].subresourceRange.layerCount = 1;
+ vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_HOST_BIT, VK_PIPELINE_STAGE_TRANSFER_BIT, 0, 0, NULL, 0, NULL, 1, copy_barrier);
+
+ VkBufferImageCopy region = {};
+ region.imageSubresource.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ region.imageSubresource.layerCount = 1;
+ region.imageExtent.width = width;
+ region.imageExtent.height = height;
+ region.imageExtent.depth = 1;
+ vkCmdCopyBufferToImage(command_buffer, g_UploadBuffer, g_FontImage, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion);
+
+ VkImageMemoryBarrier use_barrier[1] = {};
+ use_barrier[0].sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
+ use_barrier[0].srcAccessMask = VK_ACCESS_TRANSFER_WRITE_BIT;
+ use_barrier[0].dstAccessMask = VK_ACCESS_SHADER_READ_BIT;
+ use_barrier[0].oldLayout = VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL;
+ use_barrier[0].newLayout = VK_IMAGE_LAYOUT_SHADER_READ_ONLY_OPTIMAL;
+ use_barrier[0].srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ use_barrier[0].dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
+ use_barrier[0].image = g_FontImage;
+ use_barrier[0].subresourceRange.aspectMask = VK_IMAGE_ASPECT_COLOR_BIT;
+ use_barrier[0].subresourceRange.levelCount = 1;
+ use_barrier[0].subresourceRange.layerCount = 1;
+ vkCmdPipelineBarrier(command_buffer, VK_PIPELINE_STAGE_TRANSFER_BIT, VK_PIPELINE_STAGE_FRAGMENT_SHADER_BIT, 0, 0, NULL, 0, NULL, 1, use_barrier);
+ }
+
+ // Store our identifier
+ io.Fonts->TexID = (ImTextureID)(intptr_t)g_FontImage;
+
+ return true;
+}
+
+bool ImGui_ImplVulkan_CreateDeviceObjects()
+{
+ VkResult err;
+ VkShaderModule vert_module;
+ VkShaderModule frag_module;
+
+ // Create The Shader Modules:
+ {
+ VkShaderModuleCreateInfo vert_info = {};
+ vert_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
+ vert_info.codeSize = sizeof(__glsl_shader_vert_spv);
+ vert_info.pCode = (uint32_t*)__glsl_shader_vert_spv;
+ err = vkCreateShaderModule(g_Device, &vert_info, g_Allocator, &vert_module);
+ check_vk_result(err);
+ VkShaderModuleCreateInfo frag_info = {};
+ frag_info.sType = VK_STRUCTURE_TYPE_SHADER_MODULE_CREATE_INFO;
+ frag_info.codeSize = sizeof(__glsl_shader_frag_spv);
+ frag_info.pCode = (uint32_t*)__glsl_shader_frag_spv;
+ err = vkCreateShaderModule(g_Device, &frag_info, g_Allocator, &frag_module);
+ check_vk_result(err);
+ }
+
+ if (!g_FontSampler)
+ {
+ VkSamplerCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_SAMPLER_CREATE_INFO;
+ info.magFilter = VK_FILTER_LINEAR;
+ info.minFilter = VK_FILTER_LINEAR;
+ info.mipmapMode = VK_SAMPLER_MIPMAP_MODE_LINEAR;
+ info.addressModeU = VK_SAMPLER_ADDRESS_MODE_REPEAT;
+ info.addressModeV = VK_SAMPLER_ADDRESS_MODE_REPEAT;
+ info.addressModeW = VK_SAMPLER_ADDRESS_MODE_REPEAT;
+ info.minLod = -1000;
+ info.maxLod = 1000;
+ info.maxAnisotropy = 1.0f;
+ err = vkCreateSampler(g_Device, &info, g_Allocator, &g_FontSampler);
+ check_vk_result(err);
+ }
+
+ if (!g_DescriptorSetLayout)
+ {
+ VkSampler sampler[1] = {g_FontSampler};
+ VkDescriptorSetLayoutBinding binding[1] = {};
+ binding[0].descriptorType = VK_DESCRIPTOR_TYPE_COMBINED_IMAGE_SAMPLER;
+ binding[0].descriptorCount = 1;
+ binding[0].stageFlags = VK_SHADER_STAGE_FRAGMENT_BIT;
+ binding[0].pImmutableSamplers = sampler;
+ VkDescriptorSetLayoutCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_LAYOUT_CREATE_INFO;
+ info.bindingCount = 1;
+ info.pBindings = binding;
+ err = vkCreateDescriptorSetLayout(g_Device, &info, g_Allocator, &g_DescriptorSetLayout);
+ check_vk_result(err);
+ }
+
+ // Create Descriptor Set:
+ {
+ VkDescriptorSetAllocateInfo alloc_info = {};
+ alloc_info.sType = VK_STRUCTURE_TYPE_DESCRIPTOR_SET_ALLOCATE_INFO;
+ alloc_info.descriptorPool = g_DescriptorPool;
+ alloc_info.descriptorSetCount = 1;
+ alloc_info.pSetLayouts = &g_DescriptorSetLayout;
+ err = vkAllocateDescriptorSets(g_Device, &alloc_info, &g_DescriptorSet);
+ check_vk_result(err);
+ }
+
+ if (!g_PipelineLayout)
+ {
+ // Constants: we are using 'vec2 offset' and 'vec2 scale' instead of a full 3d projection matrix
+ VkPushConstantRange push_constants[1] = {};
+ push_constants[0].stageFlags = VK_SHADER_STAGE_VERTEX_BIT;
+ push_constants[0].offset = sizeof(float) * 0;
+ push_constants[0].size = sizeof(float) * 4;
+ VkDescriptorSetLayout set_layout[1] = { g_DescriptorSetLayout };
+ VkPipelineLayoutCreateInfo layout_info = {};
+ layout_info.sType = VK_STRUCTURE_TYPE_PIPELINE_LAYOUT_CREATE_INFO;
+ layout_info.setLayoutCount = 1;
+ layout_info.pSetLayouts = set_layout;
+ layout_info.pushConstantRangeCount = 1;
+ layout_info.pPushConstantRanges = push_constants;
+ err = vkCreatePipelineLayout(g_Device, &layout_info, g_Allocator, &g_PipelineLayout);
+ check_vk_result(err);
+ }
+
+ VkPipelineShaderStageCreateInfo stage[2] = {};
+ stage[0].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
+ stage[0].stage = VK_SHADER_STAGE_VERTEX_BIT;
+ stage[0].module = vert_module;
+ stage[0].pName = "main";
+ stage[1].sType = VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO;
+ stage[1].stage = VK_SHADER_STAGE_FRAGMENT_BIT;
+ stage[1].module = frag_module;
+ stage[1].pName = "main";
+
+ VkVertexInputBindingDescription binding_desc[1] = {};
+ binding_desc[0].stride = sizeof(ImDrawVert);
+ binding_desc[0].inputRate = VK_VERTEX_INPUT_RATE_VERTEX;
+
+ VkVertexInputAttributeDescription attribute_desc[3] = {};
+ attribute_desc[0].location = 0;
+ attribute_desc[0].binding = binding_desc[0].binding;
+ attribute_desc[0].format = VK_FORMAT_R32G32_SFLOAT;
+ attribute_desc[0].offset = IM_OFFSETOF(ImDrawVert, pos);
+ attribute_desc[1].location = 1;
+ attribute_desc[1].binding = binding_desc[0].binding;
+ attribute_desc[1].format = VK_FORMAT_R32G32_SFLOAT;
+ attribute_desc[1].offset = IM_OFFSETOF(ImDrawVert, uv);
+ attribute_desc[2].location = 2;
+ attribute_desc[2].binding = binding_desc[0].binding;
+ attribute_desc[2].format = VK_FORMAT_R8G8B8A8_UNORM;
+ attribute_desc[2].offset = IM_OFFSETOF(ImDrawVert, col);
+
+ VkPipelineVertexInputStateCreateInfo vertex_info = {};
+ vertex_info.sType = VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO;
+ vertex_info.vertexBindingDescriptionCount = 1;
+ vertex_info.pVertexBindingDescriptions = binding_desc;
+ vertex_info.vertexAttributeDescriptionCount = 3;
+ vertex_info.pVertexAttributeDescriptions = attribute_desc;
+
+ VkPipelineInputAssemblyStateCreateInfo ia_info = {};
+ ia_info.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
+ ia_info.topology = VK_PRIMITIVE_TOPOLOGY_TRIANGLE_LIST;
+
+ VkPipelineViewportStateCreateInfo viewport_info = {};
+ viewport_info.sType = VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO;
+ viewport_info.viewportCount = 1;
+ viewport_info.scissorCount = 1;
+
+ VkPipelineRasterizationStateCreateInfo raster_info = {};
+ raster_info.sType = VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO;
+ raster_info.polygonMode = VK_POLYGON_MODE_FILL;
+ raster_info.cullMode = VK_CULL_MODE_NONE;
+ raster_info.frontFace = VK_FRONT_FACE_COUNTER_CLOCKWISE;
+ raster_info.lineWidth = 1.0f;
+
+ VkPipelineMultisampleStateCreateInfo ms_info = {};
+ ms_info.sType = VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO;
+ ms_info.rasterizationSamples = VK_SAMPLE_COUNT_1_BIT;
+
+ VkPipelineColorBlendAttachmentState color_attachment[1] = {};
+ color_attachment[0].blendEnable = VK_TRUE;
+ color_attachment[0].srcColorBlendFactor = VK_BLEND_FACTOR_SRC_ALPHA;
+ color_attachment[0].dstColorBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
+ color_attachment[0].colorBlendOp = VK_BLEND_OP_ADD;
+ color_attachment[0].srcAlphaBlendFactor = VK_BLEND_FACTOR_ONE_MINUS_SRC_ALPHA;
+ color_attachment[0].dstAlphaBlendFactor = VK_BLEND_FACTOR_ZERO;
+ color_attachment[0].alphaBlendOp = VK_BLEND_OP_ADD;
+ color_attachment[0].colorWriteMask = VK_COLOR_COMPONENT_R_BIT | VK_COLOR_COMPONENT_G_BIT | VK_COLOR_COMPONENT_B_BIT | VK_COLOR_COMPONENT_A_BIT;
+
+ VkPipelineDepthStencilStateCreateInfo depth_info = {};
+ depth_info.sType = VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO;
+
+ VkPipelineColorBlendStateCreateInfo blend_info = {};
+ blend_info.sType = VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO;
+ blend_info.attachmentCount = 1;
+ blend_info.pAttachments = color_attachment;
+
+ VkDynamicState dynamic_states[2] = { VK_DYNAMIC_STATE_VIEWPORT, VK_DYNAMIC_STATE_SCISSOR };
+ VkPipelineDynamicStateCreateInfo dynamic_state = {};
+ dynamic_state.sType = VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO;
+ dynamic_state.dynamicStateCount = (uint32_t)IM_ARRAYSIZE(dynamic_states);
+ dynamic_state.pDynamicStates = dynamic_states;
+
+ VkGraphicsPipelineCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO;
+ info.flags = g_PipelineCreateFlags;
+ info.stageCount = 2;
+ info.pStages = stage;
+ info.pVertexInputState = &vertex_info;
+ info.pInputAssemblyState = &ia_info;
+ info.pViewportState = &viewport_info;
+ info.pRasterizationState = &raster_info;
+ info.pMultisampleState = &ms_info;
+ info.pDepthStencilState = &depth_info;
+ info.pColorBlendState = &blend_info;
+ info.pDynamicState = &dynamic_state;
+ info.layout = g_PipelineLayout;
+ info.renderPass = g_RenderPass;
+ err = vkCreateGraphicsPipelines(g_Device, g_PipelineCache, 1, &info, g_Allocator, &g_Pipeline);
+ check_vk_result(err);
+
+ vkDestroyShaderModule(g_Device, vert_module, g_Allocator);
+ vkDestroyShaderModule(g_Device, frag_module, g_Allocator);
+
+ return true;
+}
+
+void ImGui_ImplVulkan_InvalidateFontUploadObjects()
+{
+ if (g_UploadBuffer)
+ {
+ vkDestroyBuffer(g_Device, g_UploadBuffer, g_Allocator);
+ g_UploadBuffer = VK_NULL_HANDLE;
+ }
+ if (g_UploadBufferMemory)
+ {
+ vkFreeMemory(g_Device, g_UploadBufferMemory, g_Allocator);
+ g_UploadBufferMemory = VK_NULL_HANDLE;
+ }
+}
+
+void ImGui_ImplVulkan_InvalidateDeviceObjects()
+{
+ ImGui_ImplVulkan_InvalidateFontUploadObjects();
+
+ for (int i = 0; i < IMGUI_VK_QUEUED_FRAMES; i++)
+ {
+ FrameDataForRender* fd = &g_FramesDataBuffers[i];
+ if (fd->VertexBuffer) { vkDestroyBuffer (g_Device, fd->VertexBuffer, g_Allocator); fd->VertexBuffer = VK_NULL_HANDLE; }
+ if (fd->VertexBufferMemory) { vkFreeMemory (g_Device, fd->VertexBufferMemory, g_Allocator); fd->VertexBufferMemory = VK_NULL_HANDLE; }
+ if (fd->IndexBuffer) { vkDestroyBuffer (g_Device, fd->IndexBuffer, g_Allocator); fd->IndexBuffer = VK_NULL_HANDLE; }
+ if (fd->IndexBufferMemory) { vkFreeMemory (g_Device, fd->IndexBufferMemory, g_Allocator); fd->IndexBufferMemory = VK_NULL_HANDLE; }
+ }
+
+ if (g_FontView) { vkDestroyImageView(g_Device, g_FontView, g_Allocator); g_FontView = VK_NULL_HANDLE; }
+ if (g_FontImage) { vkDestroyImage(g_Device, g_FontImage, g_Allocator); g_FontImage = VK_NULL_HANDLE; }
+ if (g_FontMemory) { vkFreeMemory(g_Device, g_FontMemory, g_Allocator); g_FontMemory = VK_NULL_HANDLE; }
+ if (g_FontSampler) { vkDestroySampler(g_Device, g_FontSampler, g_Allocator); g_FontSampler = VK_NULL_HANDLE; }
+ if (g_DescriptorSetLayout) { vkDestroyDescriptorSetLayout(g_Device, g_DescriptorSetLayout, g_Allocator); g_DescriptorSetLayout = VK_NULL_HANDLE; }
+ if (g_PipelineLayout) { vkDestroyPipelineLayout(g_Device, g_PipelineLayout, g_Allocator); g_PipelineLayout = VK_NULL_HANDLE; }
+ if (g_Pipeline) { vkDestroyPipeline(g_Device, g_Pipeline, g_Allocator); g_Pipeline = VK_NULL_HANDLE; }
+}
+
+bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass render_pass)
+{
+ IM_ASSERT(info->Instance != VK_NULL_HANDLE);
+ IM_ASSERT(info->PhysicalDevice != VK_NULL_HANDLE);
+ IM_ASSERT(info->Device != VK_NULL_HANDLE);
+ IM_ASSERT(info->Queue != VK_NULL_HANDLE);
+ IM_ASSERT(info->DescriptorPool != VK_NULL_HANDLE);
+ IM_ASSERT(render_pass != VK_NULL_HANDLE);
+
+ g_Instance = info->Instance;
+ g_PhysicalDevice = info->PhysicalDevice;
+ g_Device = info->Device;
+ g_QueueFamily = info->QueueFamily;
+ g_Queue = info->Queue;
+ g_RenderPass = render_pass;
+ g_PipelineCache = info->PipelineCache;
+ g_DescriptorPool = info->DescriptorPool;
+ g_Allocator = info->Allocator;
+ g_CheckVkResultFn = info->CheckVkResultFn;
+
+ ImGui_ImplVulkan_CreateDeviceObjects();
+
+ return true;
+}
+
+void ImGui_ImplVulkan_Shutdown()
+{
+ ImGui_ImplVulkan_InvalidateDeviceObjects();
+}
+
+void ImGui_ImplVulkan_NewFrame()
+{
+}
+
+
+//-------------------------------------------------------------------------
+// Internal / Miscellaneous Vulkan Helpers
+//-------------------------------------------------------------------------
+// You probably do NOT need to use or care about those functions.
+// Those functions only exist because:
+// 1) they facilitate the readability and maintenance of the multiple main.cpp examples files.
+// 2) the upcoming multi-viewport feature will need them internally.
+// Generally we avoid exposing any kind of superfluous high-level helpers in the bindings,
+// but it is too much code to duplicate everywhere so we exceptionally expose them.
+// Your application/engine will likely already have code to setup all that stuff (swap chain, render pass, frame buffers, etc.).
+// You may read this code to learn about Vulkan, but it is recommended you use you own custom tailored code to do equivalent work.
+// (those functions do not interact with any of the state used by the regular ImGui_ImplVulkan_XXX functions)
+//-------------------------------------------------------------------------
+
+#include // malloc
+
+ImGui_ImplVulkanH_FrameData::ImGui_ImplVulkanH_FrameData()
+{
+ BackbufferIndex = 0;
+ CommandPool = VK_NULL_HANDLE;
+ CommandBuffer = VK_NULL_HANDLE;
+ Fence = VK_NULL_HANDLE;
+ ImageAcquiredSemaphore = VK_NULL_HANDLE;
+ RenderCompleteSemaphore = VK_NULL_HANDLE;
+}
+
+ImGui_ImplVulkanH_WindowData::ImGui_ImplVulkanH_WindowData()
+{
+ Width = Height = 0;
+ Swapchain = VK_NULL_HANDLE;
+ Surface = VK_NULL_HANDLE;
+ memset(&SurfaceFormat, 0, sizeof(SurfaceFormat));
+ PresentMode = VK_PRESENT_MODE_MAX_ENUM_KHR;
+ RenderPass = VK_NULL_HANDLE;
+ ClearEnable = true;
+ memset(&ClearValue, 0, sizeof(ClearValue));
+ BackBufferCount = 0;
+ memset(&BackBuffer, 0, sizeof(BackBuffer));
+ memset(&BackBufferView, 0, sizeof(BackBufferView));
+ memset(&Framebuffer, 0, sizeof(Framebuffer));
+ FrameIndex = 0;
+}
+
+VkSurfaceFormatKHR ImGui_ImplVulkanH_SelectSurfaceFormat(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkFormat* request_formats, int request_formats_count, VkColorSpaceKHR request_color_space)
+{
+ IM_ASSERT(request_formats != NULL);
+ IM_ASSERT(request_formats_count > 0);
+
+ // Per Spec Format and View Format are expected to be the same unless VK_IMAGE_CREATE_MUTABLE_BIT was set at image creation
+ // Assuming that the default behavior is without setting this bit, there is no need for separate Swapchain image and image view format
+ // Additionally several new color spaces were introduced with Vulkan Spec v1.0.40,
+ // hence we must make sure that a format with the mostly available color space, VK_COLOR_SPACE_SRGB_NONLINEAR_KHR, is found and used.
+ uint32_t avail_count;
+ vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &avail_count, NULL);
+ ImVector avail_format;
+ avail_format.resize((int)avail_count);
+ vkGetPhysicalDeviceSurfaceFormatsKHR(physical_device, surface, &avail_count, avail_format.Data);
+
+ // First check if only one format, VK_FORMAT_UNDEFINED, is available, which would imply that any format is available
+ if (avail_count == 1)
+ {
+ if (avail_format[0].format == VK_FORMAT_UNDEFINED)
+ {
+ VkSurfaceFormatKHR ret;
+ ret.format = request_formats[0];
+ ret.colorSpace = request_color_space;
+ return ret;
+ }
+ else
+ {
+ // No point in searching another format
+ return avail_format[0];
+ }
+ }
+ else
+ {
+ // Request several formats, the first found will be used
+ for (int request_i = 0; request_i < request_formats_count; request_i++)
+ for (uint32_t avail_i = 0; avail_i < avail_count; avail_i++)
+ if (avail_format[avail_i].format == request_formats[request_i] && avail_format[avail_i].colorSpace == request_color_space)
+ return avail_format[avail_i];
+
+ // If none of the requested image formats could be found, use the first available
+ return avail_format[0];
+ }
+}
+
+VkPresentModeKHR ImGui_ImplVulkanH_SelectPresentMode(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkPresentModeKHR* request_modes, int request_modes_count)
+{
+ IM_ASSERT(request_modes != NULL);
+ IM_ASSERT(request_modes_count > 0);
+
+ // Request a certain mode and confirm that it is available. If not use VK_PRESENT_MODE_FIFO_KHR which is mandatory
+ uint32_t avail_count = 0;
+ vkGetPhysicalDeviceSurfacePresentModesKHR(physical_device, surface, &avail_count, NULL);
+ ImVector avail_modes;
+ avail_modes.resize((int)avail_count);
+ vkGetPhysicalDeviceSurfacePresentModesKHR(physical_device, surface, &avail_count, avail_modes.Data);
+ //for (uint32_t avail_i = 0; avail_i < avail_count; avail_i++)
+ // printf("[vulkan] avail_modes[%d] = %d\n", avail_i, avail_modes[avail_i]);
+
+ for (int request_i = 0; request_i < request_modes_count; request_i++)
+ for (uint32_t avail_i = 0; avail_i < avail_count; avail_i++)
+ if (request_modes[request_i] == avail_modes[avail_i])
+ return request_modes[request_i];
+
+ return VK_PRESENT_MODE_FIFO_KHR; // Always available
+}
+
+void ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(VkPhysicalDevice physical_device, VkDevice device, uint32_t queue_family, ImGui_ImplVulkanH_WindowData* wd, const VkAllocationCallbacks* allocator)
+{
+ IM_ASSERT(physical_device != VK_NULL_HANDLE && device != VK_NULL_HANDLE);
+ (void)allocator;
+
+ // Create Command Buffers
+ VkResult err;
+ for (int i = 0; i < IMGUI_VK_QUEUED_FRAMES; i++)
+ {
+ ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[i];
+ {
+ VkCommandPoolCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_COMMAND_POOL_CREATE_INFO;
+ info.flags = VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT;
+ info.queueFamilyIndex = queue_family;
+ err = vkCreateCommandPool(device, &info, allocator, &fd->CommandPool);
+ check_vk_result(err);
+ }
+ {
+ VkCommandBufferAllocateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_COMMAND_BUFFER_ALLOCATE_INFO;
+ info.commandPool = fd->CommandPool;
+ info.level = VK_COMMAND_BUFFER_LEVEL_PRIMARY;
+ info.commandBufferCount = 1;
+ err = vkAllocateCommandBuffers(device, &info, &fd->CommandBuffer);
+ check_vk_result(err);
+ }
+ {
+ VkFenceCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_FENCE_CREATE_INFO;
+ info.flags = VK_FENCE_CREATE_SIGNALED_BIT;
+ err = vkCreateFence(device, &info, allocator, &fd->Fence);
+ check_vk_result(err);
+ }
+ {
+ VkSemaphoreCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_SEMAPHORE_CREATE_INFO;
+ err = vkCreateSemaphore(device, &info, allocator, &fd->ImageAcquiredSemaphore);
+ check_vk_result(err);
+ err = vkCreateSemaphore(device, &info, allocator, &fd->RenderCompleteSemaphore);
+ check_vk_result(err);
+ }
+ }
+}
+
+int ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(VkPresentModeKHR present_mode)
+{
+ if (present_mode == VK_PRESENT_MODE_MAILBOX_KHR)
+ return 3;
+ if (present_mode == VK_PRESENT_MODE_FIFO_KHR || present_mode == VK_PRESENT_MODE_FIFO_RELAXED_KHR)
+ return 2;
+ if (present_mode == VK_PRESENT_MODE_IMMEDIATE_KHR)
+ return 1;
+ IM_ASSERT(0);
+ return 1;
+}
+
+void ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_WindowData* wd, const VkAllocationCallbacks* allocator, int w, int h)
+{
+ uint32_t min_image_count = 2; // FIXME: this should become a function parameter
+
+ VkResult err;
+ VkSwapchainKHR old_swapchain = wd->Swapchain;
+ err = vkDeviceWaitIdle(device);
+ check_vk_result(err);
+
+ // Destroy old Framebuffer
+ for (uint32_t i = 0; i < wd->BackBufferCount; i++)
+ {
+ if (wd->BackBufferView[i])
+ vkDestroyImageView(device, wd->BackBufferView[i], allocator);
+ if (wd->Framebuffer[i])
+ vkDestroyFramebuffer(device, wd->Framebuffer[i], allocator);
+ }
+ wd->BackBufferCount = 0;
+ if (wd->RenderPass)
+ vkDestroyRenderPass(device, wd->RenderPass, allocator);
+
+ // If min image count was not specified, request different count of images dependent on selected present mode
+ if (min_image_count == 0)
+ min_image_count = ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(wd->PresentMode);
+
+ // Create Swapchain
+ {
+ VkSwapchainCreateInfoKHR info = {};
+ info.sType = VK_STRUCTURE_TYPE_SWAPCHAIN_CREATE_INFO_KHR;
+ info.surface = wd->Surface;
+ info.minImageCount = min_image_count;
+ info.imageFormat = wd->SurfaceFormat.format;
+ info.imageColorSpace = wd->SurfaceFormat.colorSpace;
+ info.imageArrayLayers = 1;
+ info.imageUsage = VK_IMAGE_USAGE_COLOR_ATTACHMENT_BIT;
+ info.imageSharingMode = VK_SHARING_MODE_EXCLUSIVE; // Assume that graphics family == present family
+ info.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
+ info.compositeAlpha = VK_COMPOSITE_ALPHA_OPAQUE_BIT_KHR;
+ info.presentMode = wd->PresentMode;
+ info.clipped = VK_TRUE;
+ info.oldSwapchain = old_swapchain;
+ VkSurfaceCapabilitiesKHR cap;
+ err = vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physical_device, wd->Surface, &cap);
+ check_vk_result(err);
+ if (info.minImageCount < cap.minImageCount)
+ info.minImageCount = cap.minImageCount;
+ else if (cap.maxImageCount != 0 && info.minImageCount > cap.maxImageCount)
+ info.minImageCount = cap.maxImageCount;
+
+ if (cap.currentExtent.width == 0xffffffff)
+ {
+ info.imageExtent.width = wd->Width = w;
+ info.imageExtent.height = wd->Height = h;
+ }
+ else
+ {
+ info.imageExtent.width = wd->Width = cap.currentExtent.width;
+ info.imageExtent.height = wd->Height = cap.currentExtent.height;
+ }
+ err = vkCreateSwapchainKHR(device, &info, allocator, &wd->Swapchain);
+ check_vk_result(err);
+ err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->BackBufferCount, NULL);
+ check_vk_result(err);
+ err = vkGetSwapchainImagesKHR(device, wd->Swapchain, &wd->BackBufferCount, wd->BackBuffer);
+ check_vk_result(err);
+ }
+ if (old_swapchain)
+ vkDestroySwapchainKHR(device, old_swapchain, allocator);
+
+ // Create the Render Pass
+ {
+ VkAttachmentDescription attachment = {};
+ attachment.format = wd->SurfaceFormat.format;
+ attachment.samples = VK_SAMPLE_COUNT_1_BIT;
+ attachment.loadOp = wd->ClearEnable ? VK_ATTACHMENT_LOAD_OP_CLEAR : VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ attachment.storeOp = VK_ATTACHMENT_STORE_OP_STORE;
+ attachment.stencilLoadOp = VK_ATTACHMENT_LOAD_OP_DONT_CARE;
+ attachment.stencilStoreOp = VK_ATTACHMENT_STORE_OP_DONT_CARE;
+ attachment.initialLayout = VK_IMAGE_LAYOUT_UNDEFINED;
+ attachment.finalLayout = VK_IMAGE_LAYOUT_PRESENT_SRC_KHR;
+ VkAttachmentReference color_attachment = {};
+ color_attachment.attachment = 0;
+ color_attachment.layout = VK_IMAGE_LAYOUT_COLOR_ATTACHMENT_OPTIMAL;
+ VkSubpassDescription subpass = {};
+ subpass.pipelineBindPoint = VK_PIPELINE_BIND_POINT_GRAPHICS;
+ subpass.colorAttachmentCount = 1;
+ subpass.pColorAttachments = &color_attachment;
+ VkSubpassDependency dependency = {};
+ dependency.srcSubpass = VK_SUBPASS_EXTERNAL;
+ dependency.dstSubpass = 0;
+ dependency.srcStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
+ dependency.dstStageMask = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
+ dependency.srcAccessMask = 0;
+ dependency.dstAccessMask = VK_ACCESS_COLOR_ATTACHMENT_WRITE_BIT;
+ VkRenderPassCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_RENDER_PASS_CREATE_INFO;
+ info.attachmentCount = 1;
+ info.pAttachments = &attachment;
+ info.subpassCount = 1;
+ info.pSubpasses = &subpass;
+ info.dependencyCount = 1;
+ info.pDependencies = &dependency;
+ err = vkCreateRenderPass(device, &info, allocator, &wd->RenderPass);
+ check_vk_result(err);
+ }
+
+ // Create The Image Views
+ {
+ VkImageViewCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_CREATE_INFO;
+ info.viewType = VK_IMAGE_VIEW_TYPE_2D;
+ info.format = wd->SurfaceFormat.format;
+ info.components.r = VK_COMPONENT_SWIZZLE_R;
+ info.components.g = VK_COMPONENT_SWIZZLE_G;
+ info.components.b = VK_COMPONENT_SWIZZLE_B;
+ info.components.a = VK_COMPONENT_SWIZZLE_A;
+ VkImageSubresourceRange image_range = { VK_IMAGE_ASPECT_COLOR_BIT, 0, 1, 0, 1 };
+ info.subresourceRange = image_range;
+ for (uint32_t i = 0; i < wd->BackBufferCount; i++)
+ {
+ info.image = wd->BackBuffer[i];
+ err = vkCreateImageView(device, &info, allocator, &wd->BackBufferView[i]);
+ check_vk_result(err);
+ }
+ }
+
+ // Create Framebuffer
+ {
+ VkImageView attachment[1];
+ VkFramebufferCreateInfo info = {};
+ info.sType = VK_STRUCTURE_TYPE_FRAMEBUFFER_CREATE_INFO;
+ info.renderPass = wd->RenderPass;
+ info.attachmentCount = 1;
+ info.pAttachments = attachment;
+ info.width = wd->Width;
+ info.height = wd->Height;
+ info.layers = 1;
+ for (uint32_t i = 0; i < wd->BackBufferCount; i++)
+ {
+ attachment[0] = wd->BackBufferView[i];
+ err = vkCreateFramebuffer(device, &info, allocator, &wd->Framebuffer[i]);
+ check_vk_result(err);
+ }
+ }
+}
+
+void ImGui_ImplVulkanH_DestroyWindowData(VkInstance instance, VkDevice device, ImGui_ImplVulkanH_WindowData* wd, const VkAllocationCallbacks* allocator)
+{
+ vkDeviceWaitIdle(device); // FIXME: We could wait on the Queue if we had the queue in wd-> (otherwise VulkanH functions can't use globals)
+ //vkQueueWaitIdle(g_Queue);
+
+ for (int i = 0; i < IMGUI_VK_QUEUED_FRAMES; i++)
+ {
+ ImGui_ImplVulkanH_FrameData* fd = &wd->Frames[i];
+ vkDestroyFence(device, fd->Fence, allocator);
+ vkFreeCommandBuffers(device, fd->CommandPool, 1, &fd->CommandBuffer);
+ vkDestroyCommandPool(device, fd->CommandPool, allocator);
+ vkDestroySemaphore(device, fd->ImageAcquiredSemaphore, allocator);
+ vkDestroySemaphore(device, fd->RenderCompleteSemaphore, allocator);
+ }
+ for (uint32_t i = 0; i < wd->BackBufferCount; i++)
+ {
+ vkDestroyImageView(device, wd->BackBufferView[i], allocator);
+ vkDestroyFramebuffer(device, wd->Framebuffer[i], allocator);
+ }
+ vkDestroyRenderPass(device, wd->RenderPass, allocator);
+ vkDestroySwapchainKHR(device, wd->Swapchain, allocator);
+ vkDestroySurfaceKHR(instance, wd->Surface, allocator);
+ *wd = ImGui_ImplVulkanH_WindowData();
+}
diff --git a/3rdparty/imgui/examples/imgui_impl_vulkan.h b/3rdparty/imgui/examples/imgui_impl_vulkan.h
new file mode 100644
index 00000000..ca0c2b50
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_vulkan.h
@@ -0,0 +1,103 @@
+// dear imgui: Renderer for Vulkan
+// This needs to be used along with a Platform Binding (e.g. GLFW, SDL, Win32, custom..)
+
+// Missing features:
+// [ ] Renderer: User texture binding. Changes of ImTextureID aren't supported by this binding! See https://github.com/ocornut/imgui/pull/914
+
+// You can copy and use unmodified imgui_impl_* files in your project. See main.cpp for an example of using this.
+// If you are new to dear imgui, read examples/README.txt and read the documentation at the top of imgui.cpp.
+// https://github.com/ocornut/imgui
+
+// The aim of imgui_impl_vulkan.h/.cpp is to be usable in your engine without any modification.
+// IF YOU FEEL YOU NEED TO MAKE ANY CHANGE TO THIS CODE, please share them and your feedback at https://github.com/ocornut/imgui/
+
+#include
+
+#define IMGUI_VK_QUEUED_FRAMES 2
+
+// Please zero-clear before use.
+struct ImGui_ImplVulkan_InitInfo
+{
+ VkInstance Instance;
+ VkPhysicalDevice PhysicalDevice;
+ VkDevice Device;
+ uint32_t QueueFamily;
+ VkQueue Queue;
+ VkPipelineCache PipelineCache;
+ VkDescriptorPool DescriptorPool;
+ const VkAllocationCallbacks* Allocator;
+ void (*CheckVkResultFn)(VkResult err);
+};
+
+// Called by user code
+IMGUI_IMPL_API bool ImGui_ImplVulkan_Init(ImGui_ImplVulkan_InitInfo* info, VkRenderPass render_pass);
+IMGUI_IMPL_API void ImGui_ImplVulkan_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplVulkan_NewFrame();
+IMGUI_IMPL_API void ImGui_ImplVulkan_RenderDrawData(ImDrawData* draw_data, VkCommandBuffer command_buffer);
+IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateFontsTexture(VkCommandBuffer command_buffer);
+IMGUI_IMPL_API void ImGui_ImplVulkan_InvalidateFontUploadObjects();
+
+// Called by ImGui_ImplVulkan_Init() might be useful elsewhere.
+IMGUI_IMPL_API bool ImGui_ImplVulkan_CreateDeviceObjects();
+IMGUI_IMPL_API void ImGui_ImplVulkan_InvalidateDeviceObjects();
+
+
+//-------------------------------------------------------------------------
+// Internal / Miscellaneous Vulkan Helpers
+//-------------------------------------------------------------------------
+// You probably do NOT need to use or care about those functions.
+// Those functions only exist because:
+// 1) they facilitate the readability and maintenance of the multiple main.cpp examples files.
+// 2) the upcoming multi-viewport feature will need them internally.
+// Generally we avoid exposing any kind of superfluous high-level helpers in the bindings,
+// but it is too much code to duplicate everywhere so we exceptionally expose them.
+// Your application/engine will likely already have code to setup all that stuff (swap chain, render pass, frame buffers, etc.).
+// You may read this code to learn about Vulkan, but it is recommended you use you own custom tailored code to do equivalent work.
+// (those functions do not interact with any of the state used by the regular ImGui_ImplVulkan_XXX functions)
+//-------------------------------------------------------------------------
+
+struct ImGui_ImplVulkanH_FrameData;
+struct ImGui_ImplVulkanH_WindowData;
+
+IMGUI_IMPL_API void ImGui_ImplVulkanH_CreateWindowDataCommandBuffers(VkPhysicalDevice physical_device, VkDevice device, uint32_t queue_family, ImGui_ImplVulkanH_WindowData* wd, const VkAllocationCallbacks* allocator);
+IMGUI_IMPL_API void ImGui_ImplVulkanH_CreateWindowDataSwapChainAndFramebuffer(VkPhysicalDevice physical_device, VkDevice device, ImGui_ImplVulkanH_WindowData* wd, const VkAllocationCallbacks* allocator, int w, int h);
+IMGUI_IMPL_API void ImGui_ImplVulkanH_DestroyWindowData(VkInstance instance, VkDevice device, ImGui_ImplVulkanH_WindowData* wd, const VkAllocationCallbacks* allocator);
+IMGUI_IMPL_API VkSurfaceFormatKHR ImGui_ImplVulkanH_SelectSurfaceFormat(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkFormat* request_formats, int request_formats_count, VkColorSpaceKHR request_color_space);
+IMGUI_IMPL_API VkPresentModeKHR ImGui_ImplVulkanH_SelectPresentMode(VkPhysicalDevice physical_device, VkSurfaceKHR surface, const VkPresentModeKHR* request_modes, int request_modes_count);
+IMGUI_IMPL_API int ImGui_ImplVulkanH_GetMinImageCountFromPresentMode(VkPresentModeKHR present_mode);
+
+// Helper structure to hold the data needed by one rendering frame
+struct ImGui_ImplVulkanH_FrameData
+{
+ uint32_t BackbufferIndex; // Keep track of recently rendered swapchain frame indices
+ VkCommandPool CommandPool;
+ VkCommandBuffer CommandBuffer;
+ VkFence Fence;
+ VkSemaphore ImageAcquiredSemaphore;
+ VkSemaphore RenderCompleteSemaphore;
+
+ IMGUI_IMPL_API ImGui_ImplVulkanH_FrameData();
+};
+
+// Helper structure to hold the data needed by one rendering context into one OS window
+struct ImGui_ImplVulkanH_WindowData
+{
+ int Width;
+ int Height;
+ VkSwapchainKHR Swapchain;
+ VkSurfaceKHR Surface;
+ VkSurfaceFormatKHR SurfaceFormat;
+ VkPresentModeKHR PresentMode;
+ VkRenderPass RenderPass;
+ bool ClearEnable;
+ VkClearValue ClearValue;
+ uint32_t BackBufferCount;
+ VkImage BackBuffer[16];
+ VkImageView BackBufferView[16];
+ VkFramebuffer Framebuffer[16];
+ uint32_t FrameIndex;
+ ImGui_ImplVulkanH_FrameData Frames[IMGUI_VK_QUEUED_FRAMES];
+
+ IMGUI_IMPL_API ImGui_ImplVulkanH_WindowData();
+};
+
diff --git a/3rdparty/imgui/examples/imgui_impl_win32.cpp b/3rdparty/imgui/examples/imgui_impl_win32.cpp
new file mode 100644
index 00000000..6cf8d630
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_win32.cpp
@@ -0,0 +1,248 @@
+// dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications)
+// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
+
+// Implemented features:
+// [X] Platform: Clipboard support (for Win32 this is actually part of core imgui)
+// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
+// [X] Platform: Keyboard arrays indexed using VK_* Virtual Key Codes, e.g. ImGui::IsKeyPressed(VK_SPACE).
+// Missing features:
+// [ ] Platform: Gamepad support (best leaving it to user application to fill io.NavInputs[] with gamepad inputs from their source of choice).
+
+#include "imgui.h"
+#include "imgui_impl_win32.h"
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include
+#include
+
+// CHANGELOG
+// (minor and older changes stripped away, please see git history for details)
+// 2018-06-29: Inputs: Added support for the ImGuiMouseCursor_Hand cursor.
+// 2018-06-10: Inputs: Fixed handling of mouse wheel messages to support fine position messages (typically sent by track-pads).
+// 2018-06-08: Misc: Extracted imgui_impl_win32.cpp/.h away from the old combined DX9/DX10/DX11/DX12 examples.
+// 2018-03-20: Misc: Setup io.BackendFlags ImGuiBackendFlags_HasMouseCursors and ImGuiBackendFlags_HasSetMousePos flags + honor ImGuiConfigFlags_NoMouseCursorChange flag.
+// 2018-02-20: Inputs: Added support for mouse cursors (ImGui::GetMouseCursor() value and WM_SETCURSOR message handling).
+// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
+// 2018-02-06: Inputs: Honoring the io.WantSetMousePos by repositioning the mouse (when using navigation and ImGuiConfigFlags_NavMoveMouse is set).
+// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
+// 2018-01-20: Inputs: Added Horizontal Mouse Wheel support.
+// 2018-01-08: Inputs: Added mapping for ImGuiKey_Insert.
+// 2018-01-05: Inputs: Added WM_LBUTTONDBLCLK double-click handlers for window classes with the CS_DBLCLKS flag.
+// 2017-10-23: Inputs: Added WM_SYSKEYDOWN / WM_SYSKEYUP handlers so e.g. the VK_MENU key can be read.
+// 2017-10-23: Inputs: Using Win32 ::SetCapture/::GetCapture() to retrieve mouse positions outside the client area when dragging.
+// 2016-11-12: Inputs: Only call Win32 ::SetCursor(NULL) when io.MouseDrawCursor is set.
+
+// Win32 Data
+static HWND g_hWnd = 0;
+static INT64 g_Time = 0;
+static INT64 g_TicksPerSecond = 0;
+static ImGuiMouseCursor g_LastMouseCursor = ImGuiMouseCursor_COUNT;
+
+// Functions
+bool ImGui_ImplWin32_Init(void* hwnd)
+{
+ if (!::QueryPerformanceFrequency((LARGE_INTEGER *)&g_TicksPerSecond))
+ return false;
+ if (!::QueryPerformanceCounter((LARGE_INTEGER *)&g_Time))
+ return false;
+
+ // Setup back-end capabilities flags
+ g_hWnd = (HWND)hwnd;
+ ImGuiIO& io = ImGui::GetIO();
+ io.BackendFlags |= ImGuiBackendFlags_HasMouseCursors; // We can honor GetMouseCursor() values (optional)
+ io.BackendFlags |= ImGuiBackendFlags_HasSetMousePos; // We can honor io.WantSetMousePos requests (optional, rarely used)
+ io.ImeWindowHandle = hwnd;
+
+ // Keyboard mapping. ImGui will use those indices to peek into the io.KeysDown[] array that we will update during the application lifetime.
+ io.KeyMap[ImGuiKey_Tab] = VK_TAB;
+ io.KeyMap[ImGuiKey_LeftArrow] = VK_LEFT;
+ io.KeyMap[ImGuiKey_RightArrow] = VK_RIGHT;
+ io.KeyMap[ImGuiKey_UpArrow] = VK_UP;
+ io.KeyMap[ImGuiKey_DownArrow] = VK_DOWN;
+ io.KeyMap[ImGuiKey_PageUp] = VK_PRIOR;
+ io.KeyMap[ImGuiKey_PageDown] = VK_NEXT;
+ io.KeyMap[ImGuiKey_Home] = VK_HOME;
+ io.KeyMap[ImGuiKey_End] = VK_END;
+ io.KeyMap[ImGuiKey_Insert] = VK_INSERT;
+ io.KeyMap[ImGuiKey_Delete] = VK_DELETE;
+ io.KeyMap[ImGuiKey_Backspace] = VK_BACK;
+ io.KeyMap[ImGuiKey_Space] = VK_SPACE;
+ io.KeyMap[ImGuiKey_Enter] = VK_RETURN;
+ io.KeyMap[ImGuiKey_Escape] = VK_ESCAPE;
+ io.KeyMap[ImGuiKey_A] = 'A';
+ io.KeyMap[ImGuiKey_C] = 'C';
+ io.KeyMap[ImGuiKey_V] = 'V';
+ io.KeyMap[ImGuiKey_X] = 'X';
+ io.KeyMap[ImGuiKey_Y] = 'Y';
+ io.KeyMap[ImGuiKey_Z] = 'Z';
+
+ return true;
+}
+
+void ImGui_ImplWin32_Shutdown()
+{
+ g_hWnd = (HWND)0;
+}
+
+static bool ImGui_ImplWin32_UpdateMouseCursor()
+{
+ ImGuiIO& io = ImGui::GetIO();
+ if (io.ConfigFlags & ImGuiConfigFlags_NoMouseCursorChange)
+ return false;
+
+ ImGuiMouseCursor imgui_cursor = ImGui::GetMouseCursor();
+ if (imgui_cursor == ImGuiMouseCursor_None || io.MouseDrawCursor)
+ {
+ // Hide OS mouse cursor if imgui is drawing it or if it wants no cursor
+ ::SetCursor(NULL);
+ }
+ else
+ {
+ // Show OS mouse cursor
+ LPTSTR win32_cursor = IDC_ARROW;
+ switch (imgui_cursor)
+ {
+ case ImGuiMouseCursor_Arrow: win32_cursor = IDC_ARROW; break;
+ case ImGuiMouseCursor_TextInput: win32_cursor = IDC_IBEAM; break;
+ case ImGuiMouseCursor_ResizeAll: win32_cursor = IDC_SIZEALL; break;
+ case ImGuiMouseCursor_ResizeEW: win32_cursor = IDC_SIZEWE; break;
+ case ImGuiMouseCursor_ResizeNS: win32_cursor = IDC_SIZENS; break;
+ case ImGuiMouseCursor_ResizeNESW: win32_cursor = IDC_SIZENESW; break;
+ case ImGuiMouseCursor_ResizeNWSE: win32_cursor = IDC_SIZENWSE; break;
+ case ImGuiMouseCursor_Hand: win32_cursor = IDC_HAND; break;
+ }
+ ::SetCursor(::LoadCursor(NULL, win32_cursor));
+ }
+ return true;
+}
+
+static void ImGui_ImplWin32_UpdateMousePos()
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ // Set OS mouse position if requested (rarely used, only when ImGuiConfigFlags_NavEnableSetMousePos is enabled by user)
+ if (io.WantSetMousePos)
+ {
+ POINT pos = { (int)io.MousePos.x, (int)io.MousePos.y };
+ ::ClientToScreen(g_hWnd, &pos);
+ ::SetCursorPos(pos.x, pos.y);
+ }
+
+ // Set mouse position
+ io.MousePos = ImVec2(-FLT_MAX, -FLT_MAX);
+ POINT pos;
+ if (::GetActiveWindow() == g_hWnd && ::GetCursorPos(&pos))
+ if (::ScreenToClient(g_hWnd, &pos))
+ io.MousePos = ImVec2((float)pos.x, (float)pos.y);
+}
+
+void ImGui_ImplWin32_NewFrame()
+{
+ ImGuiIO& io = ImGui::GetIO();
+
+ // Setup display size (every frame to accommodate for window resizing)
+ RECT rect;
+ ::GetClientRect(g_hWnd, &rect);
+ io.DisplaySize = ImVec2((float)(rect.right - rect.left), (float)(rect.bottom - rect.top));
+
+ // Setup time step
+ INT64 current_time;
+ ::QueryPerformanceCounter((LARGE_INTEGER *)¤t_time);
+ io.DeltaTime = (float)(current_time - g_Time) / g_TicksPerSecond;
+ g_Time = current_time;
+
+ // Read keyboard modifiers inputs
+ io.KeyCtrl = (::GetKeyState(VK_CONTROL) & 0x8000) != 0;
+ io.KeyShift = (::GetKeyState(VK_SHIFT) & 0x8000) != 0;
+ io.KeyAlt = (::GetKeyState(VK_MENU) & 0x8000) != 0;
+ io.KeySuper = false;
+ // io.KeysDown[], io.MousePos, io.MouseDown[], io.MouseWheel: filled by the WndProc handler below.
+
+ // Update OS mouse position
+ ImGui_ImplWin32_UpdateMousePos();
+
+ // Update OS mouse cursor with the cursor requested by imgui
+ ImGuiMouseCursor mouse_cursor = io.MouseDrawCursor ? ImGuiMouseCursor_None : ImGui::GetMouseCursor();
+ if (g_LastMouseCursor != mouse_cursor)
+ {
+ g_LastMouseCursor = mouse_cursor;
+ ImGui_ImplWin32_UpdateMouseCursor();
+ }
+}
+
+// Allow compilation with old Windows SDK. MinGW doesn't have default _WIN32_WINNT/WINVER versions.
+#ifndef WM_MOUSEHWHEEL
+#define WM_MOUSEHWHEEL 0x020E
+#endif
+
+// Process Win32 mouse/keyboard inputs.
+// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
+// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
+// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
+// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
+// PS: In this Win32 handler, we use the capture API (GetCapture/SetCapture/ReleaseCapture) to be able to read mouse coordinations when dragging mouse outside of our window bounds.
+// PS: We treat DBLCLK messages as regular mouse down messages, so this code will work on windows classes that have the CS_DBLCLKS flag set. Our own example app code doesn't set this flag.
+IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ if (ImGui::GetCurrentContext() == NULL)
+ return 0;
+
+ ImGuiIO& io = ImGui::GetIO();
+ switch (msg)
+ {
+ case WM_LBUTTONDOWN: case WM_LBUTTONDBLCLK:
+ case WM_RBUTTONDOWN: case WM_RBUTTONDBLCLK:
+ case WM_MBUTTONDOWN: case WM_MBUTTONDBLCLK:
+ {
+ int button = 0;
+ if (msg == WM_LBUTTONDOWN || msg == WM_LBUTTONDBLCLK) button = 0;
+ if (msg == WM_RBUTTONDOWN || msg == WM_RBUTTONDBLCLK) button = 1;
+ if (msg == WM_MBUTTONDOWN || msg == WM_MBUTTONDBLCLK) button = 2;
+ if (!ImGui::IsAnyMouseDown() && ::GetCapture() == NULL)
+ ::SetCapture(hwnd);
+ io.MouseDown[button] = true;
+ return 0;
+ }
+ case WM_LBUTTONUP:
+ case WM_RBUTTONUP:
+ case WM_MBUTTONUP:
+ {
+ int button = 0;
+ if (msg == WM_LBUTTONUP) button = 0;
+ if (msg == WM_RBUTTONUP) button = 1;
+ if (msg == WM_MBUTTONUP) button = 2;
+ io.MouseDown[button] = false;
+ if (!ImGui::IsAnyMouseDown() && ::GetCapture() == hwnd)
+ ::ReleaseCapture();
+ return 0;
+ }
+ case WM_MOUSEWHEEL:
+ io.MouseWheel += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA;
+ return 0;
+ case WM_MOUSEHWHEEL:
+ io.MouseWheelH += (float)GET_WHEEL_DELTA_WPARAM(wParam) / (float)WHEEL_DELTA;
+ return 0;
+ case WM_KEYDOWN:
+ case WM_SYSKEYDOWN:
+ if (wParam < 256)
+ io.KeysDown[wParam] = 1;
+ return 0;
+ case WM_KEYUP:
+ case WM_SYSKEYUP:
+ if (wParam < 256)
+ io.KeysDown[wParam] = 0;
+ return 0;
+ case WM_CHAR:
+ // You can also use ToAscii()+GetKeyboardState() to retrieve characters.
+ if (wParam > 0 && wParam < 0x10000)
+ io.AddInputCharacter((unsigned short)wParam);
+ return 0;
+ case WM_SETCURSOR:
+ if (LOWORD(lParam) == HTCLIENT && ImGui_ImplWin32_UpdateMouseCursor())
+ return 1;
+ return 0;
+ }
+ return 0;
+}
+
diff --git a/3rdparty/imgui/examples/imgui_impl_win32.h b/3rdparty/imgui/examples/imgui_impl_win32.h
new file mode 100644
index 00000000..ed4f419b
--- /dev/null
+++ b/3rdparty/imgui/examples/imgui_impl_win32.h
@@ -0,0 +1,20 @@
+// dear imgui: Platform Binding for Windows (standard windows API for 32 and 64 bits applications)
+// This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..)
+
+// Implemented features:
+// [X] Platform: Clipboard support (for Win32 this is actually part of core imgui)
+// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
+// [X] Platform: Keyboard arrays indexed using VK_* Virtual Key Codes, e.g. ImGui::IsKeyPressed(VK_SPACE).
+// Missing features:
+// [ ] Platform: Gamepad support (best leaving it to user application to fill io.NavInputs[] with gamepad inputs from their source of choice).
+
+IMGUI_IMPL_API bool ImGui_ImplWin32_Init(void* hwnd);
+IMGUI_IMPL_API void ImGui_ImplWin32_Shutdown();
+IMGUI_IMPL_API void ImGui_ImplWin32_NewFrame();
+
+// Handler for Win32 messages, update mouse/keyboard data.
+// You may or not need this for your implementation, but it can serve as reference for handling inputs.
+// Intentionally commented out to avoid dragging dependencies on types. You can copy the extern declaration in your code.
+/*
+IMGUI_IMPL_API LRESULT ImGui_ImplWin32_WndProcHandler(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
+*/
diff --git a/3rdparty/imgui/examples/libs/gl3w/GL/gl3w.c b/3rdparty/imgui/examples/libs/gl3w/GL/gl3w.c
new file mode 100644
index 00000000..464e0177
--- /dev/null
+++ b/3rdparty/imgui/examples/libs/gl3w/GL/gl3w.c
@@ -0,0 +1,1344 @@
+#include
+
+#ifdef _MSC_VER
+#pragma warning (disable: 4055) // warning C4055: 'type cast' : from data pointer 'void *' to function pointer
+#pragma warning (disable: 4152) // warning C4152: nonstandard extension, function/data pointer conversion in expression
+#endif
+
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN 1
+#include
+
+static HMODULE libgl;
+
+static void open_libgl(void)
+{
+ libgl = LoadLibraryA("opengl32.dll");
+}
+
+static void close_libgl(void)
+{
+ FreeLibrary(libgl);
+}
+
+static void *get_proc(const char *proc)
+{
+ void *res;
+
+ res = wglGetProcAddress(proc);
+ if (!res)
+ res = GetProcAddress(libgl, proc);
+ return res;
+}
+#elif defined(__APPLE__) || defined(__APPLE_CC__)
+#include
+
+CFBundleRef bundle;
+CFURLRef bundleURL;
+
+static void open_libgl(void)
+{
+ bundleURL = CFURLCreateWithFileSystemPath(kCFAllocatorDefault,
+ CFSTR("/System/Library/Frameworks/OpenGL.framework"),
+ kCFURLPOSIXPathStyle, true);
+
+ bundle = CFBundleCreate(kCFAllocatorDefault, bundleURL);
+ assert(bundle != NULL);
+}
+
+static void close_libgl(void)
+{
+ CFRelease(bundle);
+ CFRelease(bundleURL);
+}
+
+static void *get_proc(const char *proc)
+{
+ void *res;
+
+ CFStringRef procname = CFStringCreateWithCString(kCFAllocatorDefault, proc,
+ kCFStringEncodingASCII);
+ res = CFBundleGetFunctionPointerForName(bundle, procname);
+ CFRelease(procname);
+ return res;
+}
+#else
+#include
+#include
+
+static void *libgl;
+
+static void open_libgl(void)
+{
+ libgl = dlopen("libGL.so.1", RTLD_LAZY | RTLD_GLOBAL);
+}
+
+static void close_libgl(void)
+{
+ dlclose(libgl);
+}
+
+static void *get_proc(const char *proc)
+{
+ void *res;
+
+ res = (void*)glXGetProcAddress((const GLubyte *) proc);
+ if (!res)
+ res = dlsym(libgl, proc);
+ return res;
+}
+#endif
+
+static struct {
+ int major, minor;
+} version;
+
+static int parse_version(void)
+{
+ if (!glGetIntegerv)
+ return -1;
+
+ glGetIntegerv(GL_MAJOR_VERSION, &version.major);
+ glGetIntegerv(GL_MINOR_VERSION, &version.minor);
+
+ if (version.major < 3)
+ return -1;
+ return 0;
+}
+
+static void load_procs(void);
+
+int gl3wInit(void)
+{
+ open_libgl();
+ load_procs();
+ close_libgl();
+ return parse_version();
+}
+
+int gl3wIsSupported(int major, int minor)
+{
+ if (major < 3)
+ return 0;
+ if (version.major == major)
+ return version.minor >= minor;
+ return version.major >= major;
+}
+
+void *gl3wGetProcAddress(const char *proc)
+{
+ return get_proc(proc);
+}
+
+PFNGLCULLFACEPROC gl3wCullFace;
+PFNGLFRONTFACEPROC gl3wFrontFace;
+PFNGLHINTPROC gl3wHint;
+PFNGLLINEWIDTHPROC gl3wLineWidth;
+PFNGLPOINTSIZEPROC gl3wPointSize;
+PFNGLPOLYGONMODEPROC gl3wPolygonMode;
+PFNGLSCISSORPROC gl3wScissor;
+PFNGLTEXPARAMETERFPROC gl3wTexParameterf;
+PFNGLTEXPARAMETERFVPROC gl3wTexParameterfv;
+PFNGLTEXPARAMETERIPROC gl3wTexParameteri;
+PFNGLTEXPARAMETERIVPROC gl3wTexParameteriv;
+PFNGLTEXIMAGE1DPROC gl3wTexImage1D;
+PFNGLTEXIMAGE2DPROC gl3wTexImage2D;
+PFNGLDRAWBUFFERPROC gl3wDrawBuffer;
+PFNGLCLEARPROC gl3wClear;
+PFNGLCLEARCOLORPROC gl3wClearColor;
+PFNGLCLEARSTENCILPROC gl3wClearStencil;
+PFNGLCLEARDEPTHPROC gl3wClearDepth;
+PFNGLSTENCILMASKPROC gl3wStencilMask;
+PFNGLCOLORMASKPROC gl3wColorMask;
+PFNGLDEPTHMASKPROC gl3wDepthMask;
+PFNGLDISABLEPROC gl3wDisable;
+PFNGLENABLEPROC gl3wEnable;
+PFNGLFINISHPROC gl3wFinish;
+PFNGLFLUSHPROC gl3wFlush;
+PFNGLBLENDFUNCPROC gl3wBlendFunc;
+PFNGLLOGICOPPROC gl3wLogicOp;
+PFNGLSTENCILFUNCPROC gl3wStencilFunc;
+PFNGLSTENCILOPPROC gl3wStencilOp;
+PFNGLDEPTHFUNCPROC gl3wDepthFunc;
+PFNGLPIXELSTOREFPROC gl3wPixelStoref;
+PFNGLPIXELSTOREIPROC gl3wPixelStorei;
+PFNGLREADBUFFERPROC gl3wReadBuffer;
+PFNGLREADPIXELSPROC gl3wReadPixels;
+PFNGLGETBOOLEANVPROC gl3wGetBooleanv;
+PFNGLGETDOUBLEVPROC gl3wGetDoublev;
+PFNGLGETERRORPROC gl3wGetError;
+PFNGLGETFLOATVPROC gl3wGetFloatv;
+PFNGLGETINTEGERVPROC gl3wGetIntegerv;
+PFNGLGETSTRINGPROC gl3wGetString;
+PFNGLGETTEXIMAGEPROC gl3wGetTexImage;
+PFNGLGETTEXPARAMETERFVPROC gl3wGetTexParameterfv;
+PFNGLGETTEXPARAMETERIVPROC gl3wGetTexParameteriv;
+PFNGLGETTEXLEVELPARAMETERFVPROC gl3wGetTexLevelParameterfv;
+PFNGLGETTEXLEVELPARAMETERIVPROC gl3wGetTexLevelParameteriv;
+PFNGLISENABLEDPROC gl3wIsEnabled;
+PFNGLDEPTHRANGEPROC gl3wDepthRange;
+PFNGLVIEWPORTPROC gl3wViewport;
+PFNGLDRAWARRAYSPROC gl3wDrawArrays;
+PFNGLDRAWELEMENTSPROC gl3wDrawElements;
+PFNGLGETPOINTERVPROC gl3wGetPointerv;
+PFNGLPOLYGONOFFSETPROC gl3wPolygonOffset;
+PFNGLCOPYTEXIMAGE1DPROC gl3wCopyTexImage1D;
+PFNGLCOPYTEXIMAGE2DPROC gl3wCopyTexImage2D;
+PFNGLCOPYTEXSUBIMAGE1DPROC gl3wCopyTexSubImage1D;
+PFNGLCOPYTEXSUBIMAGE2DPROC gl3wCopyTexSubImage2D;
+PFNGLTEXSUBIMAGE1DPROC gl3wTexSubImage1D;
+PFNGLTEXSUBIMAGE2DPROC gl3wTexSubImage2D;
+PFNGLBINDTEXTUREPROC gl3wBindTexture;
+PFNGLDELETETEXTURESPROC gl3wDeleteTextures;
+PFNGLGENTEXTURESPROC gl3wGenTextures;
+PFNGLISTEXTUREPROC gl3wIsTexture;
+PFNGLBLENDCOLORPROC gl3wBlendColor;
+PFNGLBLENDEQUATIONPROC gl3wBlendEquation;
+PFNGLDRAWRANGEELEMENTSPROC gl3wDrawRangeElements;
+PFNGLTEXIMAGE3DPROC gl3wTexImage3D;
+PFNGLTEXSUBIMAGE3DPROC gl3wTexSubImage3D;
+PFNGLCOPYTEXSUBIMAGE3DPROC gl3wCopyTexSubImage3D;
+PFNGLACTIVETEXTUREPROC gl3wActiveTexture;
+PFNGLSAMPLECOVERAGEPROC gl3wSampleCoverage;
+PFNGLCOMPRESSEDTEXIMAGE3DPROC gl3wCompressedTexImage3D;
+PFNGLCOMPRESSEDTEXIMAGE2DPROC gl3wCompressedTexImage2D;
+PFNGLCOMPRESSEDTEXIMAGE1DPROC gl3wCompressedTexImage1D;
+PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC gl3wCompressedTexSubImage3D;
+PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC gl3wCompressedTexSubImage2D;
+PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC gl3wCompressedTexSubImage1D;
+PFNGLGETCOMPRESSEDTEXIMAGEPROC gl3wGetCompressedTexImage;
+PFNGLBLENDFUNCSEPARATEPROC gl3wBlendFuncSeparate;
+PFNGLMULTIDRAWARRAYSPROC gl3wMultiDrawArrays;
+PFNGLMULTIDRAWELEMENTSPROC gl3wMultiDrawElements;
+PFNGLPOINTPARAMETERFPROC gl3wPointParameterf;
+PFNGLPOINTPARAMETERFVPROC gl3wPointParameterfv;
+PFNGLPOINTPARAMETERIPROC gl3wPointParameteri;
+PFNGLPOINTPARAMETERIVPROC gl3wPointParameteriv;
+PFNGLGENQUERIESPROC gl3wGenQueries;
+PFNGLDELETEQUERIESPROC gl3wDeleteQueries;
+PFNGLISQUERYPROC gl3wIsQuery;
+PFNGLBEGINQUERYPROC gl3wBeginQuery;
+PFNGLENDQUERYPROC gl3wEndQuery;
+PFNGLGETQUERYIVPROC gl3wGetQueryiv;
+PFNGLGETQUERYOBJECTIVPROC gl3wGetQueryObjectiv;
+PFNGLGETQUERYOBJECTUIVPROC gl3wGetQueryObjectuiv;
+PFNGLBINDBUFFERPROC gl3wBindBuffer;
+PFNGLDELETEBUFFERSPROC gl3wDeleteBuffers;
+PFNGLGENBUFFERSPROC gl3wGenBuffers;
+PFNGLISBUFFERPROC gl3wIsBuffer;
+PFNGLBUFFERDATAPROC gl3wBufferData;
+PFNGLBUFFERSUBDATAPROC gl3wBufferSubData;
+PFNGLGETBUFFERSUBDATAPROC gl3wGetBufferSubData;
+PFNGLMAPBUFFERPROC gl3wMapBuffer;
+PFNGLUNMAPBUFFERPROC gl3wUnmapBuffer;
+PFNGLGETBUFFERPARAMETERIVPROC gl3wGetBufferParameteriv;
+PFNGLGETBUFFERPOINTERVPROC gl3wGetBufferPointerv;
+PFNGLBLENDEQUATIONSEPARATEPROC gl3wBlendEquationSeparate;
+PFNGLDRAWBUFFERSPROC gl3wDrawBuffers;
+PFNGLSTENCILOPSEPARATEPROC gl3wStencilOpSeparate;
+PFNGLSTENCILFUNCSEPARATEPROC gl3wStencilFuncSeparate;
+PFNGLSTENCILMASKSEPARATEPROC gl3wStencilMaskSeparate;
+PFNGLATTACHSHADERPROC gl3wAttachShader;
+PFNGLBINDATTRIBLOCATIONPROC gl3wBindAttribLocation;
+PFNGLCOMPILESHADERPROC gl3wCompileShader;
+PFNGLCREATEPROGRAMPROC gl3wCreateProgram;
+PFNGLCREATESHADERPROC gl3wCreateShader;
+PFNGLDELETEPROGRAMPROC gl3wDeleteProgram;
+PFNGLDELETESHADERPROC gl3wDeleteShader;
+PFNGLDETACHSHADERPROC gl3wDetachShader;
+PFNGLDISABLEVERTEXATTRIBARRAYPROC gl3wDisableVertexAttribArray;
+PFNGLENABLEVERTEXATTRIBARRAYPROC gl3wEnableVertexAttribArray;
+PFNGLGETACTIVEATTRIBPROC gl3wGetActiveAttrib;
+PFNGLGETACTIVEUNIFORMPROC gl3wGetActiveUniform;
+PFNGLGETATTACHEDSHADERSPROC gl3wGetAttachedShaders;
+PFNGLGETATTRIBLOCATIONPROC gl3wGetAttribLocation;
+PFNGLGETPROGRAMIVPROC gl3wGetProgramiv;
+PFNGLGETPROGRAMINFOLOGPROC gl3wGetProgramInfoLog;
+PFNGLGETSHADERIVPROC gl3wGetShaderiv;
+PFNGLGETSHADERINFOLOGPROC gl3wGetShaderInfoLog;
+PFNGLGETSHADERSOURCEPROC gl3wGetShaderSource;
+PFNGLGETUNIFORMLOCATIONPROC gl3wGetUniformLocation;
+PFNGLGETUNIFORMFVPROC gl3wGetUniformfv;
+PFNGLGETUNIFORMIVPROC gl3wGetUniformiv;
+PFNGLGETVERTEXATTRIBDVPROC gl3wGetVertexAttribdv;
+PFNGLGETVERTEXATTRIBFVPROC gl3wGetVertexAttribfv;
+PFNGLGETVERTEXATTRIBIVPROC gl3wGetVertexAttribiv;
+PFNGLGETVERTEXATTRIBPOINTERVPROC gl3wGetVertexAttribPointerv;
+PFNGLISPROGRAMPROC gl3wIsProgram;
+PFNGLISSHADERPROC gl3wIsShader;
+PFNGLLINKPROGRAMPROC gl3wLinkProgram;
+PFNGLSHADERSOURCEPROC gl3wShaderSource;
+PFNGLUSEPROGRAMPROC gl3wUseProgram;
+PFNGLUNIFORM1FPROC gl3wUniform1f;
+PFNGLUNIFORM2FPROC gl3wUniform2f;
+PFNGLUNIFORM3FPROC gl3wUniform3f;
+PFNGLUNIFORM4FPROC gl3wUniform4f;
+PFNGLUNIFORM1IPROC gl3wUniform1i;
+PFNGLUNIFORM2IPROC gl3wUniform2i;
+PFNGLUNIFORM3IPROC gl3wUniform3i;
+PFNGLUNIFORM4IPROC gl3wUniform4i;
+PFNGLUNIFORM1FVPROC gl3wUniform1fv;
+PFNGLUNIFORM2FVPROC gl3wUniform2fv;
+PFNGLUNIFORM3FVPROC gl3wUniform3fv;
+PFNGLUNIFORM4FVPROC gl3wUniform4fv;
+PFNGLUNIFORM1IVPROC gl3wUniform1iv;
+PFNGLUNIFORM2IVPROC gl3wUniform2iv;
+PFNGLUNIFORM3IVPROC gl3wUniform3iv;
+PFNGLUNIFORM4IVPROC gl3wUniform4iv;
+PFNGLUNIFORMMATRIX2FVPROC gl3wUniformMatrix2fv;
+PFNGLUNIFORMMATRIX3FVPROC gl3wUniformMatrix3fv;
+PFNGLUNIFORMMATRIX4FVPROC gl3wUniformMatrix4fv;
+PFNGLVALIDATEPROGRAMPROC gl3wValidateProgram;
+PFNGLVERTEXATTRIB1DPROC gl3wVertexAttrib1d;
+PFNGLVERTEXATTRIB1DVPROC gl3wVertexAttrib1dv;
+PFNGLVERTEXATTRIB1FPROC gl3wVertexAttrib1f;
+PFNGLVERTEXATTRIB1FVPROC gl3wVertexAttrib1fv;
+PFNGLVERTEXATTRIB1SPROC gl3wVertexAttrib1s;
+PFNGLVERTEXATTRIB1SVPROC gl3wVertexAttrib1sv;
+PFNGLVERTEXATTRIB2DPROC gl3wVertexAttrib2d;
+PFNGLVERTEXATTRIB2DVPROC gl3wVertexAttrib2dv;
+PFNGLVERTEXATTRIB2FPROC gl3wVertexAttrib2f;
+PFNGLVERTEXATTRIB2FVPROC gl3wVertexAttrib2fv;
+PFNGLVERTEXATTRIB2SPROC gl3wVertexAttrib2s;
+PFNGLVERTEXATTRIB2SVPROC gl3wVertexAttrib2sv;
+PFNGLVERTEXATTRIB3DPROC gl3wVertexAttrib3d;
+PFNGLVERTEXATTRIB3DVPROC gl3wVertexAttrib3dv;
+PFNGLVERTEXATTRIB3FPROC gl3wVertexAttrib3f;
+PFNGLVERTEXATTRIB3FVPROC gl3wVertexAttrib3fv;
+PFNGLVERTEXATTRIB3SPROC gl3wVertexAttrib3s;
+PFNGLVERTEXATTRIB3SVPROC gl3wVertexAttrib3sv;
+PFNGLVERTEXATTRIB4NBVPROC gl3wVertexAttrib4Nbv;
+PFNGLVERTEXATTRIB4NIVPROC gl3wVertexAttrib4Niv;
+PFNGLVERTEXATTRIB4NSVPROC gl3wVertexAttrib4Nsv;
+PFNGLVERTEXATTRIB4NUBPROC gl3wVertexAttrib4Nub;
+PFNGLVERTEXATTRIB4NUBVPROC gl3wVertexAttrib4Nubv;
+PFNGLVERTEXATTRIB4NUIVPROC gl3wVertexAttrib4Nuiv;
+PFNGLVERTEXATTRIB4NUSVPROC gl3wVertexAttrib4Nusv;
+PFNGLVERTEXATTRIB4BVPROC gl3wVertexAttrib4bv;
+PFNGLVERTEXATTRIB4DPROC gl3wVertexAttrib4d;
+PFNGLVERTEXATTRIB4DVPROC gl3wVertexAttrib4dv;
+PFNGLVERTEXATTRIB4FPROC gl3wVertexAttrib4f;
+PFNGLVERTEXATTRIB4FVPROC gl3wVertexAttrib4fv;
+PFNGLVERTEXATTRIB4IVPROC gl3wVertexAttrib4iv;
+PFNGLVERTEXATTRIB4SPROC gl3wVertexAttrib4s;
+PFNGLVERTEXATTRIB4SVPROC gl3wVertexAttrib4sv;
+PFNGLVERTEXATTRIB4UBVPROC gl3wVertexAttrib4ubv;
+PFNGLVERTEXATTRIB4UIVPROC gl3wVertexAttrib4uiv;
+PFNGLVERTEXATTRIB4USVPROC gl3wVertexAttrib4usv;
+PFNGLVERTEXATTRIBPOINTERPROC gl3wVertexAttribPointer;
+PFNGLUNIFORMMATRIX2X3FVPROC gl3wUniformMatrix2x3fv;
+PFNGLUNIFORMMATRIX3X2FVPROC gl3wUniformMatrix3x2fv;
+PFNGLUNIFORMMATRIX2X4FVPROC gl3wUniformMatrix2x4fv;
+PFNGLUNIFORMMATRIX4X2FVPROC gl3wUniformMatrix4x2fv;
+PFNGLUNIFORMMATRIX3X4FVPROC gl3wUniformMatrix3x4fv;
+PFNGLUNIFORMMATRIX4X3FVPROC gl3wUniformMatrix4x3fv;
+PFNGLCOLORMASKIPROC gl3wColorMaski;
+PFNGLGETBOOLEANI_VPROC gl3wGetBooleani_v;
+PFNGLGETINTEGERI_VPROC gl3wGetIntegeri_v;
+PFNGLENABLEIPROC gl3wEnablei;
+PFNGLDISABLEIPROC gl3wDisablei;
+PFNGLISENABLEDIPROC gl3wIsEnabledi;
+PFNGLBEGINTRANSFORMFEEDBACKPROC gl3wBeginTransformFeedback;
+PFNGLENDTRANSFORMFEEDBACKPROC gl3wEndTransformFeedback;
+PFNGLBINDBUFFERRANGEPROC gl3wBindBufferRange;
+PFNGLBINDBUFFERBASEPROC gl3wBindBufferBase;
+PFNGLTRANSFORMFEEDBACKVARYINGSPROC gl3wTransformFeedbackVaryings;
+PFNGLGETTRANSFORMFEEDBACKVARYINGPROC gl3wGetTransformFeedbackVarying;
+PFNGLCLAMPCOLORPROC gl3wClampColor;
+PFNGLBEGINCONDITIONALRENDERPROC gl3wBeginConditionalRender;
+PFNGLENDCONDITIONALRENDERPROC gl3wEndConditionalRender;
+PFNGLVERTEXATTRIBIPOINTERPROC gl3wVertexAttribIPointer;
+PFNGLGETVERTEXATTRIBIIVPROC gl3wGetVertexAttribIiv;
+PFNGLGETVERTEXATTRIBIUIVPROC gl3wGetVertexAttribIuiv;
+PFNGLVERTEXATTRIBI1IPROC gl3wVertexAttribI1i;
+PFNGLVERTEXATTRIBI2IPROC gl3wVertexAttribI2i;
+PFNGLVERTEXATTRIBI3IPROC gl3wVertexAttribI3i;
+PFNGLVERTEXATTRIBI4IPROC gl3wVertexAttribI4i;
+PFNGLVERTEXATTRIBI1UIPROC gl3wVertexAttribI1ui;
+PFNGLVERTEXATTRIBI2UIPROC gl3wVertexAttribI2ui;
+PFNGLVERTEXATTRIBI3UIPROC gl3wVertexAttribI3ui;
+PFNGLVERTEXATTRIBI4UIPROC gl3wVertexAttribI4ui;
+PFNGLVERTEXATTRIBI1IVPROC gl3wVertexAttribI1iv;
+PFNGLVERTEXATTRIBI2IVPROC gl3wVertexAttribI2iv;
+PFNGLVERTEXATTRIBI3IVPROC gl3wVertexAttribI3iv;
+PFNGLVERTEXATTRIBI4IVPROC gl3wVertexAttribI4iv;
+PFNGLVERTEXATTRIBI1UIVPROC gl3wVertexAttribI1uiv;
+PFNGLVERTEXATTRIBI2UIVPROC gl3wVertexAttribI2uiv;
+PFNGLVERTEXATTRIBI3UIVPROC gl3wVertexAttribI3uiv;
+PFNGLVERTEXATTRIBI4UIVPROC gl3wVertexAttribI4uiv;
+PFNGLVERTEXATTRIBI4BVPROC gl3wVertexAttribI4bv;
+PFNGLVERTEXATTRIBI4SVPROC gl3wVertexAttribI4sv;
+PFNGLVERTEXATTRIBI4UBVPROC gl3wVertexAttribI4ubv;
+PFNGLVERTEXATTRIBI4USVPROC gl3wVertexAttribI4usv;
+PFNGLGETUNIFORMUIVPROC gl3wGetUniformuiv;
+PFNGLBINDFRAGDATALOCATIONPROC gl3wBindFragDataLocation;
+PFNGLGETFRAGDATALOCATIONPROC gl3wGetFragDataLocation;
+PFNGLUNIFORM1UIPROC gl3wUniform1ui;
+PFNGLUNIFORM2UIPROC gl3wUniform2ui;
+PFNGLUNIFORM3UIPROC gl3wUniform3ui;
+PFNGLUNIFORM4UIPROC gl3wUniform4ui;
+PFNGLUNIFORM1UIVPROC gl3wUniform1uiv;
+PFNGLUNIFORM2UIVPROC gl3wUniform2uiv;
+PFNGLUNIFORM3UIVPROC gl3wUniform3uiv;
+PFNGLUNIFORM4UIVPROC gl3wUniform4uiv;
+PFNGLTEXPARAMETERIIVPROC gl3wTexParameterIiv;
+PFNGLTEXPARAMETERIUIVPROC gl3wTexParameterIuiv;
+PFNGLGETTEXPARAMETERIIVPROC gl3wGetTexParameterIiv;
+PFNGLGETTEXPARAMETERIUIVPROC gl3wGetTexParameterIuiv;
+PFNGLCLEARBUFFERIVPROC gl3wClearBufferiv;
+PFNGLCLEARBUFFERUIVPROC gl3wClearBufferuiv;
+PFNGLCLEARBUFFERFVPROC gl3wClearBufferfv;
+PFNGLCLEARBUFFERFIPROC gl3wClearBufferfi;
+PFNGLGETSTRINGIPROC gl3wGetStringi;
+PFNGLDRAWARRAYSINSTANCEDPROC gl3wDrawArraysInstanced;
+PFNGLDRAWELEMENTSINSTANCEDPROC gl3wDrawElementsInstanced;
+PFNGLTEXBUFFERPROC gl3wTexBuffer;
+PFNGLPRIMITIVERESTARTINDEXPROC gl3wPrimitiveRestartIndex;
+PFNGLGETINTEGER64I_VPROC gl3wGetInteger64i_v;
+PFNGLGETBUFFERPARAMETERI64VPROC gl3wGetBufferParameteri64v;
+PFNGLFRAMEBUFFERTEXTUREPROC gl3wFramebufferTexture;
+PFNGLVERTEXATTRIBDIVISORPROC gl3wVertexAttribDivisor;
+PFNGLMINSAMPLESHADINGPROC gl3wMinSampleShading;
+PFNGLBLENDEQUATIONIPROC gl3wBlendEquationi;
+PFNGLBLENDEQUATIONSEPARATEIPROC gl3wBlendEquationSeparatei;
+PFNGLBLENDFUNCIPROC gl3wBlendFunci;
+PFNGLBLENDFUNCSEPARATEIPROC gl3wBlendFuncSeparatei;
+PFNGLISRENDERBUFFERPROC gl3wIsRenderbuffer;
+PFNGLBINDRENDERBUFFERPROC gl3wBindRenderbuffer;
+PFNGLDELETERENDERBUFFERSPROC gl3wDeleteRenderbuffers;
+PFNGLGENRENDERBUFFERSPROC gl3wGenRenderbuffers;
+PFNGLRENDERBUFFERSTORAGEPROC gl3wRenderbufferStorage;
+PFNGLGETRENDERBUFFERPARAMETERIVPROC gl3wGetRenderbufferParameteriv;
+PFNGLISFRAMEBUFFERPROC gl3wIsFramebuffer;
+PFNGLBINDFRAMEBUFFERPROC gl3wBindFramebuffer;
+PFNGLDELETEFRAMEBUFFERSPROC gl3wDeleteFramebuffers;
+PFNGLGENFRAMEBUFFERSPROC gl3wGenFramebuffers;
+PFNGLCHECKFRAMEBUFFERSTATUSPROC gl3wCheckFramebufferStatus;
+PFNGLFRAMEBUFFERTEXTURE1DPROC gl3wFramebufferTexture1D;
+PFNGLFRAMEBUFFERTEXTURE2DPROC gl3wFramebufferTexture2D;
+PFNGLFRAMEBUFFERTEXTURE3DPROC gl3wFramebufferTexture3D;
+PFNGLFRAMEBUFFERRENDERBUFFERPROC gl3wFramebufferRenderbuffer;
+PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC gl3wGetFramebufferAttachmentParameteriv;
+PFNGLGENERATEMIPMAPPROC gl3wGenerateMipmap;
+PFNGLBLITFRAMEBUFFERPROC gl3wBlitFramebuffer;
+PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC gl3wRenderbufferStorageMultisample;
+PFNGLFRAMEBUFFERTEXTURELAYERPROC gl3wFramebufferTextureLayer;
+PFNGLMAPBUFFERRANGEPROC gl3wMapBufferRange;
+PFNGLFLUSHMAPPEDBUFFERRANGEPROC gl3wFlushMappedBufferRange;
+PFNGLBINDVERTEXARRAYPROC gl3wBindVertexArray;
+PFNGLDELETEVERTEXARRAYSPROC gl3wDeleteVertexArrays;
+PFNGLGENVERTEXARRAYSPROC gl3wGenVertexArrays;
+PFNGLISVERTEXARRAYPROC gl3wIsVertexArray;
+PFNGLGETUNIFORMINDICESPROC gl3wGetUniformIndices;
+PFNGLGETACTIVEUNIFORMSIVPROC gl3wGetActiveUniformsiv;
+PFNGLGETACTIVEUNIFORMNAMEPROC gl3wGetActiveUniformName;
+PFNGLGETUNIFORMBLOCKINDEXPROC gl3wGetUniformBlockIndex;
+PFNGLGETACTIVEUNIFORMBLOCKIVPROC gl3wGetActiveUniformBlockiv;
+PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC gl3wGetActiveUniformBlockName;
+PFNGLUNIFORMBLOCKBINDINGPROC gl3wUniformBlockBinding;
+PFNGLCOPYBUFFERSUBDATAPROC gl3wCopyBufferSubData;
+PFNGLDRAWELEMENTSBASEVERTEXPROC gl3wDrawElementsBaseVertex;
+PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC gl3wDrawRangeElementsBaseVertex;
+PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC gl3wDrawElementsInstancedBaseVertex;
+PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC gl3wMultiDrawElementsBaseVertex;
+PFNGLPROVOKINGVERTEXPROC gl3wProvokingVertex;
+PFNGLFENCESYNCPROC gl3wFenceSync;
+PFNGLISSYNCPROC gl3wIsSync;
+PFNGLDELETESYNCPROC gl3wDeleteSync;
+PFNGLCLIENTWAITSYNCPROC gl3wClientWaitSync;
+PFNGLWAITSYNCPROC gl3wWaitSync;
+PFNGLGETINTEGER64VPROC gl3wGetInteger64v;
+PFNGLGETSYNCIVPROC gl3wGetSynciv;
+PFNGLTEXIMAGE2DMULTISAMPLEPROC gl3wTexImage2DMultisample;
+PFNGLTEXIMAGE3DMULTISAMPLEPROC gl3wTexImage3DMultisample;
+PFNGLGETMULTISAMPLEFVPROC gl3wGetMultisamplefv;
+PFNGLSAMPLEMASKIPROC gl3wSampleMaski;
+PFNGLBLENDEQUATIONIARBPROC gl3wBlendEquationiARB;
+PFNGLBLENDEQUATIONSEPARATEIARBPROC gl3wBlendEquationSeparateiARB;
+PFNGLBLENDFUNCIARBPROC gl3wBlendFunciARB;
+PFNGLBLENDFUNCSEPARATEIARBPROC gl3wBlendFuncSeparateiARB;
+PFNGLMINSAMPLESHADINGARBPROC gl3wMinSampleShadingARB;
+PFNGLNAMEDSTRINGARBPROC gl3wNamedStringARB;
+PFNGLDELETENAMEDSTRINGARBPROC gl3wDeleteNamedStringARB;
+PFNGLCOMPILESHADERINCLUDEARBPROC gl3wCompileShaderIncludeARB;
+PFNGLISNAMEDSTRINGARBPROC gl3wIsNamedStringARB;
+PFNGLGETNAMEDSTRINGARBPROC gl3wGetNamedStringARB;
+PFNGLGETNAMEDSTRINGIVARBPROC gl3wGetNamedStringivARB;
+PFNGLBINDFRAGDATALOCATIONINDEXEDPROC gl3wBindFragDataLocationIndexed;
+PFNGLGETFRAGDATAINDEXPROC gl3wGetFragDataIndex;
+PFNGLGENSAMPLERSPROC gl3wGenSamplers;
+PFNGLDELETESAMPLERSPROC gl3wDeleteSamplers;
+PFNGLISSAMPLERPROC gl3wIsSampler;
+PFNGLBINDSAMPLERPROC gl3wBindSampler;
+PFNGLSAMPLERPARAMETERIPROC gl3wSamplerParameteri;
+PFNGLSAMPLERPARAMETERIVPROC gl3wSamplerParameteriv;
+PFNGLSAMPLERPARAMETERFPROC gl3wSamplerParameterf;
+PFNGLSAMPLERPARAMETERFVPROC gl3wSamplerParameterfv;
+PFNGLSAMPLERPARAMETERIIVPROC gl3wSamplerParameterIiv;
+PFNGLSAMPLERPARAMETERIUIVPROC gl3wSamplerParameterIuiv;
+PFNGLGETSAMPLERPARAMETERIVPROC gl3wGetSamplerParameteriv;
+PFNGLGETSAMPLERPARAMETERIIVPROC gl3wGetSamplerParameterIiv;
+PFNGLGETSAMPLERPARAMETERFVPROC gl3wGetSamplerParameterfv;
+PFNGLGETSAMPLERPARAMETERIUIVPROC gl3wGetSamplerParameterIuiv;
+PFNGLQUERYCOUNTERPROC gl3wQueryCounter;
+PFNGLGETQUERYOBJECTI64VPROC gl3wGetQueryObjecti64v;
+PFNGLGETQUERYOBJECTUI64VPROC gl3wGetQueryObjectui64v;
+PFNGLVERTEXP2UIPROC gl3wVertexP2ui;
+PFNGLVERTEXP2UIVPROC gl3wVertexP2uiv;
+PFNGLVERTEXP3UIPROC gl3wVertexP3ui;
+PFNGLVERTEXP3UIVPROC gl3wVertexP3uiv;
+PFNGLVERTEXP4UIPROC gl3wVertexP4ui;
+PFNGLVERTEXP4UIVPROC gl3wVertexP4uiv;
+PFNGLTEXCOORDP1UIPROC gl3wTexCoordP1ui;
+PFNGLTEXCOORDP1UIVPROC gl3wTexCoordP1uiv;
+PFNGLTEXCOORDP2UIPROC gl3wTexCoordP2ui;
+PFNGLTEXCOORDP2UIVPROC gl3wTexCoordP2uiv;
+PFNGLTEXCOORDP3UIPROC gl3wTexCoordP3ui;
+PFNGLTEXCOORDP3UIVPROC gl3wTexCoordP3uiv;
+PFNGLTEXCOORDP4UIPROC gl3wTexCoordP4ui;
+PFNGLTEXCOORDP4UIVPROC gl3wTexCoordP4uiv;
+PFNGLMULTITEXCOORDP1UIPROC gl3wMultiTexCoordP1ui;
+PFNGLMULTITEXCOORDP1UIVPROC gl3wMultiTexCoordP1uiv;
+PFNGLMULTITEXCOORDP2UIPROC gl3wMultiTexCoordP2ui;
+PFNGLMULTITEXCOORDP2UIVPROC gl3wMultiTexCoordP2uiv;
+PFNGLMULTITEXCOORDP3UIPROC gl3wMultiTexCoordP3ui;
+PFNGLMULTITEXCOORDP3UIVPROC gl3wMultiTexCoordP3uiv;
+PFNGLMULTITEXCOORDP4UIPROC gl3wMultiTexCoordP4ui;
+PFNGLMULTITEXCOORDP4UIVPROC gl3wMultiTexCoordP4uiv;
+PFNGLNORMALP3UIPROC gl3wNormalP3ui;
+PFNGLNORMALP3UIVPROC gl3wNormalP3uiv;
+PFNGLCOLORP3UIPROC gl3wColorP3ui;
+PFNGLCOLORP3UIVPROC gl3wColorP3uiv;
+PFNGLCOLORP4UIPROC gl3wColorP4ui;
+PFNGLCOLORP4UIVPROC gl3wColorP4uiv;
+PFNGLSECONDARYCOLORP3UIPROC gl3wSecondaryColorP3ui;
+PFNGLSECONDARYCOLORP3UIVPROC gl3wSecondaryColorP3uiv;
+PFNGLVERTEXATTRIBP1UIPROC gl3wVertexAttribP1ui;
+PFNGLVERTEXATTRIBP1UIVPROC gl3wVertexAttribP1uiv;
+PFNGLVERTEXATTRIBP2UIPROC gl3wVertexAttribP2ui;
+PFNGLVERTEXATTRIBP2UIVPROC gl3wVertexAttribP2uiv;
+PFNGLVERTEXATTRIBP3UIPROC gl3wVertexAttribP3ui;
+PFNGLVERTEXATTRIBP3UIVPROC gl3wVertexAttribP3uiv;
+PFNGLVERTEXATTRIBP4UIPROC gl3wVertexAttribP4ui;
+PFNGLVERTEXATTRIBP4UIVPROC gl3wVertexAttribP4uiv;
+PFNGLDRAWARRAYSINDIRECTPROC gl3wDrawArraysIndirect;
+PFNGLDRAWELEMENTSINDIRECTPROC gl3wDrawElementsIndirect;
+PFNGLUNIFORM1DPROC gl3wUniform1d;
+PFNGLUNIFORM2DPROC gl3wUniform2d;
+PFNGLUNIFORM3DPROC gl3wUniform3d;
+PFNGLUNIFORM4DPROC gl3wUniform4d;
+PFNGLUNIFORM1DVPROC gl3wUniform1dv;
+PFNGLUNIFORM2DVPROC gl3wUniform2dv;
+PFNGLUNIFORM3DVPROC gl3wUniform3dv;
+PFNGLUNIFORM4DVPROC gl3wUniform4dv;
+PFNGLUNIFORMMATRIX2DVPROC gl3wUniformMatrix2dv;
+PFNGLUNIFORMMATRIX3DVPROC gl3wUniformMatrix3dv;
+PFNGLUNIFORMMATRIX4DVPROC gl3wUniformMatrix4dv;
+PFNGLUNIFORMMATRIX2X3DVPROC gl3wUniformMatrix2x3dv;
+PFNGLUNIFORMMATRIX2X4DVPROC gl3wUniformMatrix2x4dv;
+PFNGLUNIFORMMATRIX3X2DVPROC gl3wUniformMatrix3x2dv;
+PFNGLUNIFORMMATRIX3X4DVPROC gl3wUniformMatrix3x4dv;
+PFNGLUNIFORMMATRIX4X2DVPROC gl3wUniformMatrix4x2dv;
+PFNGLUNIFORMMATRIX4X3DVPROC gl3wUniformMatrix4x3dv;
+PFNGLGETUNIFORMDVPROC gl3wGetUniformdv;
+PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC gl3wGetSubroutineUniformLocation;
+PFNGLGETSUBROUTINEINDEXPROC gl3wGetSubroutineIndex;
+PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC gl3wGetActiveSubroutineUniformiv;
+PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC gl3wGetActiveSubroutineUniformName;
+PFNGLGETACTIVESUBROUTINENAMEPROC gl3wGetActiveSubroutineName;
+PFNGLUNIFORMSUBROUTINESUIVPROC gl3wUniformSubroutinesuiv;
+PFNGLGETUNIFORMSUBROUTINEUIVPROC gl3wGetUniformSubroutineuiv;
+PFNGLGETPROGRAMSTAGEIVPROC gl3wGetProgramStageiv;
+PFNGLPATCHPARAMETERIPROC gl3wPatchParameteri;
+PFNGLPATCHPARAMETERFVPROC gl3wPatchParameterfv;
+PFNGLBINDTRANSFORMFEEDBACKPROC gl3wBindTransformFeedback;
+PFNGLDELETETRANSFORMFEEDBACKSPROC gl3wDeleteTransformFeedbacks;
+PFNGLGENTRANSFORMFEEDBACKSPROC gl3wGenTransformFeedbacks;
+PFNGLISTRANSFORMFEEDBACKPROC gl3wIsTransformFeedback;
+PFNGLPAUSETRANSFORMFEEDBACKPROC gl3wPauseTransformFeedback;
+PFNGLRESUMETRANSFORMFEEDBACKPROC gl3wResumeTransformFeedback;
+PFNGLDRAWTRANSFORMFEEDBACKPROC gl3wDrawTransformFeedback;
+PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC gl3wDrawTransformFeedbackStream;
+PFNGLBEGINQUERYINDEXEDPROC gl3wBeginQueryIndexed;
+PFNGLENDQUERYINDEXEDPROC gl3wEndQueryIndexed;
+PFNGLGETQUERYINDEXEDIVPROC gl3wGetQueryIndexediv;
+PFNGLRELEASESHADERCOMPILERPROC gl3wReleaseShaderCompiler;
+PFNGLSHADERBINARYPROC gl3wShaderBinary;
+PFNGLGETSHADERPRECISIONFORMATPROC gl3wGetShaderPrecisionFormat;
+PFNGLDEPTHRANGEFPROC gl3wDepthRangef;
+PFNGLCLEARDEPTHFPROC gl3wClearDepthf;
+PFNGLGETPROGRAMBINARYPROC gl3wGetProgramBinary;
+PFNGLPROGRAMBINARYPROC gl3wProgramBinary;
+PFNGLPROGRAMPARAMETERIPROC gl3wProgramParameteri;
+PFNGLUSEPROGRAMSTAGESPROC gl3wUseProgramStages;
+PFNGLACTIVESHADERPROGRAMPROC gl3wActiveShaderProgram;
+PFNGLCREATESHADERPROGRAMVPROC gl3wCreateShaderProgramv;
+PFNGLBINDPROGRAMPIPELINEPROC gl3wBindProgramPipeline;
+PFNGLDELETEPROGRAMPIPELINESPROC gl3wDeleteProgramPipelines;
+PFNGLGENPROGRAMPIPELINESPROC gl3wGenProgramPipelines;
+PFNGLISPROGRAMPIPELINEPROC gl3wIsProgramPipeline;
+PFNGLGETPROGRAMPIPELINEIVPROC gl3wGetProgramPipelineiv;
+PFNGLPROGRAMUNIFORM1IPROC gl3wProgramUniform1i;
+PFNGLPROGRAMUNIFORM1IVPROC gl3wProgramUniform1iv;
+PFNGLPROGRAMUNIFORM1FPROC gl3wProgramUniform1f;
+PFNGLPROGRAMUNIFORM1FVPROC gl3wProgramUniform1fv;
+PFNGLPROGRAMUNIFORM1DPROC gl3wProgramUniform1d;
+PFNGLPROGRAMUNIFORM1DVPROC gl3wProgramUniform1dv;
+PFNGLPROGRAMUNIFORM1UIPROC gl3wProgramUniform1ui;
+PFNGLPROGRAMUNIFORM1UIVPROC gl3wProgramUniform1uiv;
+PFNGLPROGRAMUNIFORM2IPROC gl3wProgramUniform2i;
+PFNGLPROGRAMUNIFORM2IVPROC gl3wProgramUniform2iv;
+PFNGLPROGRAMUNIFORM2FPROC gl3wProgramUniform2f;
+PFNGLPROGRAMUNIFORM2FVPROC gl3wProgramUniform2fv;
+PFNGLPROGRAMUNIFORM2DPROC gl3wProgramUniform2d;
+PFNGLPROGRAMUNIFORM2DVPROC gl3wProgramUniform2dv;
+PFNGLPROGRAMUNIFORM2UIPROC gl3wProgramUniform2ui;
+PFNGLPROGRAMUNIFORM2UIVPROC gl3wProgramUniform2uiv;
+PFNGLPROGRAMUNIFORM3IPROC gl3wProgramUniform3i;
+PFNGLPROGRAMUNIFORM3IVPROC gl3wProgramUniform3iv;
+PFNGLPROGRAMUNIFORM3FPROC gl3wProgramUniform3f;
+PFNGLPROGRAMUNIFORM3FVPROC gl3wProgramUniform3fv;
+PFNGLPROGRAMUNIFORM3DPROC gl3wProgramUniform3d;
+PFNGLPROGRAMUNIFORM3DVPROC gl3wProgramUniform3dv;
+PFNGLPROGRAMUNIFORM3UIPROC gl3wProgramUniform3ui;
+PFNGLPROGRAMUNIFORM3UIVPROC gl3wProgramUniform3uiv;
+PFNGLPROGRAMUNIFORM4IPROC gl3wProgramUniform4i;
+PFNGLPROGRAMUNIFORM4IVPROC gl3wProgramUniform4iv;
+PFNGLPROGRAMUNIFORM4FPROC gl3wProgramUniform4f;
+PFNGLPROGRAMUNIFORM4FVPROC gl3wProgramUniform4fv;
+PFNGLPROGRAMUNIFORM4DPROC gl3wProgramUniform4d;
+PFNGLPROGRAMUNIFORM4DVPROC gl3wProgramUniform4dv;
+PFNGLPROGRAMUNIFORM4UIPROC gl3wProgramUniform4ui;
+PFNGLPROGRAMUNIFORM4UIVPROC gl3wProgramUniform4uiv;
+PFNGLPROGRAMUNIFORMMATRIX2FVPROC gl3wProgramUniformMatrix2fv;
+PFNGLPROGRAMUNIFORMMATRIX3FVPROC gl3wProgramUniformMatrix3fv;
+PFNGLPROGRAMUNIFORMMATRIX4FVPROC gl3wProgramUniformMatrix4fv;
+PFNGLPROGRAMUNIFORMMATRIX2DVPROC gl3wProgramUniformMatrix2dv;
+PFNGLPROGRAMUNIFORMMATRIX3DVPROC gl3wProgramUniformMatrix3dv;
+PFNGLPROGRAMUNIFORMMATRIX4DVPROC gl3wProgramUniformMatrix4dv;
+PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC gl3wProgramUniformMatrix2x3fv;
+PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC gl3wProgramUniformMatrix3x2fv;
+PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC gl3wProgramUniformMatrix2x4fv;
+PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC gl3wProgramUniformMatrix4x2fv;
+PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC gl3wProgramUniformMatrix3x4fv;
+PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC gl3wProgramUniformMatrix4x3fv;
+PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC gl3wProgramUniformMatrix2x3dv;
+PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC gl3wProgramUniformMatrix3x2dv;
+PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC gl3wProgramUniformMatrix2x4dv;
+PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC gl3wProgramUniformMatrix4x2dv;
+PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC gl3wProgramUniformMatrix3x4dv;
+PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC gl3wProgramUniformMatrix4x3dv;
+PFNGLVALIDATEPROGRAMPIPELINEPROC gl3wValidateProgramPipeline;
+PFNGLGETPROGRAMPIPELINEINFOLOGPROC gl3wGetProgramPipelineInfoLog;
+PFNGLVERTEXATTRIBL1DPROC gl3wVertexAttribL1d;
+PFNGLVERTEXATTRIBL2DPROC gl3wVertexAttribL2d;
+PFNGLVERTEXATTRIBL3DPROC gl3wVertexAttribL3d;
+PFNGLVERTEXATTRIBL4DPROC gl3wVertexAttribL4d;
+PFNGLVERTEXATTRIBL1DVPROC gl3wVertexAttribL1dv;
+PFNGLVERTEXATTRIBL2DVPROC gl3wVertexAttribL2dv;
+PFNGLVERTEXATTRIBL3DVPROC gl3wVertexAttribL3dv;
+PFNGLVERTEXATTRIBL4DVPROC gl3wVertexAttribL4dv;
+PFNGLVERTEXATTRIBLPOINTERPROC gl3wVertexAttribLPointer;
+PFNGLGETVERTEXATTRIBLDVPROC gl3wGetVertexAttribLdv;
+PFNGLVIEWPORTARRAYVPROC gl3wViewportArrayv;
+PFNGLVIEWPORTINDEXEDFPROC gl3wViewportIndexedf;
+PFNGLVIEWPORTINDEXEDFVPROC gl3wViewportIndexedfv;
+PFNGLSCISSORARRAYVPROC gl3wScissorArrayv;
+PFNGLSCISSORINDEXEDPROC gl3wScissorIndexed;
+PFNGLSCISSORINDEXEDVPROC gl3wScissorIndexedv;
+PFNGLDEPTHRANGEARRAYVPROC gl3wDepthRangeArrayv;
+PFNGLDEPTHRANGEINDEXEDPROC gl3wDepthRangeIndexed;
+PFNGLGETFLOATI_VPROC gl3wGetFloati_v;
+PFNGLGETDOUBLEI_VPROC gl3wGetDoublei_v;
+PFNGLCREATESYNCFROMCLEVENTARBPROC gl3wCreateSyncFromCLeventARB;
+PFNGLDEBUGMESSAGECONTROLARBPROC gl3wDebugMessageControlARB;
+PFNGLDEBUGMESSAGEINSERTARBPROC gl3wDebugMessageInsertARB;
+PFNGLDEBUGMESSAGECALLBACKARBPROC gl3wDebugMessageCallbackARB;
+PFNGLGETDEBUGMESSAGELOGARBPROC gl3wGetDebugMessageLogARB;
+PFNGLGETGRAPHICSRESETSTATUSARBPROC gl3wGetGraphicsResetStatusARB;
+PFNGLGETNTEXIMAGEARBPROC gl3wGetnTexImageARB;
+PFNGLREADNPIXELSARBPROC gl3wReadnPixelsARB;
+PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC gl3wGetnCompressedTexImageARB;
+PFNGLGETNUNIFORMFVARBPROC gl3wGetnUniformfvARB;
+PFNGLGETNUNIFORMIVARBPROC gl3wGetnUniformivARB;
+PFNGLGETNUNIFORMUIVARBPROC gl3wGetnUniformuivARB;
+PFNGLGETNUNIFORMDVARBPROC gl3wGetnUniformdvARB;
+PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC gl3wDrawArraysInstancedBaseInstance;
+PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC gl3wDrawElementsInstancedBaseInstance;
+PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC gl3wDrawElementsInstancedBaseVertexBaseInstance;
+PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC gl3wDrawTransformFeedbackInstanced;
+PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC gl3wDrawTransformFeedbackStreamInstanced;
+PFNGLGETINTERNALFORMATIVPROC gl3wGetInternalformativ;
+PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC gl3wGetActiveAtomicCounterBufferiv;
+PFNGLBINDIMAGETEXTUREPROC gl3wBindImageTexture;
+PFNGLMEMORYBARRIERPROC gl3wMemoryBarrier;
+PFNGLTEXSTORAGE1DPROC gl3wTexStorage1D;
+PFNGLTEXSTORAGE2DPROC gl3wTexStorage2D;
+PFNGLTEXSTORAGE3DPROC gl3wTexStorage3D;
+PFNGLTEXTURESTORAGE1DEXTPROC gl3wTextureStorage1DEXT;
+PFNGLTEXTURESTORAGE2DEXTPROC gl3wTextureStorage2DEXT;
+PFNGLTEXTURESTORAGE3DEXTPROC gl3wTextureStorage3DEXT;
+PFNGLDEBUGMESSAGECONTROLPROC gl3wDebugMessageControl;
+PFNGLDEBUGMESSAGEINSERTPROC gl3wDebugMessageInsert;
+PFNGLDEBUGMESSAGECALLBACKPROC gl3wDebugMessageCallback;
+PFNGLGETDEBUGMESSAGELOGPROC gl3wGetDebugMessageLog;
+PFNGLPUSHDEBUGGROUPPROC gl3wPushDebugGroup;
+PFNGLPOPDEBUGGROUPPROC gl3wPopDebugGroup;
+PFNGLOBJECTLABELPROC gl3wObjectLabel;
+PFNGLGETOBJECTLABELPROC gl3wGetObjectLabel;
+PFNGLOBJECTPTRLABELPROC gl3wObjectPtrLabel;
+PFNGLGETOBJECTPTRLABELPROC gl3wGetObjectPtrLabel;
+PFNGLCLEARBUFFERDATAPROC gl3wClearBufferData;
+PFNGLCLEARBUFFERSUBDATAPROC gl3wClearBufferSubData;
+PFNGLCLEARNAMEDBUFFERDATAEXTPROC gl3wClearNamedBufferDataEXT;
+PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC gl3wClearNamedBufferSubDataEXT;
+PFNGLDISPATCHCOMPUTEPROC gl3wDispatchCompute;
+PFNGLDISPATCHCOMPUTEINDIRECTPROC gl3wDispatchComputeIndirect;
+PFNGLCOPYIMAGESUBDATAPROC gl3wCopyImageSubData;
+PFNGLTEXTUREVIEWPROC gl3wTextureView;
+PFNGLBINDVERTEXBUFFERPROC gl3wBindVertexBuffer;
+PFNGLVERTEXATTRIBFORMATPROC gl3wVertexAttribFormat;
+PFNGLVERTEXATTRIBIFORMATPROC gl3wVertexAttribIFormat;
+PFNGLVERTEXATTRIBLFORMATPROC gl3wVertexAttribLFormat;
+PFNGLVERTEXATTRIBBINDINGPROC gl3wVertexAttribBinding;
+PFNGLVERTEXBINDINGDIVISORPROC gl3wVertexBindingDivisor;
+PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC gl3wVertexArrayBindVertexBufferEXT;
+PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC gl3wVertexArrayVertexAttribFormatEXT;
+PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC gl3wVertexArrayVertexAttribIFormatEXT;
+PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC gl3wVertexArrayVertexAttribLFormatEXT;
+PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC gl3wVertexArrayVertexAttribBindingEXT;
+PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC gl3wVertexArrayVertexBindingDivisorEXT;
+PFNGLFRAMEBUFFERPARAMETERIPROC gl3wFramebufferParameteri;
+PFNGLGETFRAMEBUFFERPARAMETERIVPROC gl3wGetFramebufferParameteriv;
+PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC gl3wNamedFramebufferParameteriEXT;
+PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC gl3wGetNamedFramebufferParameterivEXT;
+PFNGLGETINTERNALFORMATI64VPROC gl3wGetInternalformati64v;
+PFNGLINVALIDATETEXSUBIMAGEPROC gl3wInvalidateTexSubImage;
+PFNGLINVALIDATETEXIMAGEPROC gl3wInvalidateTexImage;
+PFNGLINVALIDATEBUFFERSUBDATAPROC gl3wInvalidateBufferSubData;
+PFNGLINVALIDATEBUFFERDATAPROC gl3wInvalidateBufferData;
+PFNGLINVALIDATEFRAMEBUFFERPROC gl3wInvalidateFramebuffer;
+PFNGLINVALIDATESUBFRAMEBUFFERPROC gl3wInvalidateSubFramebuffer;
+PFNGLMULTIDRAWARRAYSINDIRECTPROC gl3wMultiDrawArraysIndirect;
+PFNGLMULTIDRAWELEMENTSINDIRECTPROC gl3wMultiDrawElementsIndirect;
+PFNGLGETPROGRAMINTERFACEIVPROC gl3wGetProgramInterfaceiv;
+PFNGLGETPROGRAMRESOURCEINDEXPROC gl3wGetProgramResourceIndex;
+PFNGLGETPROGRAMRESOURCENAMEPROC gl3wGetProgramResourceName;
+PFNGLGETPROGRAMRESOURCEIVPROC gl3wGetProgramResourceiv;
+PFNGLGETPROGRAMRESOURCELOCATIONPROC gl3wGetProgramResourceLocation;
+PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC gl3wGetProgramResourceLocationIndex;
+PFNGLSHADERSTORAGEBLOCKBINDINGPROC gl3wShaderStorageBlockBinding;
+PFNGLTEXBUFFERRANGEPROC gl3wTexBufferRange;
+PFNGLTEXTUREBUFFERRANGEEXTPROC gl3wTextureBufferRangeEXT;
+PFNGLTEXSTORAGE2DMULTISAMPLEPROC gl3wTexStorage2DMultisample;
+PFNGLTEXSTORAGE3DMULTISAMPLEPROC gl3wTexStorage3DMultisample;
+PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC gl3wTextureStorage2DMultisampleEXT;
+PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC gl3wTextureStorage3DMultisampleEXT;
+
+static void load_procs(void)
+{
+ gl3wCullFace = (PFNGLCULLFACEPROC) get_proc("glCullFace");
+ gl3wFrontFace = (PFNGLFRONTFACEPROC) get_proc("glFrontFace");
+ gl3wHint = (PFNGLHINTPROC) get_proc("glHint");
+ gl3wLineWidth = (PFNGLLINEWIDTHPROC) get_proc("glLineWidth");
+ gl3wPointSize = (PFNGLPOINTSIZEPROC) get_proc("glPointSize");
+ gl3wPolygonMode = (PFNGLPOLYGONMODEPROC) get_proc("glPolygonMode");
+ gl3wScissor = (PFNGLSCISSORPROC) get_proc("glScissor");
+ gl3wTexParameterf = (PFNGLTEXPARAMETERFPROC) get_proc("glTexParameterf");
+ gl3wTexParameterfv = (PFNGLTEXPARAMETERFVPROC) get_proc("glTexParameterfv");
+ gl3wTexParameteri = (PFNGLTEXPARAMETERIPROC) get_proc("glTexParameteri");
+ gl3wTexParameteriv = (PFNGLTEXPARAMETERIVPROC) get_proc("glTexParameteriv");
+ gl3wTexImage1D = (PFNGLTEXIMAGE1DPROC) get_proc("glTexImage1D");
+ gl3wTexImage2D = (PFNGLTEXIMAGE2DPROC) get_proc("glTexImage2D");
+ gl3wDrawBuffer = (PFNGLDRAWBUFFERPROC) get_proc("glDrawBuffer");
+ gl3wClear = (PFNGLCLEARPROC) get_proc("glClear");
+ gl3wClearColor = (PFNGLCLEARCOLORPROC) get_proc("glClearColor");
+ gl3wClearStencil = (PFNGLCLEARSTENCILPROC) get_proc("glClearStencil");
+ gl3wClearDepth = (PFNGLCLEARDEPTHPROC) get_proc("glClearDepth");
+ gl3wStencilMask = (PFNGLSTENCILMASKPROC) get_proc("glStencilMask");
+ gl3wColorMask = (PFNGLCOLORMASKPROC) get_proc("glColorMask");
+ gl3wDepthMask = (PFNGLDEPTHMASKPROC) get_proc("glDepthMask");
+ gl3wDisable = (PFNGLDISABLEPROC) get_proc("glDisable");
+ gl3wEnable = (PFNGLENABLEPROC) get_proc("glEnable");
+ gl3wFinish = (PFNGLFINISHPROC) get_proc("glFinish");
+ gl3wFlush = (PFNGLFLUSHPROC) get_proc("glFlush");
+ gl3wBlendFunc = (PFNGLBLENDFUNCPROC) get_proc("glBlendFunc");
+ gl3wLogicOp = (PFNGLLOGICOPPROC) get_proc("glLogicOp");
+ gl3wStencilFunc = (PFNGLSTENCILFUNCPROC) get_proc("glStencilFunc");
+ gl3wStencilOp = (PFNGLSTENCILOPPROC) get_proc("glStencilOp");
+ gl3wDepthFunc = (PFNGLDEPTHFUNCPROC) get_proc("glDepthFunc");
+ gl3wPixelStoref = (PFNGLPIXELSTOREFPROC) get_proc("glPixelStoref");
+ gl3wPixelStorei = (PFNGLPIXELSTOREIPROC) get_proc("glPixelStorei");
+ gl3wReadBuffer = (PFNGLREADBUFFERPROC) get_proc("glReadBuffer");
+ gl3wReadPixels = (PFNGLREADPIXELSPROC) get_proc("glReadPixels");
+ gl3wGetBooleanv = (PFNGLGETBOOLEANVPROC) get_proc("glGetBooleanv");
+ gl3wGetDoublev = (PFNGLGETDOUBLEVPROC) get_proc("glGetDoublev");
+ gl3wGetError = (PFNGLGETERRORPROC) get_proc("glGetError");
+ gl3wGetFloatv = (PFNGLGETFLOATVPROC) get_proc("glGetFloatv");
+ gl3wGetIntegerv = (PFNGLGETINTEGERVPROC) get_proc("glGetIntegerv");
+ gl3wGetString = (PFNGLGETSTRINGPROC) get_proc("glGetString");
+ gl3wGetTexImage = (PFNGLGETTEXIMAGEPROC) get_proc("glGetTexImage");
+ gl3wGetTexParameterfv = (PFNGLGETTEXPARAMETERFVPROC) get_proc("glGetTexParameterfv");
+ gl3wGetTexParameteriv = (PFNGLGETTEXPARAMETERIVPROC) get_proc("glGetTexParameteriv");
+ gl3wGetTexLevelParameterfv = (PFNGLGETTEXLEVELPARAMETERFVPROC) get_proc("glGetTexLevelParameterfv");
+ gl3wGetTexLevelParameteriv = (PFNGLGETTEXLEVELPARAMETERIVPROC) get_proc("glGetTexLevelParameteriv");
+ gl3wIsEnabled = (PFNGLISENABLEDPROC) get_proc("glIsEnabled");
+ gl3wDepthRange = (PFNGLDEPTHRANGEPROC) get_proc("glDepthRange");
+ gl3wViewport = (PFNGLVIEWPORTPROC) get_proc("glViewport");
+ gl3wDrawArrays = (PFNGLDRAWARRAYSPROC) get_proc("glDrawArrays");
+ gl3wDrawElements = (PFNGLDRAWELEMENTSPROC) get_proc("glDrawElements");
+ gl3wGetPointerv = (PFNGLGETPOINTERVPROC) get_proc("glGetPointerv");
+ gl3wPolygonOffset = (PFNGLPOLYGONOFFSETPROC) get_proc("glPolygonOffset");
+ gl3wCopyTexImage1D = (PFNGLCOPYTEXIMAGE1DPROC) get_proc("glCopyTexImage1D");
+ gl3wCopyTexImage2D = (PFNGLCOPYTEXIMAGE2DPROC) get_proc("glCopyTexImage2D");
+ gl3wCopyTexSubImage1D = (PFNGLCOPYTEXSUBIMAGE1DPROC) get_proc("glCopyTexSubImage1D");
+ gl3wCopyTexSubImage2D = (PFNGLCOPYTEXSUBIMAGE2DPROC) get_proc("glCopyTexSubImage2D");
+ gl3wTexSubImage1D = (PFNGLTEXSUBIMAGE1DPROC) get_proc("glTexSubImage1D");
+ gl3wTexSubImage2D = (PFNGLTEXSUBIMAGE2DPROC) get_proc("glTexSubImage2D");
+ gl3wBindTexture = (PFNGLBINDTEXTUREPROC) get_proc("glBindTexture");
+ gl3wDeleteTextures = (PFNGLDELETETEXTURESPROC) get_proc("glDeleteTextures");
+ gl3wGenTextures = (PFNGLGENTEXTURESPROC) get_proc("glGenTextures");
+ gl3wIsTexture = (PFNGLISTEXTUREPROC) get_proc("glIsTexture");
+ gl3wBlendColor = (PFNGLBLENDCOLORPROC) get_proc("glBlendColor");
+ gl3wBlendEquation = (PFNGLBLENDEQUATIONPROC) get_proc("glBlendEquation");
+ gl3wDrawRangeElements = (PFNGLDRAWRANGEELEMENTSPROC) get_proc("glDrawRangeElements");
+ gl3wTexImage3D = (PFNGLTEXIMAGE3DPROC) get_proc("glTexImage3D");
+ gl3wTexSubImage3D = (PFNGLTEXSUBIMAGE3DPROC) get_proc("glTexSubImage3D");
+ gl3wCopyTexSubImage3D = (PFNGLCOPYTEXSUBIMAGE3DPROC) get_proc("glCopyTexSubImage3D");
+ gl3wActiveTexture = (PFNGLACTIVETEXTUREPROC) get_proc("glActiveTexture");
+ gl3wSampleCoverage = (PFNGLSAMPLECOVERAGEPROC) get_proc("glSampleCoverage");
+ gl3wCompressedTexImage3D = (PFNGLCOMPRESSEDTEXIMAGE3DPROC) get_proc("glCompressedTexImage3D");
+ gl3wCompressedTexImage2D = (PFNGLCOMPRESSEDTEXIMAGE2DPROC) get_proc("glCompressedTexImage2D");
+ gl3wCompressedTexImage1D = (PFNGLCOMPRESSEDTEXIMAGE1DPROC) get_proc("glCompressedTexImage1D");
+ gl3wCompressedTexSubImage3D = (PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) get_proc("glCompressedTexSubImage3D");
+ gl3wCompressedTexSubImage2D = (PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) get_proc("glCompressedTexSubImage2D");
+ gl3wCompressedTexSubImage1D = (PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) get_proc("glCompressedTexSubImage1D");
+ gl3wGetCompressedTexImage = (PFNGLGETCOMPRESSEDTEXIMAGEPROC) get_proc("glGetCompressedTexImage");
+ gl3wBlendFuncSeparate = (PFNGLBLENDFUNCSEPARATEPROC) get_proc("glBlendFuncSeparate");
+ gl3wMultiDrawArrays = (PFNGLMULTIDRAWARRAYSPROC) get_proc("glMultiDrawArrays");
+ gl3wMultiDrawElements = (PFNGLMULTIDRAWELEMENTSPROC) get_proc("glMultiDrawElements");
+ gl3wPointParameterf = (PFNGLPOINTPARAMETERFPROC) get_proc("glPointParameterf");
+ gl3wPointParameterfv = (PFNGLPOINTPARAMETERFVPROC) get_proc("glPointParameterfv");
+ gl3wPointParameteri = (PFNGLPOINTPARAMETERIPROC) get_proc("glPointParameteri");
+ gl3wPointParameteriv = (PFNGLPOINTPARAMETERIVPROC) get_proc("glPointParameteriv");
+ gl3wGenQueries = (PFNGLGENQUERIESPROC) get_proc("glGenQueries");
+ gl3wDeleteQueries = (PFNGLDELETEQUERIESPROC) get_proc("glDeleteQueries");
+ gl3wIsQuery = (PFNGLISQUERYPROC) get_proc("glIsQuery");
+ gl3wBeginQuery = (PFNGLBEGINQUERYPROC) get_proc("glBeginQuery");
+ gl3wEndQuery = (PFNGLENDQUERYPROC) get_proc("glEndQuery");
+ gl3wGetQueryiv = (PFNGLGETQUERYIVPROC) get_proc("glGetQueryiv");
+ gl3wGetQueryObjectiv = (PFNGLGETQUERYOBJECTIVPROC) get_proc("glGetQueryObjectiv");
+ gl3wGetQueryObjectuiv = (PFNGLGETQUERYOBJECTUIVPROC) get_proc("glGetQueryObjectuiv");
+ gl3wBindBuffer = (PFNGLBINDBUFFERPROC) get_proc("glBindBuffer");
+ gl3wDeleteBuffers = (PFNGLDELETEBUFFERSPROC) get_proc("glDeleteBuffers");
+ gl3wGenBuffers = (PFNGLGENBUFFERSPROC) get_proc("glGenBuffers");
+ gl3wIsBuffer = (PFNGLISBUFFERPROC) get_proc("glIsBuffer");
+ gl3wBufferData = (PFNGLBUFFERDATAPROC) get_proc("glBufferData");
+ gl3wBufferSubData = (PFNGLBUFFERSUBDATAPROC) get_proc("glBufferSubData");
+ gl3wGetBufferSubData = (PFNGLGETBUFFERSUBDATAPROC) get_proc("glGetBufferSubData");
+ gl3wMapBuffer = (PFNGLMAPBUFFERPROC) get_proc("glMapBuffer");
+ gl3wUnmapBuffer = (PFNGLUNMAPBUFFERPROC) get_proc("glUnmapBuffer");
+ gl3wGetBufferParameteriv = (PFNGLGETBUFFERPARAMETERIVPROC) get_proc("glGetBufferParameteriv");
+ gl3wGetBufferPointerv = (PFNGLGETBUFFERPOINTERVPROC) get_proc("glGetBufferPointerv");
+ gl3wBlendEquationSeparate = (PFNGLBLENDEQUATIONSEPARATEPROC) get_proc("glBlendEquationSeparate");
+ gl3wDrawBuffers = (PFNGLDRAWBUFFERSPROC) get_proc("glDrawBuffers");
+ gl3wStencilOpSeparate = (PFNGLSTENCILOPSEPARATEPROC) get_proc("glStencilOpSeparate");
+ gl3wStencilFuncSeparate = (PFNGLSTENCILFUNCSEPARATEPROC) get_proc("glStencilFuncSeparate");
+ gl3wStencilMaskSeparate = (PFNGLSTENCILMASKSEPARATEPROC) get_proc("glStencilMaskSeparate");
+ gl3wAttachShader = (PFNGLATTACHSHADERPROC) get_proc("glAttachShader");
+ gl3wBindAttribLocation = (PFNGLBINDATTRIBLOCATIONPROC) get_proc("glBindAttribLocation");
+ gl3wCompileShader = (PFNGLCOMPILESHADERPROC) get_proc("glCompileShader");
+ gl3wCreateProgram = (PFNGLCREATEPROGRAMPROC) get_proc("glCreateProgram");
+ gl3wCreateShader = (PFNGLCREATESHADERPROC) get_proc("glCreateShader");
+ gl3wDeleteProgram = (PFNGLDELETEPROGRAMPROC) get_proc("glDeleteProgram");
+ gl3wDeleteShader = (PFNGLDELETESHADERPROC) get_proc("glDeleteShader");
+ gl3wDetachShader = (PFNGLDETACHSHADERPROC) get_proc("glDetachShader");
+ gl3wDisableVertexAttribArray = (PFNGLDISABLEVERTEXATTRIBARRAYPROC) get_proc("glDisableVertexAttribArray");
+ gl3wEnableVertexAttribArray = (PFNGLENABLEVERTEXATTRIBARRAYPROC) get_proc("glEnableVertexAttribArray");
+ gl3wGetActiveAttrib = (PFNGLGETACTIVEATTRIBPROC) get_proc("glGetActiveAttrib");
+ gl3wGetActiveUniform = (PFNGLGETACTIVEUNIFORMPROC) get_proc("glGetActiveUniform");
+ gl3wGetAttachedShaders = (PFNGLGETATTACHEDSHADERSPROC) get_proc("glGetAttachedShaders");
+ gl3wGetAttribLocation = (PFNGLGETATTRIBLOCATIONPROC) get_proc("glGetAttribLocation");
+ gl3wGetProgramiv = (PFNGLGETPROGRAMIVPROC) get_proc("glGetProgramiv");
+ gl3wGetProgramInfoLog = (PFNGLGETPROGRAMINFOLOGPROC) get_proc("glGetProgramInfoLog");
+ gl3wGetShaderiv = (PFNGLGETSHADERIVPROC) get_proc("glGetShaderiv");
+ gl3wGetShaderInfoLog = (PFNGLGETSHADERINFOLOGPROC) get_proc("glGetShaderInfoLog");
+ gl3wGetShaderSource = (PFNGLGETSHADERSOURCEPROC) get_proc("glGetShaderSource");
+ gl3wGetUniformLocation = (PFNGLGETUNIFORMLOCATIONPROC) get_proc("glGetUniformLocation");
+ gl3wGetUniformfv = (PFNGLGETUNIFORMFVPROC) get_proc("glGetUniformfv");
+ gl3wGetUniformiv = (PFNGLGETUNIFORMIVPROC) get_proc("glGetUniformiv");
+ gl3wGetVertexAttribdv = (PFNGLGETVERTEXATTRIBDVPROC) get_proc("glGetVertexAttribdv");
+ gl3wGetVertexAttribfv = (PFNGLGETVERTEXATTRIBFVPROC) get_proc("glGetVertexAttribfv");
+ gl3wGetVertexAttribiv = (PFNGLGETVERTEXATTRIBIVPROC) get_proc("glGetVertexAttribiv");
+ gl3wGetVertexAttribPointerv = (PFNGLGETVERTEXATTRIBPOINTERVPROC) get_proc("glGetVertexAttribPointerv");
+ gl3wIsProgram = (PFNGLISPROGRAMPROC) get_proc("glIsProgram");
+ gl3wIsShader = (PFNGLISSHADERPROC) get_proc("glIsShader");
+ gl3wLinkProgram = (PFNGLLINKPROGRAMPROC) get_proc("glLinkProgram");
+ gl3wShaderSource = (PFNGLSHADERSOURCEPROC) get_proc("glShaderSource");
+ gl3wUseProgram = (PFNGLUSEPROGRAMPROC) get_proc("glUseProgram");
+ gl3wUniform1f = (PFNGLUNIFORM1FPROC) get_proc("glUniform1f");
+ gl3wUniform2f = (PFNGLUNIFORM2FPROC) get_proc("glUniform2f");
+ gl3wUniform3f = (PFNGLUNIFORM3FPROC) get_proc("glUniform3f");
+ gl3wUniform4f = (PFNGLUNIFORM4FPROC) get_proc("glUniform4f");
+ gl3wUniform1i = (PFNGLUNIFORM1IPROC) get_proc("glUniform1i");
+ gl3wUniform2i = (PFNGLUNIFORM2IPROC) get_proc("glUniform2i");
+ gl3wUniform3i = (PFNGLUNIFORM3IPROC) get_proc("glUniform3i");
+ gl3wUniform4i = (PFNGLUNIFORM4IPROC) get_proc("glUniform4i");
+ gl3wUniform1fv = (PFNGLUNIFORM1FVPROC) get_proc("glUniform1fv");
+ gl3wUniform2fv = (PFNGLUNIFORM2FVPROC) get_proc("glUniform2fv");
+ gl3wUniform3fv = (PFNGLUNIFORM3FVPROC) get_proc("glUniform3fv");
+ gl3wUniform4fv = (PFNGLUNIFORM4FVPROC) get_proc("glUniform4fv");
+ gl3wUniform1iv = (PFNGLUNIFORM1IVPROC) get_proc("glUniform1iv");
+ gl3wUniform2iv = (PFNGLUNIFORM2IVPROC) get_proc("glUniform2iv");
+ gl3wUniform3iv = (PFNGLUNIFORM3IVPROC) get_proc("glUniform3iv");
+ gl3wUniform4iv = (PFNGLUNIFORM4IVPROC) get_proc("glUniform4iv");
+ gl3wUniformMatrix2fv = (PFNGLUNIFORMMATRIX2FVPROC) get_proc("glUniformMatrix2fv");
+ gl3wUniformMatrix3fv = (PFNGLUNIFORMMATRIX3FVPROC) get_proc("glUniformMatrix3fv");
+ gl3wUniformMatrix4fv = (PFNGLUNIFORMMATRIX4FVPROC) get_proc("glUniformMatrix4fv");
+ gl3wValidateProgram = (PFNGLVALIDATEPROGRAMPROC) get_proc("glValidateProgram");
+ gl3wVertexAttrib1d = (PFNGLVERTEXATTRIB1DPROC) get_proc("glVertexAttrib1d");
+ gl3wVertexAttrib1dv = (PFNGLVERTEXATTRIB1DVPROC) get_proc("glVertexAttrib1dv");
+ gl3wVertexAttrib1f = (PFNGLVERTEXATTRIB1FPROC) get_proc("glVertexAttrib1f");
+ gl3wVertexAttrib1fv = (PFNGLVERTEXATTRIB1FVPROC) get_proc("glVertexAttrib1fv");
+ gl3wVertexAttrib1s = (PFNGLVERTEXATTRIB1SPROC) get_proc("glVertexAttrib1s");
+ gl3wVertexAttrib1sv = (PFNGLVERTEXATTRIB1SVPROC) get_proc("glVertexAttrib1sv");
+ gl3wVertexAttrib2d = (PFNGLVERTEXATTRIB2DPROC) get_proc("glVertexAttrib2d");
+ gl3wVertexAttrib2dv = (PFNGLVERTEXATTRIB2DVPROC) get_proc("glVertexAttrib2dv");
+ gl3wVertexAttrib2f = (PFNGLVERTEXATTRIB2FPROC) get_proc("glVertexAttrib2f");
+ gl3wVertexAttrib2fv = (PFNGLVERTEXATTRIB2FVPROC) get_proc("glVertexAttrib2fv");
+ gl3wVertexAttrib2s = (PFNGLVERTEXATTRIB2SPROC) get_proc("glVertexAttrib2s");
+ gl3wVertexAttrib2sv = (PFNGLVERTEXATTRIB2SVPROC) get_proc("glVertexAttrib2sv");
+ gl3wVertexAttrib3d = (PFNGLVERTEXATTRIB3DPROC) get_proc("glVertexAttrib3d");
+ gl3wVertexAttrib3dv = (PFNGLVERTEXATTRIB3DVPROC) get_proc("glVertexAttrib3dv");
+ gl3wVertexAttrib3f = (PFNGLVERTEXATTRIB3FPROC) get_proc("glVertexAttrib3f");
+ gl3wVertexAttrib3fv = (PFNGLVERTEXATTRIB3FVPROC) get_proc("glVertexAttrib3fv");
+ gl3wVertexAttrib3s = (PFNGLVERTEXATTRIB3SPROC) get_proc("glVertexAttrib3s");
+ gl3wVertexAttrib3sv = (PFNGLVERTEXATTRIB3SVPROC) get_proc("glVertexAttrib3sv");
+ gl3wVertexAttrib4Nbv = (PFNGLVERTEXATTRIB4NBVPROC) get_proc("glVertexAttrib4Nbv");
+ gl3wVertexAttrib4Niv = (PFNGLVERTEXATTRIB4NIVPROC) get_proc("glVertexAttrib4Niv");
+ gl3wVertexAttrib4Nsv = (PFNGLVERTEXATTRIB4NSVPROC) get_proc("glVertexAttrib4Nsv");
+ gl3wVertexAttrib4Nub = (PFNGLVERTEXATTRIB4NUBPROC) get_proc("glVertexAttrib4Nub");
+ gl3wVertexAttrib4Nubv = (PFNGLVERTEXATTRIB4NUBVPROC) get_proc("glVertexAttrib4Nubv");
+ gl3wVertexAttrib4Nuiv = (PFNGLVERTEXATTRIB4NUIVPROC) get_proc("glVertexAttrib4Nuiv");
+ gl3wVertexAttrib4Nusv = (PFNGLVERTEXATTRIB4NUSVPROC) get_proc("glVertexAttrib4Nusv");
+ gl3wVertexAttrib4bv = (PFNGLVERTEXATTRIB4BVPROC) get_proc("glVertexAttrib4bv");
+ gl3wVertexAttrib4d = (PFNGLVERTEXATTRIB4DPROC) get_proc("glVertexAttrib4d");
+ gl3wVertexAttrib4dv = (PFNGLVERTEXATTRIB4DVPROC) get_proc("glVertexAttrib4dv");
+ gl3wVertexAttrib4f = (PFNGLVERTEXATTRIB4FPROC) get_proc("glVertexAttrib4f");
+ gl3wVertexAttrib4fv = (PFNGLVERTEXATTRIB4FVPROC) get_proc("glVertexAttrib4fv");
+ gl3wVertexAttrib4iv = (PFNGLVERTEXATTRIB4IVPROC) get_proc("glVertexAttrib4iv");
+ gl3wVertexAttrib4s = (PFNGLVERTEXATTRIB4SPROC) get_proc("glVertexAttrib4s");
+ gl3wVertexAttrib4sv = (PFNGLVERTEXATTRIB4SVPROC) get_proc("glVertexAttrib4sv");
+ gl3wVertexAttrib4ubv = (PFNGLVERTEXATTRIB4UBVPROC) get_proc("glVertexAttrib4ubv");
+ gl3wVertexAttrib4uiv = (PFNGLVERTEXATTRIB4UIVPROC) get_proc("glVertexAttrib4uiv");
+ gl3wVertexAttrib4usv = (PFNGLVERTEXATTRIB4USVPROC) get_proc("glVertexAttrib4usv");
+ gl3wVertexAttribPointer = (PFNGLVERTEXATTRIBPOINTERPROC) get_proc("glVertexAttribPointer");
+ gl3wUniformMatrix2x3fv = (PFNGLUNIFORMMATRIX2X3FVPROC) get_proc("glUniformMatrix2x3fv");
+ gl3wUniformMatrix3x2fv = (PFNGLUNIFORMMATRIX3X2FVPROC) get_proc("glUniformMatrix3x2fv");
+ gl3wUniformMatrix2x4fv = (PFNGLUNIFORMMATRIX2X4FVPROC) get_proc("glUniformMatrix2x4fv");
+ gl3wUniformMatrix4x2fv = (PFNGLUNIFORMMATRIX4X2FVPROC) get_proc("glUniformMatrix4x2fv");
+ gl3wUniformMatrix3x4fv = (PFNGLUNIFORMMATRIX3X4FVPROC) get_proc("glUniformMatrix3x4fv");
+ gl3wUniformMatrix4x3fv = (PFNGLUNIFORMMATRIX4X3FVPROC) get_proc("glUniformMatrix4x3fv");
+ gl3wColorMaski = (PFNGLCOLORMASKIPROC) get_proc("glColorMaski");
+ gl3wGetBooleani_v = (PFNGLGETBOOLEANI_VPROC) get_proc("glGetBooleani_v");
+ gl3wGetIntegeri_v = (PFNGLGETINTEGERI_VPROC) get_proc("glGetIntegeri_v");
+ gl3wEnablei = (PFNGLENABLEIPROC) get_proc("glEnablei");
+ gl3wDisablei = (PFNGLDISABLEIPROC) get_proc("glDisablei");
+ gl3wIsEnabledi = (PFNGLISENABLEDIPROC) get_proc("glIsEnabledi");
+ gl3wBeginTransformFeedback = (PFNGLBEGINTRANSFORMFEEDBACKPROC) get_proc("glBeginTransformFeedback");
+ gl3wEndTransformFeedback = (PFNGLENDTRANSFORMFEEDBACKPROC) get_proc("glEndTransformFeedback");
+ gl3wBindBufferRange = (PFNGLBINDBUFFERRANGEPROC) get_proc("glBindBufferRange");
+ gl3wBindBufferBase = (PFNGLBINDBUFFERBASEPROC) get_proc("glBindBufferBase");
+ gl3wTransformFeedbackVaryings = (PFNGLTRANSFORMFEEDBACKVARYINGSPROC) get_proc("glTransformFeedbackVaryings");
+ gl3wGetTransformFeedbackVarying = (PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) get_proc("glGetTransformFeedbackVarying");
+ gl3wClampColor = (PFNGLCLAMPCOLORPROC) get_proc("glClampColor");
+ gl3wBeginConditionalRender = (PFNGLBEGINCONDITIONALRENDERPROC) get_proc("glBeginConditionalRender");
+ gl3wEndConditionalRender = (PFNGLENDCONDITIONALRENDERPROC) get_proc("glEndConditionalRender");
+ gl3wVertexAttribIPointer = (PFNGLVERTEXATTRIBIPOINTERPROC) get_proc("glVertexAttribIPointer");
+ gl3wGetVertexAttribIiv = (PFNGLGETVERTEXATTRIBIIVPROC) get_proc("glGetVertexAttribIiv");
+ gl3wGetVertexAttribIuiv = (PFNGLGETVERTEXATTRIBIUIVPROC) get_proc("glGetVertexAttribIuiv");
+ gl3wVertexAttribI1i = (PFNGLVERTEXATTRIBI1IPROC) get_proc("glVertexAttribI1i");
+ gl3wVertexAttribI2i = (PFNGLVERTEXATTRIBI2IPROC) get_proc("glVertexAttribI2i");
+ gl3wVertexAttribI3i = (PFNGLVERTEXATTRIBI3IPROC) get_proc("glVertexAttribI3i");
+ gl3wVertexAttribI4i = (PFNGLVERTEXATTRIBI4IPROC) get_proc("glVertexAttribI4i");
+ gl3wVertexAttribI1ui = (PFNGLVERTEXATTRIBI1UIPROC) get_proc("glVertexAttribI1ui");
+ gl3wVertexAttribI2ui = (PFNGLVERTEXATTRIBI2UIPROC) get_proc("glVertexAttribI2ui");
+ gl3wVertexAttribI3ui = (PFNGLVERTEXATTRIBI3UIPROC) get_proc("glVertexAttribI3ui");
+ gl3wVertexAttribI4ui = (PFNGLVERTEXATTRIBI4UIPROC) get_proc("glVertexAttribI4ui");
+ gl3wVertexAttribI1iv = (PFNGLVERTEXATTRIBI1IVPROC) get_proc("glVertexAttribI1iv");
+ gl3wVertexAttribI2iv = (PFNGLVERTEXATTRIBI2IVPROC) get_proc("glVertexAttribI2iv");
+ gl3wVertexAttribI3iv = (PFNGLVERTEXATTRIBI3IVPROC) get_proc("glVertexAttribI3iv");
+ gl3wVertexAttribI4iv = (PFNGLVERTEXATTRIBI4IVPROC) get_proc("glVertexAttribI4iv");
+ gl3wVertexAttribI1uiv = (PFNGLVERTEXATTRIBI1UIVPROC) get_proc("glVertexAttribI1uiv");
+ gl3wVertexAttribI2uiv = (PFNGLVERTEXATTRIBI2UIVPROC) get_proc("glVertexAttribI2uiv");
+ gl3wVertexAttribI3uiv = (PFNGLVERTEXATTRIBI3UIVPROC) get_proc("glVertexAttribI3uiv");
+ gl3wVertexAttribI4uiv = (PFNGLVERTEXATTRIBI4UIVPROC) get_proc("glVertexAttribI4uiv");
+ gl3wVertexAttribI4bv = (PFNGLVERTEXATTRIBI4BVPROC) get_proc("glVertexAttribI4bv");
+ gl3wVertexAttribI4sv = (PFNGLVERTEXATTRIBI4SVPROC) get_proc("glVertexAttribI4sv");
+ gl3wVertexAttribI4ubv = (PFNGLVERTEXATTRIBI4UBVPROC) get_proc("glVertexAttribI4ubv");
+ gl3wVertexAttribI4usv = (PFNGLVERTEXATTRIBI4USVPROC) get_proc("glVertexAttribI4usv");
+ gl3wGetUniformuiv = (PFNGLGETUNIFORMUIVPROC) get_proc("glGetUniformuiv");
+ gl3wBindFragDataLocation = (PFNGLBINDFRAGDATALOCATIONPROC) get_proc("glBindFragDataLocation");
+ gl3wGetFragDataLocation = (PFNGLGETFRAGDATALOCATIONPROC) get_proc("glGetFragDataLocation");
+ gl3wUniform1ui = (PFNGLUNIFORM1UIPROC) get_proc("glUniform1ui");
+ gl3wUniform2ui = (PFNGLUNIFORM2UIPROC) get_proc("glUniform2ui");
+ gl3wUniform3ui = (PFNGLUNIFORM3UIPROC) get_proc("glUniform3ui");
+ gl3wUniform4ui = (PFNGLUNIFORM4UIPROC) get_proc("glUniform4ui");
+ gl3wUniform1uiv = (PFNGLUNIFORM1UIVPROC) get_proc("glUniform1uiv");
+ gl3wUniform2uiv = (PFNGLUNIFORM2UIVPROC) get_proc("glUniform2uiv");
+ gl3wUniform3uiv = (PFNGLUNIFORM3UIVPROC) get_proc("glUniform3uiv");
+ gl3wUniform4uiv = (PFNGLUNIFORM4UIVPROC) get_proc("glUniform4uiv");
+ gl3wTexParameterIiv = (PFNGLTEXPARAMETERIIVPROC) get_proc("glTexParameterIiv");
+ gl3wTexParameterIuiv = (PFNGLTEXPARAMETERIUIVPROC) get_proc("glTexParameterIuiv");
+ gl3wGetTexParameterIiv = (PFNGLGETTEXPARAMETERIIVPROC) get_proc("glGetTexParameterIiv");
+ gl3wGetTexParameterIuiv = (PFNGLGETTEXPARAMETERIUIVPROC) get_proc("glGetTexParameterIuiv");
+ gl3wClearBufferiv = (PFNGLCLEARBUFFERIVPROC) get_proc("glClearBufferiv");
+ gl3wClearBufferuiv = (PFNGLCLEARBUFFERUIVPROC) get_proc("glClearBufferuiv");
+ gl3wClearBufferfv = (PFNGLCLEARBUFFERFVPROC) get_proc("glClearBufferfv");
+ gl3wClearBufferfi = (PFNGLCLEARBUFFERFIPROC) get_proc("glClearBufferfi");
+ gl3wGetStringi = (PFNGLGETSTRINGIPROC) get_proc("glGetStringi");
+ gl3wDrawArraysInstanced = (PFNGLDRAWARRAYSINSTANCEDPROC) get_proc("glDrawArraysInstanced");
+ gl3wDrawElementsInstanced = (PFNGLDRAWELEMENTSINSTANCEDPROC) get_proc("glDrawElementsInstanced");
+ gl3wTexBuffer = (PFNGLTEXBUFFERPROC) get_proc("glTexBuffer");
+ gl3wPrimitiveRestartIndex = (PFNGLPRIMITIVERESTARTINDEXPROC) get_proc("glPrimitiveRestartIndex");
+ gl3wGetInteger64i_v = (PFNGLGETINTEGER64I_VPROC) get_proc("glGetInteger64i_v");
+ gl3wGetBufferParameteri64v = (PFNGLGETBUFFERPARAMETERI64VPROC) get_proc("glGetBufferParameteri64v");
+ gl3wFramebufferTexture = (PFNGLFRAMEBUFFERTEXTUREPROC) get_proc("glFramebufferTexture");
+ gl3wVertexAttribDivisor = (PFNGLVERTEXATTRIBDIVISORPROC) get_proc("glVertexAttribDivisor");
+ gl3wMinSampleShading = (PFNGLMINSAMPLESHADINGPROC) get_proc("glMinSampleShading");
+ gl3wBlendEquationi = (PFNGLBLENDEQUATIONIPROC) get_proc("glBlendEquationi");
+ gl3wBlendEquationSeparatei = (PFNGLBLENDEQUATIONSEPARATEIPROC) get_proc("glBlendEquationSeparatei");
+ gl3wBlendFunci = (PFNGLBLENDFUNCIPROC) get_proc("glBlendFunci");
+ gl3wBlendFuncSeparatei = (PFNGLBLENDFUNCSEPARATEIPROC) get_proc("glBlendFuncSeparatei");
+ gl3wIsRenderbuffer = (PFNGLISRENDERBUFFERPROC) get_proc("glIsRenderbuffer");
+ gl3wBindRenderbuffer = (PFNGLBINDRENDERBUFFERPROC) get_proc("glBindRenderbuffer");
+ gl3wDeleteRenderbuffers = (PFNGLDELETERENDERBUFFERSPROC) get_proc("glDeleteRenderbuffers");
+ gl3wGenRenderbuffers = (PFNGLGENRENDERBUFFERSPROC) get_proc("glGenRenderbuffers");
+ gl3wRenderbufferStorage = (PFNGLRENDERBUFFERSTORAGEPROC) get_proc("glRenderbufferStorage");
+ gl3wGetRenderbufferParameteriv = (PFNGLGETRENDERBUFFERPARAMETERIVPROC) get_proc("glGetRenderbufferParameteriv");
+ gl3wIsFramebuffer = (PFNGLISFRAMEBUFFERPROC) get_proc("glIsFramebuffer");
+ gl3wBindFramebuffer = (PFNGLBINDFRAMEBUFFERPROC) get_proc("glBindFramebuffer");
+ gl3wDeleteFramebuffers = (PFNGLDELETEFRAMEBUFFERSPROC) get_proc("glDeleteFramebuffers");
+ gl3wGenFramebuffers = (PFNGLGENFRAMEBUFFERSPROC) get_proc("glGenFramebuffers");
+ gl3wCheckFramebufferStatus = (PFNGLCHECKFRAMEBUFFERSTATUSPROC) get_proc("glCheckFramebufferStatus");
+ gl3wFramebufferTexture1D = (PFNGLFRAMEBUFFERTEXTURE1DPROC) get_proc("glFramebufferTexture1D");
+ gl3wFramebufferTexture2D = (PFNGLFRAMEBUFFERTEXTURE2DPROC) get_proc("glFramebufferTexture2D");
+ gl3wFramebufferTexture3D = (PFNGLFRAMEBUFFERTEXTURE3DPROC) get_proc("glFramebufferTexture3D");
+ gl3wFramebufferRenderbuffer = (PFNGLFRAMEBUFFERRENDERBUFFERPROC) get_proc("glFramebufferRenderbuffer");
+ gl3wGetFramebufferAttachmentParameteriv = (PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) get_proc("glGetFramebufferAttachmentParameteriv");
+ gl3wGenerateMipmap = (PFNGLGENERATEMIPMAPPROC) get_proc("glGenerateMipmap");
+ gl3wBlitFramebuffer = (PFNGLBLITFRAMEBUFFERPROC) get_proc("glBlitFramebuffer");
+ gl3wRenderbufferStorageMultisample = (PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) get_proc("glRenderbufferStorageMultisample");
+ gl3wFramebufferTextureLayer = (PFNGLFRAMEBUFFERTEXTURELAYERPROC) get_proc("glFramebufferTextureLayer");
+ gl3wMapBufferRange = (PFNGLMAPBUFFERRANGEPROC) get_proc("glMapBufferRange");
+ gl3wFlushMappedBufferRange = (PFNGLFLUSHMAPPEDBUFFERRANGEPROC) get_proc("glFlushMappedBufferRange");
+ gl3wBindVertexArray = (PFNGLBINDVERTEXARRAYPROC) get_proc("glBindVertexArray");
+ gl3wDeleteVertexArrays = (PFNGLDELETEVERTEXARRAYSPROC) get_proc("glDeleteVertexArrays");
+ gl3wGenVertexArrays = (PFNGLGENVERTEXARRAYSPROC) get_proc("glGenVertexArrays");
+ gl3wIsVertexArray = (PFNGLISVERTEXARRAYPROC) get_proc("glIsVertexArray");
+ gl3wGetUniformIndices = (PFNGLGETUNIFORMINDICESPROC) get_proc("glGetUniformIndices");
+ gl3wGetActiveUniformsiv = (PFNGLGETACTIVEUNIFORMSIVPROC) get_proc("glGetActiveUniformsiv");
+ gl3wGetActiveUniformName = (PFNGLGETACTIVEUNIFORMNAMEPROC) get_proc("glGetActiveUniformName");
+ gl3wGetUniformBlockIndex = (PFNGLGETUNIFORMBLOCKINDEXPROC) get_proc("glGetUniformBlockIndex");
+ gl3wGetActiveUniformBlockiv = (PFNGLGETACTIVEUNIFORMBLOCKIVPROC) get_proc("glGetActiveUniformBlockiv");
+ gl3wGetActiveUniformBlockName = (PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) get_proc("glGetActiveUniformBlockName");
+ gl3wUniformBlockBinding = (PFNGLUNIFORMBLOCKBINDINGPROC) get_proc("glUniformBlockBinding");
+ gl3wCopyBufferSubData = (PFNGLCOPYBUFFERSUBDATAPROC) get_proc("glCopyBufferSubData");
+ gl3wDrawElementsBaseVertex = (PFNGLDRAWELEMENTSBASEVERTEXPROC) get_proc("glDrawElementsBaseVertex");
+ gl3wDrawRangeElementsBaseVertex = (PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) get_proc("glDrawRangeElementsBaseVertex");
+ gl3wDrawElementsInstancedBaseVertex = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) get_proc("glDrawElementsInstancedBaseVertex");
+ gl3wMultiDrawElementsBaseVertex = (PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) get_proc("glMultiDrawElementsBaseVertex");
+ gl3wProvokingVertex = (PFNGLPROVOKINGVERTEXPROC) get_proc("glProvokingVertex");
+ gl3wFenceSync = (PFNGLFENCESYNCPROC) get_proc("glFenceSync");
+ gl3wIsSync = (PFNGLISSYNCPROC) get_proc("glIsSync");
+ gl3wDeleteSync = (PFNGLDELETESYNCPROC) get_proc("glDeleteSync");
+ gl3wClientWaitSync = (PFNGLCLIENTWAITSYNCPROC) get_proc("glClientWaitSync");
+ gl3wWaitSync = (PFNGLWAITSYNCPROC) get_proc("glWaitSync");
+ gl3wGetInteger64v = (PFNGLGETINTEGER64VPROC) get_proc("glGetInteger64v");
+ gl3wGetSynciv = (PFNGLGETSYNCIVPROC) get_proc("glGetSynciv");
+ gl3wTexImage2DMultisample = (PFNGLTEXIMAGE2DMULTISAMPLEPROC) get_proc("glTexImage2DMultisample");
+ gl3wTexImage3DMultisample = (PFNGLTEXIMAGE3DMULTISAMPLEPROC) get_proc("glTexImage3DMultisample");
+ gl3wGetMultisamplefv = (PFNGLGETMULTISAMPLEFVPROC) get_proc("glGetMultisamplefv");
+ gl3wSampleMaski = (PFNGLSAMPLEMASKIPROC) get_proc("glSampleMaski");
+ gl3wBlendEquationiARB = (PFNGLBLENDEQUATIONIARBPROC) get_proc("glBlendEquationiARB");
+ gl3wBlendEquationSeparateiARB = (PFNGLBLENDEQUATIONSEPARATEIARBPROC) get_proc("glBlendEquationSeparateiARB");
+ gl3wBlendFunciARB = (PFNGLBLENDFUNCIARBPROC) get_proc("glBlendFunciARB");
+ gl3wBlendFuncSeparateiARB = (PFNGLBLENDFUNCSEPARATEIARBPROC) get_proc("glBlendFuncSeparateiARB");
+ gl3wMinSampleShadingARB = (PFNGLMINSAMPLESHADINGARBPROC) get_proc("glMinSampleShadingARB");
+ gl3wNamedStringARB = (PFNGLNAMEDSTRINGARBPROC) get_proc("glNamedStringARB");
+ gl3wDeleteNamedStringARB = (PFNGLDELETENAMEDSTRINGARBPROC) get_proc("glDeleteNamedStringARB");
+ gl3wCompileShaderIncludeARB = (PFNGLCOMPILESHADERINCLUDEARBPROC) get_proc("glCompileShaderIncludeARB");
+ gl3wIsNamedStringARB = (PFNGLISNAMEDSTRINGARBPROC) get_proc("glIsNamedStringARB");
+ gl3wGetNamedStringARB = (PFNGLGETNAMEDSTRINGARBPROC) get_proc("glGetNamedStringARB");
+ gl3wGetNamedStringivARB = (PFNGLGETNAMEDSTRINGIVARBPROC) get_proc("glGetNamedStringivARB");
+ gl3wBindFragDataLocationIndexed = (PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) get_proc("glBindFragDataLocationIndexed");
+ gl3wGetFragDataIndex = (PFNGLGETFRAGDATAINDEXPROC) get_proc("glGetFragDataIndex");
+ gl3wGenSamplers = (PFNGLGENSAMPLERSPROC) get_proc("glGenSamplers");
+ gl3wDeleteSamplers = (PFNGLDELETESAMPLERSPROC) get_proc("glDeleteSamplers");
+ gl3wIsSampler = (PFNGLISSAMPLERPROC) get_proc("glIsSampler");
+ gl3wBindSampler = (PFNGLBINDSAMPLERPROC) get_proc("glBindSampler");
+ gl3wSamplerParameteri = (PFNGLSAMPLERPARAMETERIPROC) get_proc("glSamplerParameteri");
+ gl3wSamplerParameteriv = (PFNGLSAMPLERPARAMETERIVPROC) get_proc("glSamplerParameteriv");
+ gl3wSamplerParameterf = (PFNGLSAMPLERPARAMETERFPROC) get_proc("glSamplerParameterf");
+ gl3wSamplerParameterfv = (PFNGLSAMPLERPARAMETERFVPROC) get_proc("glSamplerParameterfv");
+ gl3wSamplerParameterIiv = (PFNGLSAMPLERPARAMETERIIVPROC) get_proc("glSamplerParameterIiv");
+ gl3wSamplerParameterIuiv = (PFNGLSAMPLERPARAMETERIUIVPROC) get_proc("glSamplerParameterIuiv");
+ gl3wGetSamplerParameteriv = (PFNGLGETSAMPLERPARAMETERIVPROC) get_proc("glGetSamplerParameteriv");
+ gl3wGetSamplerParameterIiv = (PFNGLGETSAMPLERPARAMETERIIVPROC) get_proc("glGetSamplerParameterIiv");
+ gl3wGetSamplerParameterfv = (PFNGLGETSAMPLERPARAMETERFVPROC) get_proc("glGetSamplerParameterfv");
+ gl3wGetSamplerParameterIuiv = (PFNGLGETSAMPLERPARAMETERIUIVPROC) get_proc("glGetSamplerParameterIuiv");
+ gl3wQueryCounter = (PFNGLQUERYCOUNTERPROC) get_proc("glQueryCounter");
+ gl3wGetQueryObjecti64v = (PFNGLGETQUERYOBJECTI64VPROC) get_proc("glGetQueryObjecti64v");
+ gl3wGetQueryObjectui64v = (PFNGLGETQUERYOBJECTUI64VPROC) get_proc("glGetQueryObjectui64v");
+ gl3wVertexP2ui = (PFNGLVERTEXP2UIPROC) get_proc("glVertexP2ui");
+ gl3wVertexP2uiv = (PFNGLVERTEXP2UIVPROC) get_proc("glVertexP2uiv");
+ gl3wVertexP3ui = (PFNGLVERTEXP3UIPROC) get_proc("glVertexP3ui");
+ gl3wVertexP3uiv = (PFNGLVERTEXP3UIVPROC) get_proc("glVertexP3uiv");
+ gl3wVertexP4ui = (PFNGLVERTEXP4UIPROC) get_proc("glVertexP4ui");
+ gl3wVertexP4uiv = (PFNGLVERTEXP4UIVPROC) get_proc("glVertexP4uiv");
+ gl3wTexCoordP1ui = (PFNGLTEXCOORDP1UIPROC) get_proc("glTexCoordP1ui");
+ gl3wTexCoordP1uiv = (PFNGLTEXCOORDP1UIVPROC) get_proc("glTexCoordP1uiv");
+ gl3wTexCoordP2ui = (PFNGLTEXCOORDP2UIPROC) get_proc("glTexCoordP2ui");
+ gl3wTexCoordP2uiv = (PFNGLTEXCOORDP2UIVPROC) get_proc("glTexCoordP2uiv");
+ gl3wTexCoordP3ui = (PFNGLTEXCOORDP3UIPROC) get_proc("glTexCoordP3ui");
+ gl3wTexCoordP3uiv = (PFNGLTEXCOORDP3UIVPROC) get_proc("glTexCoordP3uiv");
+ gl3wTexCoordP4ui = (PFNGLTEXCOORDP4UIPROC) get_proc("glTexCoordP4ui");
+ gl3wTexCoordP4uiv = (PFNGLTEXCOORDP4UIVPROC) get_proc("glTexCoordP4uiv");
+ gl3wMultiTexCoordP1ui = (PFNGLMULTITEXCOORDP1UIPROC) get_proc("glMultiTexCoordP1ui");
+ gl3wMultiTexCoordP1uiv = (PFNGLMULTITEXCOORDP1UIVPROC) get_proc("glMultiTexCoordP1uiv");
+ gl3wMultiTexCoordP2ui = (PFNGLMULTITEXCOORDP2UIPROC) get_proc("glMultiTexCoordP2ui");
+ gl3wMultiTexCoordP2uiv = (PFNGLMULTITEXCOORDP2UIVPROC) get_proc("glMultiTexCoordP2uiv");
+ gl3wMultiTexCoordP3ui = (PFNGLMULTITEXCOORDP3UIPROC) get_proc("glMultiTexCoordP3ui");
+ gl3wMultiTexCoordP3uiv = (PFNGLMULTITEXCOORDP3UIVPROC) get_proc("glMultiTexCoordP3uiv");
+ gl3wMultiTexCoordP4ui = (PFNGLMULTITEXCOORDP4UIPROC) get_proc("glMultiTexCoordP4ui");
+ gl3wMultiTexCoordP4uiv = (PFNGLMULTITEXCOORDP4UIVPROC) get_proc("glMultiTexCoordP4uiv");
+ gl3wNormalP3ui = (PFNGLNORMALP3UIPROC) get_proc("glNormalP3ui");
+ gl3wNormalP3uiv = (PFNGLNORMALP3UIVPROC) get_proc("glNormalP3uiv");
+ gl3wColorP3ui = (PFNGLCOLORP3UIPROC) get_proc("glColorP3ui");
+ gl3wColorP3uiv = (PFNGLCOLORP3UIVPROC) get_proc("glColorP3uiv");
+ gl3wColorP4ui = (PFNGLCOLORP4UIPROC) get_proc("glColorP4ui");
+ gl3wColorP4uiv = (PFNGLCOLORP4UIVPROC) get_proc("glColorP4uiv");
+ gl3wSecondaryColorP3ui = (PFNGLSECONDARYCOLORP3UIPROC) get_proc("glSecondaryColorP3ui");
+ gl3wSecondaryColorP3uiv = (PFNGLSECONDARYCOLORP3UIVPROC) get_proc("glSecondaryColorP3uiv");
+ gl3wVertexAttribP1ui = (PFNGLVERTEXATTRIBP1UIPROC) get_proc("glVertexAttribP1ui");
+ gl3wVertexAttribP1uiv = (PFNGLVERTEXATTRIBP1UIVPROC) get_proc("glVertexAttribP1uiv");
+ gl3wVertexAttribP2ui = (PFNGLVERTEXATTRIBP2UIPROC) get_proc("glVertexAttribP2ui");
+ gl3wVertexAttribP2uiv = (PFNGLVERTEXATTRIBP2UIVPROC) get_proc("glVertexAttribP2uiv");
+ gl3wVertexAttribP3ui = (PFNGLVERTEXATTRIBP3UIPROC) get_proc("glVertexAttribP3ui");
+ gl3wVertexAttribP3uiv = (PFNGLVERTEXATTRIBP3UIVPROC) get_proc("glVertexAttribP3uiv");
+ gl3wVertexAttribP4ui = (PFNGLVERTEXATTRIBP4UIPROC) get_proc("glVertexAttribP4ui");
+ gl3wVertexAttribP4uiv = (PFNGLVERTEXATTRIBP4UIVPROC) get_proc("glVertexAttribP4uiv");
+ gl3wDrawArraysIndirect = (PFNGLDRAWARRAYSINDIRECTPROC) get_proc("glDrawArraysIndirect");
+ gl3wDrawElementsIndirect = (PFNGLDRAWELEMENTSINDIRECTPROC) get_proc("glDrawElementsIndirect");
+ gl3wUniform1d = (PFNGLUNIFORM1DPROC) get_proc("glUniform1d");
+ gl3wUniform2d = (PFNGLUNIFORM2DPROC) get_proc("glUniform2d");
+ gl3wUniform3d = (PFNGLUNIFORM3DPROC) get_proc("glUniform3d");
+ gl3wUniform4d = (PFNGLUNIFORM4DPROC) get_proc("glUniform4d");
+ gl3wUniform1dv = (PFNGLUNIFORM1DVPROC) get_proc("glUniform1dv");
+ gl3wUniform2dv = (PFNGLUNIFORM2DVPROC) get_proc("glUniform2dv");
+ gl3wUniform3dv = (PFNGLUNIFORM3DVPROC) get_proc("glUniform3dv");
+ gl3wUniform4dv = (PFNGLUNIFORM4DVPROC) get_proc("glUniform4dv");
+ gl3wUniformMatrix2dv = (PFNGLUNIFORMMATRIX2DVPROC) get_proc("glUniformMatrix2dv");
+ gl3wUniformMatrix3dv = (PFNGLUNIFORMMATRIX3DVPROC) get_proc("glUniformMatrix3dv");
+ gl3wUniformMatrix4dv = (PFNGLUNIFORMMATRIX4DVPROC) get_proc("glUniformMatrix4dv");
+ gl3wUniformMatrix2x3dv = (PFNGLUNIFORMMATRIX2X3DVPROC) get_proc("glUniformMatrix2x3dv");
+ gl3wUniformMatrix2x4dv = (PFNGLUNIFORMMATRIX2X4DVPROC) get_proc("glUniformMatrix2x4dv");
+ gl3wUniformMatrix3x2dv = (PFNGLUNIFORMMATRIX3X2DVPROC) get_proc("glUniformMatrix3x2dv");
+ gl3wUniformMatrix3x4dv = (PFNGLUNIFORMMATRIX3X4DVPROC) get_proc("glUniformMatrix3x4dv");
+ gl3wUniformMatrix4x2dv = (PFNGLUNIFORMMATRIX4X2DVPROC) get_proc("glUniformMatrix4x2dv");
+ gl3wUniformMatrix4x3dv = (PFNGLUNIFORMMATRIX4X3DVPROC) get_proc("glUniformMatrix4x3dv");
+ gl3wGetUniformdv = (PFNGLGETUNIFORMDVPROC) get_proc("glGetUniformdv");
+ gl3wGetSubroutineUniformLocation = (PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) get_proc("glGetSubroutineUniformLocation");
+ gl3wGetSubroutineIndex = (PFNGLGETSUBROUTINEINDEXPROC) get_proc("glGetSubroutineIndex");
+ gl3wGetActiveSubroutineUniformiv = (PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) get_proc("glGetActiveSubroutineUniformiv");
+ gl3wGetActiveSubroutineUniformName = (PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) get_proc("glGetActiveSubroutineUniformName");
+ gl3wGetActiveSubroutineName = (PFNGLGETACTIVESUBROUTINENAMEPROC) get_proc("glGetActiveSubroutineName");
+ gl3wUniformSubroutinesuiv = (PFNGLUNIFORMSUBROUTINESUIVPROC) get_proc("glUniformSubroutinesuiv");
+ gl3wGetUniformSubroutineuiv = (PFNGLGETUNIFORMSUBROUTINEUIVPROC) get_proc("glGetUniformSubroutineuiv");
+ gl3wGetProgramStageiv = (PFNGLGETPROGRAMSTAGEIVPROC) get_proc("glGetProgramStageiv");
+ gl3wPatchParameteri = (PFNGLPATCHPARAMETERIPROC) get_proc("glPatchParameteri");
+ gl3wPatchParameterfv = (PFNGLPATCHPARAMETERFVPROC) get_proc("glPatchParameterfv");
+ gl3wBindTransformFeedback = (PFNGLBINDTRANSFORMFEEDBACKPROC) get_proc("glBindTransformFeedback");
+ gl3wDeleteTransformFeedbacks = (PFNGLDELETETRANSFORMFEEDBACKSPROC) get_proc("glDeleteTransformFeedbacks");
+ gl3wGenTransformFeedbacks = (PFNGLGENTRANSFORMFEEDBACKSPROC) get_proc("glGenTransformFeedbacks");
+ gl3wIsTransformFeedback = (PFNGLISTRANSFORMFEEDBACKPROC) get_proc("glIsTransformFeedback");
+ gl3wPauseTransformFeedback = (PFNGLPAUSETRANSFORMFEEDBACKPROC) get_proc("glPauseTransformFeedback");
+ gl3wResumeTransformFeedback = (PFNGLRESUMETRANSFORMFEEDBACKPROC) get_proc("glResumeTransformFeedback");
+ gl3wDrawTransformFeedback = (PFNGLDRAWTRANSFORMFEEDBACKPROC) get_proc("glDrawTransformFeedback");
+ gl3wDrawTransformFeedbackStream = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) get_proc("glDrawTransformFeedbackStream");
+ gl3wBeginQueryIndexed = (PFNGLBEGINQUERYINDEXEDPROC) get_proc("glBeginQueryIndexed");
+ gl3wEndQueryIndexed = (PFNGLENDQUERYINDEXEDPROC) get_proc("glEndQueryIndexed");
+ gl3wGetQueryIndexediv = (PFNGLGETQUERYINDEXEDIVPROC) get_proc("glGetQueryIndexediv");
+ gl3wReleaseShaderCompiler = (PFNGLRELEASESHADERCOMPILERPROC) get_proc("glReleaseShaderCompiler");
+ gl3wShaderBinary = (PFNGLSHADERBINARYPROC) get_proc("glShaderBinary");
+ gl3wGetShaderPrecisionFormat = (PFNGLGETSHADERPRECISIONFORMATPROC) get_proc("glGetShaderPrecisionFormat");
+ gl3wDepthRangef = (PFNGLDEPTHRANGEFPROC) get_proc("glDepthRangef");
+ gl3wClearDepthf = (PFNGLCLEARDEPTHFPROC) get_proc("glClearDepthf");
+ gl3wGetProgramBinary = (PFNGLGETPROGRAMBINARYPROC) get_proc("glGetProgramBinary");
+ gl3wProgramBinary = (PFNGLPROGRAMBINARYPROC) get_proc("glProgramBinary");
+ gl3wProgramParameteri = (PFNGLPROGRAMPARAMETERIPROC) get_proc("glProgramParameteri");
+ gl3wUseProgramStages = (PFNGLUSEPROGRAMSTAGESPROC) get_proc("glUseProgramStages");
+ gl3wActiveShaderProgram = (PFNGLACTIVESHADERPROGRAMPROC) get_proc("glActiveShaderProgram");
+ gl3wCreateShaderProgramv = (PFNGLCREATESHADERPROGRAMVPROC) get_proc("glCreateShaderProgramv");
+ gl3wBindProgramPipeline = (PFNGLBINDPROGRAMPIPELINEPROC) get_proc("glBindProgramPipeline");
+ gl3wDeleteProgramPipelines = (PFNGLDELETEPROGRAMPIPELINESPROC) get_proc("glDeleteProgramPipelines");
+ gl3wGenProgramPipelines = (PFNGLGENPROGRAMPIPELINESPROC) get_proc("glGenProgramPipelines");
+ gl3wIsProgramPipeline = (PFNGLISPROGRAMPIPELINEPROC) get_proc("glIsProgramPipeline");
+ gl3wGetProgramPipelineiv = (PFNGLGETPROGRAMPIPELINEIVPROC) get_proc("glGetProgramPipelineiv");
+ gl3wProgramUniform1i = (PFNGLPROGRAMUNIFORM1IPROC) get_proc("glProgramUniform1i");
+ gl3wProgramUniform1iv = (PFNGLPROGRAMUNIFORM1IVPROC) get_proc("glProgramUniform1iv");
+ gl3wProgramUniform1f = (PFNGLPROGRAMUNIFORM1FPROC) get_proc("glProgramUniform1f");
+ gl3wProgramUniform1fv = (PFNGLPROGRAMUNIFORM1FVPROC) get_proc("glProgramUniform1fv");
+ gl3wProgramUniform1d = (PFNGLPROGRAMUNIFORM1DPROC) get_proc("glProgramUniform1d");
+ gl3wProgramUniform1dv = (PFNGLPROGRAMUNIFORM1DVPROC) get_proc("glProgramUniform1dv");
+ gl3wProgramUniform1ui = (PFNGLPROGRAMUNIFORM1UIPROC) get_proc("glProgramUniform1ui");
+ gl3wProgramUniform1uiv = (PFNGLPROGRAMUNIFORM1UIVPROC) get_proc("glProgramUniform1uiv");
+ gl3wProgramUniform2i = (PFNGLPROGRAMUNIFORM2IPROC) get_proc("glProgramUniform2i");
+ gl3wProgramUniform2iv = (PFNGLPROGRAMUNIFORM2IVPROC) get_proc("glProgramUniform2iv");
+ gl3wProgramUniform2f = (PFNGLPROGRAMUNIFORM2FPROC) get_proc("glProgramUniform2f");
+ gl3wProgramUniform2fv = (PFNGLPROGRAMUNIFORM2FVPROC) get_proc("glProgramUniform2fv");
+ gl3wProgramUniform2d = (PFNGLPROGRAMUNIFORM2DPROC) get_proc("glProgramUniform2d");
+ gl3wProgramUniform2dv = (PFNGLPROGRAMUNIFORM2DVPROC) get_proc("glProgramUniform2dv");
+ gl3wProgramUniform2ui = (PFNGLPROGRAMUNIFORM2UIPROC) get_proc("glProgramUniform2ui");
+ gl3wProgramUniform2uiv = (PFNGLPROGRAMUNIFORM2UIVPROC) get_proc("glProgramUniform2uiv");
+ gl3wProgramUniform3i = (PFNGLPROGRAMUNIFORM3IPROC) get_proc("glProgramUniform3i");
+ gl3wProgramUniform3iv = (PFNGLPROGRAMUNIFORM3IVPROC) get_proc("glProgramUniform3iv");
+ gl3wProgramUniform3f = (PFNGLPROGRAMUNIFORM3FPROC) get_proc("glProgramUniform3f");
+ gl3wProgramUniform3fv = (PFNGLPROGRAMUNIFORM3FVPROC) get_proc("glProgramUniform3fv");
+ gl3wProgramUniform3d = (PFNGLPROGRAMUNIFORM3DPROC) get_proc("glProgramUniform3d");
+ gl3wProgramUniform3dv = (PFNGLPROGRAMUNIFORM3DVPROC) get_proc("glProgramUniform3dv");
+ gl3wProgramUniform3ui = (PFNGLPROGRAMUNIFORM3UIPROC) get_proc("glProgramUniform3ui");
+ gl3wProgramUniform3uiv = (PFNGLPROGRAMUNIFORM3UIVPROC) get_proc("glProgramUniform3uiv");
+ gl3wProgramUniform4i = (PFNGLPROGRAMUNIFORM4IPROC) get_proc("glProgramUniform4i");
+ gl3wProgramUniform4iv = (PFNGLPROGRAMUNIFORM4IVPROC) get_proc("glProgramUniform4iv");
+ gl3wProgramUniform4f = (PFNGLPROGRAMUNIFORM4FPROC) get_proc("glProgramUniform4f");
+ gl3wProgramUniform4fv = (PFNGLPROGRAMUNIFORM4FVPROC) get_proc("glProgramUniform4fv");
+ gl3wProgramUniform4d = (PFNGLPROGRAMUNIFORM4DPROC) get_proc("glProgramUniform4d");
+ gl3wProgramUniform4dv = (PFNGLPROGRAMUNIFORM4DVPROC) get_proc("glProgramUniform4dv");
+ gl3wProgramUniform4ui = (PFNGLPROGRAMUNIFORM4UIPROC) get_proc("glProgramUniform4ui");
+ gl3wProgramUniform4uiv = (PFNGLPROGRAMUNIFORM4UIVPROC) get_proc("glProgramUniform4uiv");
+ gl3wProgramUniformMatrix2fv = (PFNGLPROGRAMUNIFORMMATRIX2FVPROC) get_proc("glProgramUniformMatrix2fv");
+ gl3wProgramUniformMatrix3fv = (PFNGLPROGRAMUNIFORMMATRIX3FVPROC) get_proc("glProgramUniformMatrix3fv");
+ gl3wProgramUniformMatrix4fv = (PFNGLPROGRAMUNIFORMMATRIX4FVPROC) get_proc("glProgramUniformMatrix4fv");
+ gl3wProgramUniformMatrix2dv = (PFNGLPROGRAMUNIFORMMATRIX2DVPROC) get_proc("glProgramUniformMatrix2dv");
+ gl3wProgramUniformMatrix3dv = (PFNGLPROGRAMUNIFORMMATRIX3DVPROC) get_proc("glProgramUniformMatrix3dv");
+ gl3wProgramUniformMatrix4dv = (PFNGLPROGRAMUNIFORMMATRIX4DVPROC) get_proc("glProgramUniformMatrix4dv");
+ gl3wProgramUniformMatrix2x3fv = (PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) get_proc("glProgramUniformMatrix2x3fv");
+ gl3wProgramUniformMatrix3x2fv = (PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) get_proc("glProgramUniformMatrix3x2fv");
+ gl3wProgramUniformMatrix2x4fv = (PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) get_proc("glProgramUniformMatrix2x4fv");
+ gl3wProgramUniformMatrix4x2fv = (PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) get_proc("glProgramUniformMatrix4x2fv");
+ gl3wProgramUniformMatrix3x4fv = (PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) get_proc("glProgramUniformMatrix3x4fv");
+ gl3wProgramUniformMatrix4x3fv = (PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) get_proc("glProgramUniformMatrix4x3fv");
+ gl3wProgramUniformMatrix2x3dv = (PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) get_proc("glProgramUniformMatrix2x3dv");
+ gl3wProgramUniformMatrix3x2dv = (PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) get_proc("glProgramUniformMatrix3x2dv");
+ gl3wProgramUniformMatrix2x4dv = (PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) get_proc("glProgramUniformMatrix2x4dv");
+ gl3wProgramUniformMatrix4x2dv = (PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) get_proc("glProgramUniformMatrix4x2dv");
+ gl3wProgramUniformMatrix3x4dv = (PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) get_proc("glProgramUniformMatrix3x4dv");
+ gl3wProgramUniformMatrix4x3dv = (PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) get_proc("glProgramUniformMatrix4x3dv");
+ gl3wValidateProgramPipeline = (PFNGLVALIDATEPROGRAMPIPELINEPROC) get_proc("glValidateProgramPipeline");
+ gl3wGetProgramPipelineInfoLog = (PFNGLGETPROGRAMPIPELINEINFOLOGPROC) get_proc("glGetProgramPipelineInfoLog");
+ gl3wVertexAttribL1d = (PFNGLVERTEXATTRIBL1DPROC) get_proc("glVertexAttribL1d");
+ gl3wVertexAttribL2d = (PFNGLVERTEXATTRIBL2DPROC) get_proc("glVertexAttribL2d");
+ gl3wVertexAttribL3d = (PFNGLVERTEXATTRIBL3DPROC) get_proc("glVertexAttribL3d");
+ gl3wVertexAttribL4d = (PFNGLVERTEXATTRIBL4DPROC) get_proc("glVertexAttribL4d");
+ gl3wVertexAttribL1dv = (PFNGLVERTEXATTRIBL1DVPROC) get_proc("glVertexAttribL1dv");
+ gl3wVertexAttribL2dv = (PFNGLVERTEXATTRIBL2DVPROC) get_proc("glVertexAttribL2dv");
+ gl3wVertexAttribL3dv = (PFNGLVERTEXATTRIBL3DVPROC) get_proc("glVertexAttribL3dv");
+ gl3wVertexAttribL4dv = (PFNGLVERTEXATTRIBL4DVPROC) get_proc("glVertexAttribL4dv");
+ gl3wVertexAttribLPointer = (PFNGLVERTEXATTRIBLPOINTERPROC) get_proc("glVertexAttribLPointer");
+ gl3wGetVertexAttribLdv = (PFNGLGETVERTEXATTRIBLDVPROC) get_proc("glGetVertexAttribLdv");
+ gl3wViewportArrayv = (PFNGLVIEWPORTARRAYVPROC) get_proc("glViewportArrayv");
+ gl3wViewportIndexedf = (PFNGLVIEWPORTINDEXEDFPROC) get_proc("glViewportIndexedf");
+ gl3wViewportIndexedfv = (PFNGLVIEWPORTINDEXEDFVPROC) get_proc("glViewportIndexedfv");
+ gl3wScissorArrayv = (PFNGLSCISSORARRAYVPROC) get_proc("glScissorArrayv");
+ gl3wScissorIndexed = (PFNGLSCISSORINDEXEDPROC) get_proc("glScissorIndexed");
+ gl3wScissorIndexedv = (PFNGLSCISSORINDEXEDVPROC) get_proc("glScissorIndexedv");
+ gl3wDepthRangeArrayv = (PFNGLDEPTHRANGEARRAYVPROC) get_proc("glDepthRangeArrayv");
+ gl3wDepthRangeIndexed = (PFNGLDEPTHRANGEINDEXEDPROC) get_proc("glDepthRangeIndexed");
+ gl3wGetFloati_v = (PFNGLGETFLOATI_VPROC) get_proc("glGetFloati_v");
+ gl3wGetDoublei_v = (PFNGLGETDOUBLEI_VPROC) get_proc("glGetDoublei_v");
+ gl3wCreateSyncFromCLeventARB = (PFNGLCREATESYNCFROMCLEVENTARBPROC) get_proc("glCreateSyncFromCLeventARB");
+ gl3wDebugMessageControlARB = (PFNGLDEBUGMESSAGECONTROLARBPROC) get_proc("glDebugMessageControlARB");
+ gl3wDebugMessageInsertARB = (PFNGLDEBUGMESSAGEINSERTARBPROC) get_proc("glDebugMessageInsertARB");
+ gl3wDebugMessageCallbackARB = (PFNGLDEBUGMESSAGECALLBACKARBPROC) get_proc("glDebugMessageCallbackARB");
+ gl3wGetDebugMessageLogARB = (PFNGLGETDEBUGMESSAGELOGARBPROC) get_proc("glGetDebugMessageLogARB");
+ gl3wGetGraphicsResetStatusARB = (PFNGLGETGRAPHICSRESETSTATUSARBPROC) get_proc("glGetGraphicsResetStatusARB");
+ gl3wGetnTexImageARB = (PFNGLGETNTEXIMAGEARBPROC) get_proc("glGetnTexImageARB");
+ gl3wReadnPixelsARB = (PFNGLREADNPIXELSARBPROC) get_proc("glReadnPixelsARB");
+ gl3wGetnCompressedTexImageARB = (PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) get_proc("glGetnCompressedTexImageARB");
+ gl3wGetnUniformfvARB = (PFNGLGETNUNIFORMFVARBPROC) get_proc("glGetnUniformfvARB");
+ gl3wGetnUniformivARB = (PFNGLGETNUNIFORMIVARBPROC) get_proc("glGetnUniformivARB");
+ gl3wGetnUniformuivARB = (PFNGLGETNUNIFORMUIVARBPROC) get_proc("glGetnUniformuivARB");
+ gl3wGetnUniformdvARB = (PFNGLGETNUNIFORMDVARBPROC) get_proc("glGetnUniformdvARB");
+ gl3wDrawArraysInstancedBaseInstance = (PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) get_proc("glDrawArraysInstancedBaseInstance");
+ gl3wDrawElementsInstancedBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) get_proc("glDrawElementsInstancedBaseInstance");
+ gl3wDrawElementsInstancedBaseVertexBaseInstance = (PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) get_proc("glDrawElementsInstancedBaseVertexBaseInstance");
+ gl3wDrawTransformFeedbackInstanced = (PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) get_proc("glDrawTransformFeedbackInstanced");
+ gl3wDrawTransformFeedbackStreamInstanced = (PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) get_proc("glDrawTransformFeedbackStreamInstanced");
+ gl3wGetInternalformativ = (PFNGLGETINTERNALFORMATIVPROC) get_proc("glGetInternalformativ");
+ gl3wGetActiveAtomicCounterBufferiv = (PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) get_proc("glGetActiveAtomicCounterBufferiv");
+ gl3wBindImageTexture = (PFNGLBINDIMAGETEXTUREPROC) get_proc("glBindImageTexture");
+ gl3wMemoryBarrier = (PFNGLMEMORYBARRIERPROC) get_proc("glMemoryBarrier");
+ gl3wTexStorage1D = (PFNGLTEXSTORAGE1DPROC) get_proc("glTexStorage1D");
+ gl3wTexStorage2D = (PFNGLTEXSTORAGE2DPROC) get_proc("glTexStorage2D");
+ gl3wTexStorage3D = (PFNGLTEXSTORAGE3DPROC) get_proc("glTexStorage3D");
+ gl3wTextureStorage1DEXT = (PFNGLTEXTURESTORAGE1DEXTPROC) get_proc("glTextureStorage1DEXT");
+ gl3wTextureStorage2DEXT = (PFNGLTEXTURESTORAGE2DEXTPROC) get_proc("glTextureStorage2DEXT");
+ gl3wTextureStorage3DEXT = (PFNGLTEXTURESTORAGE3DEXTPROC) get_proc("glTextureStorage3DEXT");
+ gl3wDebugMessageControl = (PFNGLDEBUGMESSAGECONTROLPROC) get_proc("glDebugMessageControl");
+ gl3wDebugMessageInsert = (PFNGLDEBUGMESSAGEINSERTPROC) get_proc("glDebugMessageInsert");
+ gl3wDebugMessageCallback = (PFNGLDEBUGMESSAGECALLBACKPROC) get_proc("glDebugMessageCallback");
+ gl3wGetDebugMessageLog = (PFNGLGETDEBUGMESSAGELOGPROC) get_proc("glGetDebugMessageLog");
+ gl3wPushDebugGroup = (PFNGLPUSHDEBUGGROUPPROC) get_proc("glPushDebugGroup");
+ gl3wPopDebugGroup = (PFNGLPOPDEBUGGROUPPROC) get_proc("glPopDebugGroup");
+ gl3wObjectLabel = (PFNGLOBJECTLABELPROC) get_proc("glObjectLabel");
+ gl3wGetObjectLabel = (PFNGLGETOBJECTLABELPROC) get_proc("glGetObjectLabel");
+ gl3wObjectPtrLabel = (PFNGLOBJECTPTRLABELPROC) get_proc("glObjectPtrLabel");
+ gl3wGetObjectPtrLabel = (PFNGLGETOBJECTPTRLABELPROC) get_proc("glGetObjectPtrLabel");
+ gl3wClearBufferData = (PFNGLCLEARBUFFERDATAPROC) get_proc("glClearBufferData");
+ gl3wClearBufferSubData = (PFNGLCLEARBUFFERSUBDATAPROC) get_proc("glClearBufferSubData");
+ gl3wClearNamedBufferDataEXT = (PFNGLCLEARNAMEDBUFFERDATAEXTPROC) get_proc("glClearNamedBufferDataEXT");
+ gl3wClearNamedBufferSubDataEXT = (PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) get_proc("glClearNamedBufferSubDataEXT");
+ gl3wDispatchCompute = (PFNGLDISPATCHCOMPUTEPROC) get_proc("glDispatchCompute");
+ gl3wDispatchComputeIndirect = (PFNGLDISPATCHCOMPUTEINDIRECTPROC) get_proc("glDispatchComputeIndirect");
+ gl3wCopyImageSubData = (PFNGLCOPYIMAGESUBDATAPROC) get_proc("glCopyImageSubData");
+ gl3wTextureView = (PFNGLTEXTUREVIEWPROC) get_proc("glTextureView");
+ gl3wBindVertexBuffer = (PFNGLBINDVERTEXBUFFERPROC) get_proc("glBindVertexBuffer");
+ gl3wVertexAttribFormat = (PFNGLVERTEXATTRIBFORMATPROC) get_proc("glVertexAttribFormat");
+ gl3wVertexAttribIFormat = (PFNGLVERTEXATTRIBIFORMATPROC) get_proc("glVertexAttribIFormat");
+ gl3wVertexAttribLFormat = (PFNGLVERTEXATTRIBLFORMATPROC) get_proc("glVertexAttribLFormat");
+ gl3wVertexAttribBinding = (PFNGLVERTEXATTRIBBINDINGPROC) get_proc("glVertexAttribBinding");
+ gl3wVertexBindingDivisor = (PFNGLVERTEXBINDINGDIVISORPROC) get_proc("glVertexBindingDivisor");
+ gl3wVertexArrayBindVertexBufferEXT = (PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) get_proc("glVertexArrayBindVertexBufferEXT");
+ gl3wVertexArrayVertexAttribFormatEXT = (PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) get_proc("glVertexArrayVertexAttribFormatEXT");
+ gl3wVertexArrayVertexAttribIFormatEXT = (PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) get_proc("glVertexArrayVertexAttribIFormatEXT");
+ gl3wVertexArrayVertexAttribLFormatEXT = (PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) get_proc("glVertexArrayVertexAttribLFormatEXT");
+ gl3wVertexArrayVertexAttribBindingEXT = (PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) get_proc("glVertexArrayVertexAttribBindingEXT");
+ gl3wVertexArrayVertexBindingDivisorEXT = (PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) get_proc("glVertexArrayVertexBindingDivisorEXT");
+ gl3wFramebufferParameteri = (PFNGLFRAMEBUFFERPARAMETERIPROC) get_proc("glFramebufferParameteri");
+ gl3wGetFramebufferParameteriv = (PFNGLGETFRAMEBUFFERPARAMETERIVPROC) get_proc("glGetFramebufferParameteriv");
+ gl3wNamedFramebufferParameteriEXT = (PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) get_proc("glNamedFramebufferParameteriEXT");
+ gl3wGetNamedFramebufferParameterivEXT = (PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) get_proc("glGetNamedFramebufferParameterivEXT");
+ gl3wGetInternalformati64v = (PFNGLGETINTERNALFORMATI64VPROC) get_proc("glGetInternalformati64v");
+ gl3wInvalidateTexSubImage = (PFNGLINVALIDATETEXSUBIMAGEPROC) get_proc("glInvalidateTexSubImage");
+ gl3wInvalidateTexImage = (PFNGLINVALIDATETEXIMAGEPROC) get_proc("glInvalidateTexImage");
+ gl3wInvalidateBufferSubData = (PFNGLINVALIDATEBUFFERSUBDATAPROC) get_proc("glInvalidateBufferSubData");
+ gl3wInvalidateBufferData = (PFNGLINVALIDATEBUFFERDATAPROC) get_proc("glInvalidateBufferData");
+ gl3wInvalidateFramebuffer = (PFNGLINVALIDATEFRAMEBUFFERPROC) get_proc("glInvalidateFramebuffer");
+ gl3wInvalidateSubFramebuffer = (PFNGLINVALIDATESUBFRAMEBUFFERPROC) get_proc("glInvalidateSubFramebuffer");
+ gl3wMultiDrawArraysIndirect = (PFNGLMULTIDRAWARRAYSINDIRECTPROC) get_proc("glMultiDrawArraysIndirect");
+ gl3wMultiDrawElementsIndirect = (PFNGLMULTIDRAWELEMENTSINDIRECTPROC) get_proc("glMultiDrawElementsIndirect");
+ gl3wGetProgramInterfaceiv = (PFNGLGETPROGRAMINTERFACEIVPROC) get_proc("glGetProgramInterfaceiv");
+ gl3wGetProgramResourceIndex = (PFNGLGETPROGRAMRESOURCEINDEXPROC) get_proc("glGetProgramResourceIndex");
+ gl3wGetProgramResourceName = (PFNGLGETPROGRAMRESOURCENAMEPROC) get_proc("glGetProgramResourceName");
+ gl3wGetProgramResourceiv = (PFNGLGETPROGRAMRESOURCEIVPROC) get_proc("glGetProgramResourceiv");
+ gl3wGetProgramResourceLocation = (PFNGLGETPROGRAMRESOURCELOCATIONPROC) get_proc("glGetProgramResourceLocation");
+ gl3wGetProgramResourceLocationIndex = (PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) get_proc("glGetProgramResourceLocationIndex");
+ gl3wShaderStorageBlockBinding = (PFNGLSHADERSTORAGEBLOCKBINDINGPROC) get_proc("glShaderStorageBlockBinding");
+ gl3wTexBufferRange = (PFNGLTEXBUFFERRANGEPROC) get_proc("glTexBufferRange");
+ gl3wTextureBufferRangeEXT = (PFNGLTEXTUREBUFFERRANGEEXTPROC) get_proc("glTextureBufferRangeEXT");
+ gl3wTexStorage2DMultisample = (PFNGLTEXSTORAGE2DMULTISAMPLEPROC) get_proc("glTexStorage2DMultisample");
+ gl3wTexStorage3DMultisample = (PFNGLTEXSTORAGE3DMULTISAMPLEPROC) get_proc("glTexStorage3DMultisample");
+ gl3wTextureStorage2DMultisampleEXT = (PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) get_proc("glTextureStorage2DMultisampleEXT");
+ gl3wTextureStorage3DMultisampleEXT = (PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) get_proc("glTextureStorage3DMultisampleEXT");
+}
diff --git a/3rdparty/imgui/examples/libs/gl3w/GL/gl3w.h b/3rdparty/imgui/examples/libs/gl3w/GL/gl3w.h
new file mode 100644
index 00000000..ee563f8d
--- /dev/null
+++ b/3rdparty/imgui/examples/libs/gl3w/GL/gl3w.h
@@ -0,0 +1,1234 @@
+#ifndef __gl3w_h_
+#define __gl3w_h_
+
+#include
+
+#ifndef __gl_h_
+#define __gl_h_
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* gl3w api */
+int gl3wInit(void);
+int gl3wIsSupported(int major, int minor);
+void *gl3wGetProcAddress(const char *proc);
+
+/* OpenGL functions */
+extern PFNGLCULLFACEPROC gl3wCullFace;
+extern PFNGLFRONTFACEPROC gl3wFrontFace;
+extern PFNGLHINTPROC gl3wHint;
+extern PFNGLLINEWIDTHPROC gl3wLineWidth;
+extern PFNGLPOINTSIZEPROC gl3wPointSize;
+extern PFNGLPOLYGONMODEPROC gl3wPolygonMode;
+extern PFNGLSCISSORPROC gl3wScissor;
+extern PFNGLTEXPARAMETERFPROC gl3wTexParameterf;
+extern PFNGLTEXPARAMETERFVPROC gl3wTexParameterfv;
+extern PFNGLTEXPARAMETERIPROC gl3wTexParameteri;
+extern PFNGLTEXPARAMETERIVPROC gl3wTexParameteriv;
+extern PFNGLTEXIMAGE1DPROC gl3wTexImage1D;
+extern PFNGLTEXIMAGE2DPROC gl3wTexImage2D;
+extern PFNGLDRAWBUFFERPROC gl3wDrawBuffer;
+extern PFNGLCLEARPROC gl3wClear;
+extern PFNGLCLEARCOLORPROC gl3wClearColor;
+extern PFNGLCLEARSTENCILPROC gl3wClearStencil;
+extern PFNGLCLEARDEPTHPROC gl3wClearDepth;
+extern PFNGLSTENCILMASKPROC gl3wStencilMask;
+extern PFNGLCOLORMASKPROC gl3wColorMask;
+extern PFNGLDEPTHMASKPROC gl3wDepthMask;
+extern PFNGLDISABLEPROC gl3wDisable;
+extern PFNGLENABLEPROC gl3wEnable;
+extern PFNGLFINISHPROC gl3wFinish;
+extern PFNGLFLUSHPROC gl3wFlush;
+extern PFNGLBLENDFUNCPROC gl3wBlendFunc;
+extern PFNGLLOGICOPPROC gl3wLogicOp;
+extern PFNGLSTENCILFUNCPROC gl3wStencilFunc;
+extern PFNGLSTENCILOPPROC gl3wStencilOp;
+extern PFNGLDEPTHFUNCPROC gl3wDepthFunc;
+extern PFNGLPIXELSTOREFPROC gl3wPixelStoref;
+extern PFNGLPIXELSTOREIPROC gl3wPixelStorei;
+extern PFNGLREADBUFFERPROC gl3wReadBuffer;
+extern PFNGLREADPIXELSPROC gl3wReadPixels;
+extern PFNGLGETBOOLEANVPROC gl3wGetBooleanv;
+extern PFNGLGETDOUBLEVPROC gl3wGetDoublev;
+extern PFNGLGETERRORPROC gl3wGetError;
+extern PFNGLGETFLOATVPROC gl3wGetFloatv;
+extern PFNGLGETINTEGERVPROC gl3wGetIntegerv;
+extern PFNGLGETSTRINGPROC gl3wGetString;
+extern PFNGLGETTEXIMAGEPROC gl3wGetTexImage;
+extern PFNGLGETTEXPARAMETERFVPROC gl3wGetTexParameterfv;
+extern PFNGLGETTEXPARAMETERIVPROC gl3wGetTexParameteriv;
+extern PFNGLGETTEXLEVELPARAMETERFVPROC gl3wGetTexLevelParameterfv;
+extern PFNGLGETTEXLEVELPARAMETERIVPROC gl3wGetTexLevelParameteriv;
+extern PFNGLISENABLEDPROC gl3wIsEnabled;
+extern PFNGLDEPTHRANGEPROC gl3wDepthRange;
+extern PFNGLVIEWPORTPROC gl3wViewport;
+extern PFNGLDRAWARRAYSPROC gl3wDrawArrays;
+extern PFNGLDRAWELEMENTSPROC gl3wDrawElements;
+extern PFNGLGETPOINTERVPROC gl3wGetPointerv;
+extern PFNGLPOLYGONOFFSETPROC gl3wPolygonOffset;
+extern PFNGLCOPYTEXIMAGE1DPROC gl3wCopyTexImage1D;
+extern PFNGLCOPYTEXIMAGE2DPROC gl3wCopyTexImage2D;
+extern PFNGLCOPYTEXSUBIMAGE1DPROC gl3wCopyTexSubImage1D;
+extern PFNGLCOPYTEXSUBIMAGE2DPROC gl3wCopyTexSubImage2D;
+extern PFNGLTEXSUBIMAGE1DPROC gl3wTexSubImage1D;
+extern PFNGLTEXSUBIMAGE2DPROC gl3wTexSubImage2D;
+extern PFNGLBINDTEXTUREPROC gl3wBindTexture;
+extern PFNGLDELETETEXTURESPROC gl3wDeleteTextures;
+extern PFNGLGENTEXTURESPROC gl3wGenTextures;
+extern PFNGLISTEXTUREPROC gl3wIsTexture;
+extern PFNGLBLENDCOLORPROC gl3wBlendColor;
+extern PFNGLBLENDEQUATIONPROC gl3wBlendEquation;
+extern PFNGLDRAWRANGEELEMENTSPROC gl3wDrawRangeElements;
+extern PFNGLTEXIMAGE3DPROC gl3wTexImage3D;
+extern PFNGLTEXSUBIMAGE3DPROC gl3wTexSubImage3D;
+extern PFNGLCOPYTEXSUBIMAGE3DPROC gl3wCopyTexSubImage3D;
+extern PFNGLACTIVETEXTUREPROC gl3wActiveTexture;
+extern PFNGLSAMPLECOVERAGEPROC gl3wSampleCoverage;
+extern PFNGLCOMPRESSEDTEXIMAGE3DPROC gl3wCompressedTexImage3D;
+extern PFNGLCOMPRESSEDTEXIMAGE2DPROC gl3wCompressedTexImage2D;
+extern PFNGLCOMPRESSEDTEXIMAGE1DPROC gl3wCompressedTexImage1D;
+extern PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC gl3wCompressedTexSubImage3D;
+extern PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC gl3wCompressedTexSubImage2D;
+extern PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC gl3wCompressedTexSubImage1D;
+extern PFNGLGETCOMPRESSEDTEXIMAGEPROC gl3wGetCompressedTexImage;
+extern PFNGLBLENDFUNCSEPARATEPROC gl3wBlendFuncSeparate;
+extern PFNGLMULTIDRAWARRAYSPROC gl3wMultiDrawArrays;
+extern PFNGLMULTIDRAWELEMENTSPROC gl3wMultiDrawElements;
+extern PFNGLPOINTPARAMETERFPROC gl3wPointParameterf;
+extern PFNGLPOINTPARAMETERFVPROC gl3wPointParameterfv;
+extern PFNGLPOINTPARAMETERIPROC gl3wPointParameteri;
+extern PFNGLPOINTPARAMETERIVPROC gl3wPointParameteriv;
+extern PFNGLGENQUERIESPROC gl3wGenQueries;
+extern PFNGLDELETEQUERIESPROC gl3wDeleteQueries;
+extern PFNGLISQUERYPROC gl3wIsQuery;
+extern PFNGLBEGINQUERYPROC gl3wBeginQuery;
+extern PFNGLENDQUERYPROC gl3wEndQuery;
+extern PFNGLGETQUERYIVPROC gl3wGetQueryiv;
+extern PFNGLGETQUERYOBJECTIVPROC gl3wGetQueryObjectiv;
+extern PFNGLGETQUERYOBJECTUIVPROC gl3wGetQueryObjectuiv;
+extern PFNGLBINDBUFFERPROC gl3wBindBuffer;
+extern PFNGLDELETEBUFFERSPROC gl3wDeleteBuffers;
+extern PFNGLGENBUFFERSPROC gl3wGenBuffers;
+extern PFNGLISBUFFERPROC gl3wIsBuffer;
+extern PFNGLBUFFERDATAPROC gl3wBufferData;
+extern PFNGLBUFFERSUBDATAPROC gl3wBufferSubData;
+extern PFNGLGETBUFFERSUBDATAPROC gl3wGetBufferSubData;
+extern PFNGLMAPBUFFERPROC gl3wMapBuffer;
+extern PFNGLUNMAPBUFFERPROC gl3wUnmapBuffer;
+extern PFNGLGETBUFFERPARAMETERIVPROC gl3wGetBufferParameteriv;
+extern PFNGLGETBUFFERPOINTERVPROC gl3wGetBufferPointerv;
+extern PFNGLBLENDEQUATIONSEPARATEPROC gl3wBlendEquationSeparate;
+extern PFNGLDRAWBUFFERSPROC gl3wDrawBuffers;
+extern PFNGLSTENCILOPSEPARATEPROC gl3wStencilOpSeparate;
+extern PFNGLSTENCILFUNCSEPARATEPROC gl3wStencilFuncSeparate;
+extern PFNGLSTENCILMASKSEPARATEPROC gl3wStencilMaskSeparate;
+extern PFNGLATTACHSHADERPROC gl3wAttachShader;
+extern PFNGLBINDATTRIBLOCATIONPROC gl3wBindAttribLocation;
+extern PFNGLCOMPILESHADERPROC gl3wCompileShader;
+extern PFNGLCREATEPROGRAMPROC gl3wCreateProgram;
+extern PFNGLCREATESHADERPROC gl3wCreateShader;
+extern PFNGLDELETEPROGRAMPROC gl3wDeleteProgram;
+extern PFNGLDELETESHADERPROC gl3wDeleteShader;
+extern PFNGLDETACHSHADERPROC gl3wDetachShader;
+extern PFNGLDISABLEVERTEXATTRIBARRAYPROC gl3wDisableVertexAttribArray;
+extern PFNGLENABLEVERTEXATTRIBARRAYPROC gl3wEnableVertexAttribArray;
+extern PFNGLGETACTIVEATTRIBPROC gl3wGetActiveAttrib;
+extern PFNGLGETACTIVEUNIFORMPROC gl3wGetActiveUniform;
+extern PFNGLGETATTACHEDSHADERSPROC gl3wGetAttachedShaders;
+extern PFNGLGETATTRIBLOCATIONPROC gl3wGetAttribLocation;
+extern PFNGLGETPROGRAMIVPROC gl3wGetProgramiv;
+extern PFNGLGETPROGRAMINFOLOGPROC gl3wGetProgramInfoLog;
+extern PFNGLGETSHADERIVPROC gl3wGetShaderiv;
+extern PFNGLGETSHADERINFOLOGPROC gl3wGetShaderInfoLog;
+extern PFNGLGETSHADERSOURCEPROC gl3wGetShaderSource;
+extern PFNGLGETUNIFORMLOCATIONPROC gl3wGetUniformLocation;
+extern PFNGLGETUNIFORMFVPROC gl3wGetUniformfv;
+extern PFNGLGETUNIFORMIVPROC gl3wGetUniformiv;
+extern PFNGLGETVERTEXATTRIBDVPROC gl3wGetVertexAttribdv;
+extern PFNGLGETVERTEXATTRIBFVPROC gl3wGetVertexAttribfv;
+extern PFNGLGETVERTEXATTRIBIVPROC gl3wGetVertexAttribiv;
+extern PFNGLGETVERTEXATTRIBPOINTERVPROC gl3wGetVertexAttribPointerv;
+extern PFNGLISPROGRAMPROC gl3wIsProgram;
+extern PFNGLISSHADERPROC gl3wIsShader;
+extern PFNGLLINKPROGRAMPROC gl3wLinkProgram;
+extern PFNGLSHADERSOURCEPROC gl3wShaderSource;
+extern PFNGLUSEPROGRAMPROC gl3wUseProgram;
+extern PFNGLUNIFORM1FPROC gl3wUniform1f;
+extern PFNGLUNIFORM2FPROC gl3wUniform2f;
+extern PFNGLUNIFORM3FPROC gl3wUniform3f;
+extern PFNGLUNIFORM4FPROC gl3wUniform4f;
+extern PFNGLUNIFORM1IPROC gl3wUniform1i;
+extern PFNGLUNIFORM2IPROC gl3wUniform2i;
+extern PFNGLUNIFORM3IPROC gl3wUniform3i;
+extern PFNGLUNIFORM4IPROC gl3wUniform4i;
+extern PFNGLUNIFORM1FVPROC gl3wUniform1fv;
+extern PFNGLUNIFORM2FVPROC gl3wUniform2fv;
+extern PFNGLUNIFORM3FVPROC gl3wUniform3fv;
+extern PFNGLUNIFORM4FVPROC gl3wUniform4fv;
+extern PFNGLUNIFORM1IVPROC gl3wUniform1iv;
+extern PFNGLUNIFORM2IVPROC gl3wUniform2iv;
+extern PFNGLUNIFORM3IVPROC gl3wUniform3iv;
+extern PFNGLUNIFORM4IVPROC gl3wUniform4iv;
+extern PFNGLUNIFORMMATRIX2FVPROC gl3wUniformMatrix2fv;
+extern PFNGLUNIFORMMATRIX3FVPROC gl3wUniformMatrix3fv;
+extern PFNGLUNIFORMMATRIX4FVPROC gl3wUniformMatrix4fv;
+extern PFNGLVALIDATEPROGRAMPROC gl3wValidateProgram;
+extern PFNGLVERTEXATTRIB1DPROC gl3wVertexAttrib1d;
+extern PFNGLVERTEXATTRIB1DVPROC gl3wVertexAttrib1dv;
+extern PFNGLVERTEXATTRIB1FPROC gl3wVertexAttrib1f;
+extern PFNGLVERTEXATTRIB1FVPROC gl3wVertexAttrib1fv;
+extern PFNGLVERTEXATTRIB1SPROC gl3wVertexAttrib1s;
+extern PFNGLVERTEXATTRIB1SVPROC gl3wVertexAttrib1sv;
+extern PFNGLVERTEXATTRIB2DPROC gl3wVertexAttrib2d;
+extern PFNGLVERTEXATTRIB2DVPROC gl3wVertexAttrib2dv;
+extern PFNGLVERTEXATTRIB2FPROC gl3wVertexAttrib2f;
+extern PFNGLVERTEXATTRIB2FVPROC gl3wVertexAttrib2fv;
+extern PFNGLVERTEXATTRIB2SPROC gl3wVertexAttrib2s;
+extern PFNGLVERTEXATTRIB2SVPROC gl3wVertexAttrib2sv;
+extern PFNGLVERTEXATTRIB3DPROC gl3wVertexAttrib3d;
+extern PFNGLVERTEXATTRIB3DVPROC gl3wVertexAttrib3dv;
+extern PFNGLVERTEXATTRIB3FPROC gl3wVertexAttrib3f;
+extern PFNGLVERTEXATTRIB3FVPROC gl3wVertexAttrib3fv;
+extern PFNGLVERTEXATTRIB3SPROC gl3wVertexAttrib3s;
+extern PFNGLVERTEXATTRIB3SVPROC gl3wVertexAttrib3sv;
+extern PFNGLVERTEXATTRIB4NBVPROC gl3wVertexAttrib4Nbv;
+extern PFNGLVERTEXATTRIB4NIVPROC gl3wVertexAttrib4Niv;
+extern PFNGLVERTEXATTRIB4NSVPROC gl3wVertexAttrib4Nsv;
+extern PFNGLVERTEXATTRIB4NUBPROC gl3wVertexAttrib4Nub;
+extern PFNGLVERTEXATTRIB4NUBVPROC gl3wVertexAttrib4Nubv;
+extern PFNGLVERTEXATTRIB4NUIVPROC gl3wVertexAttrib4Nuiv;
+extern PFNGLVERTEXATTRIB4NUSVPROC gl3wVertexAttrib4Nusv;
+extern PFNGLVERTEXATTRIB4BVPROC gl3wVertexAttrib4bv;
+extern PFNGLVERTEXATTRIB4DPROC gl3wVertexAttrib4d;
+extern PFNGLVERTEXATTRIB4DVPROC gl3wVertexAttrib4dv;
+extern PFNGLVERTEXATTRIB4FPROC gl3wVertexAttrib4f;
+extern PFNGLVERTEXATTRIB4FVPROC gl3wVertexAttrib4fv;
+extern PFNGLVERTEXATTRIB4IVPROC gl3wVertexAttrib4iv;
+extern PFNGLVERTEXATTRIB4SPROC gl3wVertexAttrib4s;
+extern PFNGLVERTEXATTRIB4SVPROC gl3wVertexAttrib4sv;
+extern PFNGLVERTEXATTRIB4UBVPROC gl3wVertexAttrib4ubv;
+extern PFNGLVERTEXATTRIB4UIVPROC gl3wVertexAttrib4uiv;
+extern PFNGLVERTEXATTRIB4USVPROC gl3wVertexAttrib4usv;
+extern PFNGLVERTEXATTRIBPOINTERPROC gl3wVertexAttribPointer;
+extern PFNGLUNIFORMMATRIX2X3FVPROC gl3wUniformMatrix2x3fv;
+extern PFNGLUNIFORMMATRIX3X2FVPROC gl3wUniformMatrix3x2fv;
+extern PFNGLUNIFORMMATRIX2X4FVPROC gl3wUniformMatrix2x4fv;
+extern PFNGLUNIFORMMATRIX4X2FVPROC gl3wUniformMatrix4x2fv;
+extern PFNGLUNIFORMMATRIX3X4FVPROC gl3wUniformMatrix3x4fv;
+extern PFNGLUNIFORMMATRIX4X3FVPROC gl3wUniformMatrix4x3fv;
+extern PFNGLCOLORMASKIPROC gl3wColorMaski;
+extern PFNGLGETBOOLEANI_VPROC gl3wGetBooleani_v;
+extern PFNGLGETINTEGERI_VPROC gl3wGetIntegeri_v;
+extern PFNGLENABLEIPROC gl3wEnablei;
+extern PFNGLDISABLEIPROC gl3wDisablei;
+extern PFNGLISENABLEDIPROC gl3wIsEnabledi;
+extern PFNGLBEGINTRANSFORMFEEDBACKPROC gl3wBeginTransformFeedback;
+extern PFNGLENDTRANSFORMFEEDBACKPROC gl3wEndTransformFeedback;
+extern PFNGLBINDBUFFERRANGEPROC gl3wBindBufferRange;
+extern PFNGLBINDBUFFERBASEPROC gl3wBindBufferBase;
+extern PFNGLTRANSFORMFEEDBACKVARYINGSPROC gl3wTransformFeedbackVaryings;
+extern PFNGLGETTRANSFORMFEEDBACKVARYINGPROC gl3wGetTransformFeedbackVarying;
+extern PFNGLCLAMPCOLORPROC gl3wClampColor;
+extern PFNGLBEGINCONDITIONALRENDERPROC gl3wBeginConditionalRender;
+extern PFNGLENDCONDITIONALRENDERPROC gl3wEndConditionalRender;
+extern PFNGLVERTEXATTRIBIPOINTERPROC gl3wVertexAttribIPointer;
+extern PFNGLGETVERTEXATTRIBIIVPROC gl3wGetVertexAttribIiv;
+extern PFNGLGETVERTEXATTRIBIUIVPROC gl3wGetVertexAttribIuiv;
+extern PFNGLVERTEXATTRIBI1IPROC gl3wVertexAttribI1i;
+extern PFNGLVERTEXATTRIBI2IPROC gl3wVertexAttribI2i;
+extern PFNGLVERTEXATTRIBI3IPROC gl3wVertexAttribI3i;
+extern PFNGLVERTEXATTRIBI4IPROC gl3wVertexAttribI4i;
+extern PFNGLVERTEXATTRIBI1UIPROC gl3wVertexAttribI1ui;
+extern PFNGLVERTEXATTRIBI2UIPROC gl3wVertexAttribI2ui;
+extern PFNGLVERTEXATTRIBI3UIPROC gl3wVertexAttribI3ui;
+extern PFNGLVERTEXATTRIBI4UIPROC gl3wVertexAttribI4ui;
+extern PFNGLVERTEXATTRIBI1IVPROC gl3wVertexAttribI1iv;
+extern PFNGLVERTEXATTRIBI2IVPROC gl3wVertexAttribI2iv;
+extern PFNGLVERTEXATTRIBI3IVPROC gl3wVertexAttribI3iv;
+extern PFNGLVERTEXATTRIBI4IVPROC gl3wVertexAttribI4iv;
+extern PFNGLVERTEXATTRIBI1UIVPROC gl3wVertexAttribI1uiv;
+extern PFNGLVERTEXATTRIBI2UIVPROC gl3wVertexAttribI2uiv;
+extern PFNGLVERTEXATTRIBI3UIVPROC gl3wVertexAttribI3uiv;
+extern PFNGLVERTEXATTRIBI4UIVPROC gl3wVertexAttribI4uiv;
+extern PFNGLVERTEXATTRIBI4BVPROC gl3wVertexAttribI4bv;
+extern PFNGLVERTEXATTRIBI4SVPROC gl3wVertexAttribI4sv;
+extern PFNGLVERTEXATTRIBI4UBVPROC gl3wVertexAttribI4ubv;
+extern PFNGLVERTEXATTRIBI4USVPROC gl3wVertexAttribI4usv;
+extern PFNGLGETUNIFORMUIVPROC gl3wGetUniformuiv;
+extern PFNGLBINDFRAGDATALOCATIONPROC gl3wBindFragDataLocation;
+extern PFNGLGETFRAGDATALOCATIONPROC gl3wGetFragDataLocation;
+extern PFNGLUNIFORM1UIPROC gl3wUniform1ui;
+extern PFNGLUNIFORM2UIPROC gl3wUniform2ui;
+extern PFNGLUNIFORM3UIPROC gl3wUniform3ui;
+extern PFNGLUNIFORM4UIPROC gl3wUniform4ui;
+extern PFNGLUNIFORM1UIVPROC gl3wUniform1uiv;
+extern PFNGLUNIFORM2UIVPROC gl3wUniform2uiv;
+extern PFNGLUNIFORM3UIVPROC gl3wUniform3uiv;
+extern PFNGLUNIFORM4UIVPROC gl3wUniform4uiv;
+extern PFNGLTEXPARAMETERIIVPROC gl3wTexParameterIiv;
+extern PFNGLTEXPARAMETERIUIVPROC gl3wTexParameterIuiv;
+extern PFNGLGETTEXPARAMETERIIVPROC gl3wGetTexParameterIiv;
+extern PFNGLGETTEXPARAMETERIUIVPROC gl3wGetTexParameterIuiv;
+extern PFNGLCLEARBUFFERIVPROC gl3wClearBufferiv;
+extern PFNGLCLEARBUFFERUIVPROC gl3wClearBufferuiv;
+extern PFNGLCLEARBUFFERFVPROC gl3wClearBufferfv;
+extern PFNGLCLEARBUFFERFIPROC gl3wClearBufferfi;
+extern PFNGLGETSTRINGIPROC gl3wGetStringi;
+extern PFNGLDRAWARRAYSINSTANCEDPROC gl3wDrawArraysInstanced;
+extern PFNGLDRAWELEMENTSINSTANCEDPROC gl3wDrawElementsInstanced;
+extern PFNGLTEXBUFFERPROC gl3wTexBuffer;
+extern PFNGLPRIMITIVERESTARTINDEXPROC gl3wPrimitiveRestartIndex;
+extern PFNGLGETINTEGER64I_VPROC gl3wGetInteger64i_v;
+extern PFNGLGETBUFFERPARAMETERI64VPROC gl3wGetBufferParameteri64v;
+extern PFNGLFRAMEBUFFERTEXTUREPROC gl3wFramebufferTexture;
+extern PFNGLVERTEXATTRIBDIVISORPROC gl3wVertexAttribDivisor;
+extern PFNGLMINSAMPLESHADINGPROC gl3wMinSampleShading;
+extern PFNGLBLENDEQUATIONIPROC gl3wBlendEquationi;
+extern PFNGLBLENDEQUATIONSEPARATEIPROC gl3wBlendEquationSeparatei;
+extern PFNGLBLENDFUNCIPROC gl3wBlendFunci;
+extern PFNGLBLENDFUNCSEPARATEIPROC gl3wBlendFuncSeparatei;
+extern PFNGLISRENDERBUFFERPROC gl3wIsRenderbuffer;
+extern PFNGLBINDRENDERBUFFERPROC gl3wBindRenderbuffer;
+extern PFNGLDELETERENDERBUFFERSPROC gl3wDeleteRenderbuffers;
+extern PFNGLGENRENDERBUFFERSPROC gl3wGenRenderbuffers;
+extern PFNGLRENDERBUFFERSTORAGEPROC gl3wRenderbufferStorage;
+extern PFNGLGETRENDERBUFFERPARAMETERIVPROC gl3wGetRenderbufferParameteriv;
+extern PFNGLISFRAMEBUFFERPROC gl3wIsFramebuffer;
+extern PFNGLBINDFRAMEBUFFERPROC gl3wBindFramebuffer;
+extern PFNGLDELETEFRAMEBUFFERSPROC gl3wDeleteFramebuffers;
+extern PFNGLGENFRAMEBUFFERSPROC gl3wGenFramebuffers;
+extern PFNGLCHECKFRAMEBUFFERSTATUSPROC gl3wCheckFramebufferStatus;
+extern PFNGLFRAMEBUFFERTEXTURE1DPROC gl3wFramebufferTexture1D;
+extern PFNGLFRAMEBUFFERTEXTURE2DPROC gl3wFramebufferTexture2D;
+extern PFNGLFRAMEBUFFERTEXTURE3DPROC gl3wFramebufferTexture3D;
+extern PFNGLFRAMEBUFFERRENDERBUFFERPROC gl3wFramebufferRenderbuffer;
+extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC gl3wGetFramebufferAttachmentParameteriv;
+extern PFNGLGENERATEMIPMAPPROC gl3wGenerateMipmap;
+extern PFNGLBLITFRAMEBUFFERPROC gl3wBlitFramebuffer;
+extern PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC gl3wRenderbufferStorageMultisample;
+extern PFNGLFRAMEBUFFERTEXTURELAYERPROC gl3wFramebufferTextureLayer;
+extern PFNGLMAPBUFFERRANGEPROC gl3wMapBufferRange;
+extern PFNGLFLUSHMAPPEDBUFFERRANGEPROC gl3wFlushMappedBufferRange;
+extern PFNGLBINDVERTEXARRAYPROC gl3wBindVertexArray;
+extern PFNGLDELETEVERTEXARRAYSPROC gl3wDeleteVertexArrays;
+extern PFNGLGENVERTEXARRAYSPROC gl3wGenVertexArrays;
+extern PFNGLISVERTEXARRAYPROC gl3wIsVertexArray;
+extern PFNGLGETUNIFORMINDICESPROC gl3wGetUniformIndices;
+extern PFNGLGETACTIVEUNIFORMSIVPROC gl3wGetActiveUniformsiv;
+extern PFNGLGETACTIVEUNIFORMNAMEPROC gl3wGetActiveUniformName;
+extern PFNGLGETUNIFORMBLOCKINDEXPROC gl3wGetUniformBlockIndex;
+extern PFNGLGETACTIVEUNIFORMBLOCKIVPROC gl3wGetActiveUniformBlockiv;
+extern PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC gl3wGetActiveUniformBlockName;
+extern PFNGLUNIFORMBLOCKBINDINGPROC gl3wUniformBlockBinding;
+extern PFNGLCOPYBUFFERSUBDATAPROC gl3wCopyBufferSubData;
+extern PFNGLDRAWELEMENTSBASEVERTEXPROC gl3wDrawElementsBaseVertex;
+extern PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC gl3wDrawRangeElementsBaseVertex;
+extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC gl3wDrawElementsInstancedBaseVertex;
+extern PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC gl3wMultiDrawElementsBaseVertex;
+extern PFNGLPROVOKINGVERTEXPROC gl3wProvokingVertex;
+extern PFNGLFENCESYNCPROC gl3wFenceSync;
+extern PFNGLISSYNCPROC gl3wIsSync;
+extern PFNGLDELETESYNCPROC gl3wDeleteSync;
+extern PFNGLCLIENTWAITSYNCPROC gl3wClientWaitSync;
+extern PFNGLWAITSYNCPROC gl3wWaitSync;
+extern PFNGLGETINTEGER64VPROC gl3wGetInteger64v;
+extern PFNGLGETSYNCIVPROC gl3wGetSynciv;
+extern PFNGLTEXIMAGE2DMULTISAMPLEPROC gl3wTexImage2DMultisample;
+extern PFNGLTEXIMAGE3DMULTISAMPLEPROC gl3wTexImage3DMultisample;
+extern PFNGLGETMULTISAMPLEFVPROC gl3wGetMultisamplefv;
+extern PFNGLSAMPLEMASKIPROC gl3wSampleMaski;
+extern PFNGLBLENDEQUATIONIARBPROC gl3wBlendEquationiARB;
+extern PFNGLBLENDEQUATIONSEPARATEIARBPROC gl3wBlendEquationSeparateiARB;
+extern PFNGLBLENDFUNCIARBPROC gl3wBlendFunciARB;
+extern PFNGLBLENDFUNCSEPARATEIARBPROC gl3wBlendFuncSeparateiARB;
+extern PFNGLMINSAMPLESHADINGARBPROC gl3wMinSampleShadingARB;
+extern PFNGLNAMEDSTRINGARBPROC gl3wNamedStringARB;
+extern PFNGLDELETENAMEDSTRINGARBPROC gl3wDeleteNamedStringARB;
+extern PFNGLCOMPILESHADERINCLUDEARBPROC gl3wCompileShaderIncludeARB;
+extern PFNGLISNAMEDSTRINGARBPROC gl3wIsNamedStringARB;
+extern PFNGLGETNAMEDSTRINGARBPROC gl3wGetNamedStringARB;
+extern PFNGLGETNAMEDSTRINGIVARBPROC gl3wGetNamedStringivARB;
+extern PFNGLBINDFRAGDATALOCATIONINDEXEDPROC gl3wBindFragDataLocationIndexed;
+extern PFNGLGETFRAGDATAINDEXPROC gl3wGetFragDataIndex;
+extern PFNGLGENSAMPLERSPROC gl3wGenSamplers;
+extern PFNGLDELETESAMPLERSPROC gl3wDeleteSamplers;
+extern PFNGLISSAMPLERPROC gl3wIsSampler;
+extern PFNGLBINDSAMPLERPROC gl3wBindSampler;
+extern PFNGLSAMPLERPARAMETERIPROC gl3wSamplerParameteri;
+extern PFNGLSAMPLERPARAMETERIVPROC gl3wSamplerParameteriv;
+extern PFNGLSAMPLERPARAMETERFPROC gl3wSamplerParameterf;
+extern PFNGLSAMPLERPARAMETERFVPROC gl3wSamplerParameterfv;
+extern PFNGLSAMPLERPARAMETERIIVPROC gl3wSamplerParameterIiv;
+extern PFNGLSAMPLERPARAMETERIUIVPROC gl3wSamplerParameterIuiv;
+extern PFNGLGETSAMPLERPARAMETERIVPROC gl3wGetSamplerParameteriv;
+extern PFNGLGETSAMPLERPARAMETERIIVPROC gl3wGetSamplerParameterIiv;
+extern PFNGLGETSAMPLERPARAMETERFVPROC gl3wGetSamplerParameterfv;
+extern PFNGLGETSAMPLERPARAMETERIUIVPROC gl3wGetSamplerParameterIuiv;
+extern PFNGLQUERYCOUNTERPROC gl3wQueryCounter;
+extern PFNGLGETQUERYOBJECTI64VPROC gl3wGetQueryObjecti64v;
+extern PFNGLGETQUERYOBJECTUI64VPROC gl3wGetQueryObjectui64v;
+extern PFNGLVERTEXP2UIPROC gl3wVertexP2ui;
+extern PFNGLVERTEXP2UIVPROC gl3wVertexP2uiv;
+extern PFNGLVERTEXP3UIPROC gl3wVertexP3ui;
+extern PFNGLVERTEXP3UIVPROC gl3wVertexP3uiv;
+extern PFNGLVERTEXP4UIPROC gl3wVertexP4ui;
+extern PFNGLVERTEXP4UIVPROC gl3wVertexP4uiv;
+extern PFNGLTEXCOORDP1UIPROC gl3wTexCoordP1ui;
+extern PFNGLTEXCOORDP1UIVPROC gl3wTexCoordP1uiv;
+extern PFNGLTEXCOORDP2UIPROC gl3wTexCoordP2ui;
+extern PFNGLTEXCOORDP2UIVPROC gl3wTexCoordP2uiv;
+extern PFNGLTEXCOORDP3UIPROC gl3wTexCoordP3ui;
+extern PFNGLTEXCOORDP3UIVPROC gl3wTexCoordP3uiv;
+extern PFNGLTEXCOORDP4UIPROC gl3wTexCoordP4ui;
+extern PFNGLTEXCOORDP4UIVPROC gl3wTexCoordP4uiv;
+extern PFNGLMULTITEXCOORDP1UIPROC gl3wMultiTexCoordP1ui;
+extern PFNGLMULTITEXCOORDP1UIVPROC gl3wMultiTexCoordP1uiv;
+extern PFNGLMULTITEXCOORDP2UIPROC gl3wMultiTexCoordP2ui;
+extern PFNGLMULTITEXCOORDP2UIVPROC gl3wMultiTexCoordP2uiv;
+extern PFNGLMULTITEXCOORDP3UIPROC gl3wMultiTexCoordP3ui;
+extern PFNGLMULTITEXCOORDP3UIVPROC gl3wMultiTexCoordP3uiv;
+extern PFNGLMULTITEXCOORDP4UIPROC gl3wMultiTexCoordP4ui;
+extern PFNGLMULTITEXCOORDP4UIVPROC gl3wMultiTexCoordP4uiv;
+extern PFNGLNORMALP3UIPROC gl3wNormalP3ui;
+extern PFNGLNORMALP3UIVPROC gl3wNormalP3uiv;
+extern PFNGLCOLORP3UIPROC gl3wColorP3ui;
+extern PFNGLCOLORP3UIVPROC gl3wColorP3uiv;
+extern PFNGLCOLORP4UIPROC gl3wColorP4ui;
+extern PFNGLCOLORP4UIVPROC gl3wColorP4uiv;
+extern PFNGLSECONDARYCOLORP3UIPROC gl3wSecondaryColorP3ui;
+extern PFNGLSECONDARYCOLORP3UIVPROC gl3wSecondaryColorP3uiv;
+extern PFNGLVERTEXATTRIBP1UIPROC gl3wVertexAttribP1ui;
+extern PFNGLVERTEXATTRIBP1UIVPROC gl3wVertexAttribP1uiv;
+extern PFNGLVERTEXATTRIBP2UIPROC gl3wVertexAttribP2ui;
+extern PFNGLVERTEXATTRIBP2UIVPROC gl3wVertexAttribP2uiv;
+extern PFNGLVERTEXATTRIBP3UIPROC gl3wVertexAttribP3ui;
+extern PFNGLVERTEXATTRIBP3UIVPROC gl3wVertexAttribP3uiv;
+extern PFNGLVERTEXATTRIBP4UIPROC gl3wVertexAttribP4ui;
+extern PFNGLVERTEXATTRIBP4UIVPROC gl3wVertexAttribP4uiv;
+extern PFNGLDRAWARRAYSINDIRECTPROC gl3wDrawArraysIndirect;
+extern PFNGLDRAWELEMENTSINDIRECTPROC gl3wDrawElementsIndirect;
+extern PFNGLUNIFORM1DPROC gl3wUniform1d;
+extern PFNGLUNIFORM2DPROC gl3wUniform2d;
+extern PFNGLUNIFORM3DPROC gl3wUniform3d;
+extern PFNGLUNIFORM4DPROC gl3wUniform4d;
+extern PFNGLUNIFORM1DVPROC gl3wUniform1dv;
+extern PFNGLUNIFORM2DVPROC gl3wUniform2dv;
+extern PFNGLUNIFORM3DVPROC gl3wUniform3dv;
+extern PFNGLUNIFORM4DVPROC gl3wUniform4dv;
+extern PFNGLUNIFORMMATRIX2DVPROC gl3wUniformMatrix2dv;
+extern PFNGLUNIFORMMATRIX3DVPROC gl3wUniformMatrix3dv;
+extern PFNGLUNIFORMMATRIX4DVPROC gl3wUniformMatrix4dv;
+extern PFNGLUNIFORMMATRIX2X3DVPROC gl3wUniformMatrix2x3dv;
+extern PFNGLUNIFORMMATRIX2X4DVPROC gl3wUniformMatrix2x4dv;
+extern PFNGLUNIFORMMATRIX3X2DVPROC gl3wUniformMatrix3x2dv;
+extern PFNGLUNIFORMMATRIX3X4DVPROC gl3wUniformMatrix3x4dv;
+extern PFNGLUNIFORMMATRIX4X2DVPROC gl3wUniformMatrix4x2dv;
+extern PFNGLUNIFORMMATRIX4X3DVPROC gl3wUniformMatrix4x3dv;
+extern PFNGLGETUNIFORMDVPROC gl3wGetUniformdv;
+extern PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC gl3wGetSubroutineUniformLocation;
+extern PFNGLGETSUBROUTINEINDEXPROC gl3wGetSubroutineIndex;
+extern PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC gl3wGetActiveSubroutineUniformiv;
+extern PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC gl3wGetActiveSubroutineUniformName;
+extern PFNGLGETACTIVESUBROUTINENAMEPROC gl3wGetActiveSubroutineName;
+extern PFNGLUNIFORMSUBROUTINESUIVPROC gl3wUniformSubroutinesuiv;
+extern PFNGLGETUNIFORMSUBROUTINEUIVPROC gl3wGetUniformSubroutineuiv;
+extern PFNGLGETPROGRAMSTAGEIVPROC gl3wGetProgramStageiv;
+extern PFNGLPATCHPARAMETERIPROC gl3wPatchParameteri;
+extern PFNGLPATCHPARAMETERFVPROC gl3wPatchParameterfv;
+extern PFNGLBINDTRANSFORMFEEDBACKPROC gl3wBindTransformFeedback;
+extern PFNGLDELETETRANSFORMFEEDBACKSPROC gl3wDeleteTransformFeedbacks;
+extern PFNGLGENTRANSFORMFEEDBACKSPROC gl3wGenTransformFeedbacks;
+extern PFNGLISTRANSFORMFEEDBACKPROC gl3wIsTransformFeedback;
+extern PFNGLPAUSETRANSFORMFEEDBACKPROC gl3wPauseTransformFeedback;
+extern PFNGLRESUMETRANSFORMFEEDBACKPROC gl3wResumeTransformFeedback;
+extern PFNGLDRAWTRANSFORMFEEDBACKPROC gl3wDrawTransformFeedback;
+extern PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC gl3wDrawTransformFeedbackStream;
+extern PFNGLBEGINQUERYINDEXEDPROC gl3wBeginQueryIndexed;
+extern PFNGLENDQUERYINDEXEDPROC gl3wEndQueryIndexed;
+extern PFNGLGETQUERYINDEXEDIVPROC gl3wGetQueryIndexediv;
+extern PFNGLRELEASESHADERCOMPILERPROC gl3wReleaseShaderCompiler;
+extern PFNGLSHADERBINARYPROC gl3wShaderBinary;
+extern PFNGLGETSHADERPRECISIONFORMATPROC gl3wGetShaderPrecisionFormat;
+extern PFNGLDEPTHRANGEFPROC gl3wDepthRangef;
+extern PFNGLCLEARDEPTHFPROC gl3wClearDepthf;
+extern PFNGLGETPROGRAMBINARYPROC gl3wGetProgramBinary;
+extern PFNGLPROGRAMBINARYPROC gl3wProgramBinary;
+extern PFNGLPROGRAMPARAMETERIPROC gl3wProgramParameteri;
+extern PFNGLUSEPROGRAMSTAGESPROC gl3wUseProgramStages;
+extern PFNGLACTIVESHADERPROGRAMPROC gl3wActiveShaderProgram;
+extern PFNGLCREATESHADERPROGRAMVPROC gl3wCreateShaderProgramv;
+extern PFNGLBINDPROGRAMPIPELINEPROC gl3wBindProgramPipeline;
+extern PFNGLDELETEPROGRAMPIPELINESPROC gl3wDeleteProgramPipelines;
+extern PFNGLGENPROGRAMPIPELINESPROC gl3wGenProgramPipelines;
+extern PFNGLISPROGRAMPIPELINEPROC gl3wIsProgramPipeline;
+extern PFNGLGETPROGRAMPIPELINEIVPROC gl3wGetProgramPipelineiv;
+extern PFNGLPROGRAMUNIFORM1IPROC gl3wProgramUniform1i;
+extern PFNGLPROGRAMUNIFORM1IVPROC gl3wProgramUniform1iv;
+extern PFNGLPROGRAMUNIFORM1FPROC gl3wProgramUniform1f;
+extern PFNGLPROGRAMUNIFORM1FVPROC gl3wProgramUniform1fv;
+extern PFNGLPROGRAMUNIFORM1DPROC gl3wProgramUniform1d;
+extern PFNGLPROGRAMUNIFORM1DVPROC gl3wProgramUniform1dv;
+extern PFNGLPROGRAMUNIFORM1UIPROC gl3wProgramUniform1ui;
+extern PFNGLPROGRAMUNIFORM1UIVPROC gl3wProgramUniform1uiv;
+extern PFNGLPROGRAMUNIFORM2IPROC gl3wProgramUniform2i;
+extern PFNGLPROGRAMUNIFORM2IVPROC gl3wProgramUniform2iv;
+extern PFNGLPROGRAMUNIFORM2FPROC gl3wProgramUniform2f;
+extern PFNGLPROGRAMUNIFORM2FVPROC gl3wProgramUniform2fv;
+extern PFNGLPROGRAMUNIFORM2DPROC gl3wProgramUniform2d;
+extern PFNGLPROGRAMUNIFORM2DVPROC gl3wProgramUniform2dv;
+extern PFNGLPROGRAMUNIFORM2UIPROC gl3wProgramUniform2ui;
+extern PFNGLPROGRAMUNIFORM2UIVPROC gl3wProgramUniform2uiv;
+extern PFNGLPROGRAMUNIFORM3IPROC gl3wProgramUniform3i;
+extern PFNGLPROGRAMUNIFORM3IVPROC gl3wProgramUniform3iv;
+extern PFNGLPROGRAMUNIFORM3FPROC gl3wProgramUniform3f;
+extern PFNGLPROGRAMUNIFORM3FVPROC gl3wProgramUniform3fv;
+extern PFNGLPROGRAMUNIFORM3DPROC gl3wProgramUniform3d;
+extern PFNGLPROGRAMUNIFORM3DVPROC gl3wProgramUniform3dv;
+extern PFNGLPROGRAMUNIFORM3UIPROC gl3wProgramUniform3ui;
+extern PFNGLPROGRAMUNIFORM3UIVPROC gl3wProgramUniform3uiv;
+extern PFNGLPROGRAMUNIFORM4IPROC gl3wProgramUniform4i;
+extern PFNGLPROGRAMUNIFORM4IVPROC gl3wProgramUniform4iv;
+extern PFNGLPROGRAMUNIFORM4FPROC gl3wProgramUniform4f;
+extern PFNGLPROGRAMUNIFORM4FVPROC gl3wProgramUniform4fv;
+extern PFNGLPROGRAMUNIFORM4DPROC gl3wProgramUniform4d;
+extern PFNGLPROGRAMUNIFORM4DVPROC gl3wProgramUniform4dv;
+extern PFNGLPROGRAMUNIFORM4UIPROC gl3wProgramUniform4ui;
+extern PFNGLPROGRAMUNIFORM4UIVPROC gl3wProgramUniform4uiv;
+extern PFNGLPROGRAMUNIFORMMATRIX2FVPROC gl3wProgramUniformMatrix2fv;
+extern PFNGLPROGRAMUNIFORMMATRIX3FVPROC gl3wProgramUniformMatrix3fv;
+extern PFNGLPROGRAMUNIFORMMATRIX4FVPROC gl3wProgramUniformMatrix4fv;
+extern PFNGLPROGRAMUNIFORMMATRIX2DVPROC gl3wProgramUniformMatrix2dv;
+extern PFNGLPROGRAMUNIFORMMATRIX3DVPROC gl3wProgramUniformMatrix3dv;
+extern PFNGLPROGRAMUNIFORMMATRIX4DVPROC gl3wProgramUniformMatrix4dv;
+extern PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC gl3wProgramUniformMatrix2x3fv;
+extern PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC gl3wProgramUniformMatrix3x2fv;
+extern PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC gl3wProgramUniformMatrix2x4fv;
+extern PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC gl3wProgramUniformMatrix4x2fv;
+extern PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC gl3wProgramUniformMatrix3x4fv;
+extern PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC gl3wProgramUniformMatrix4x3fv;
+extern PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC gl3wProgramUniformMatrix2x3dv;
+extern PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC gl3wProgramUniformMatrix3x2dv;
+extern PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC gl3wProgramUniformMatrix2x4dv;
+extern PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC gl3wProgramUniformMatrix4x2dv;
+extern PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC gl3wProgramUniformMatrix3x4dv;
+extern PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC gl3wProgramUniformMatrix4x3dv;
+extern PFNGLVALIDATEPROGRAMPIPELINEPROC gl3wValidateProgramPipeline;
+extern PFNGLGETPROGRAMPIPELINEINFOLOGPROC gl3wGetProgramPipelineInfoLog;
+extern PFNGLVERTEXATTRIBL1DPROC gl3wVertexAttribL1d;
+extern PFNGLVERTEXATTRIBL2DPROC gl3wVertexAttribL2d;
+extern PFNGLVERTEXATTRIBL3DPROC gl3wVertexAttribL3d;
+extern PFNGLVERTEXATTRIBL4DPROC gl3wVertexAttribL4d;
+extern PFNGLVERTEXATTRIBL1DVPROC gl3wVertexAttribL1dv;
+extern PFNGLVERTEXATTRIBL2DVPROC gl3wVertexAttribL2dv;
+extern PFNGLVERTEXATTRIBL3DVPROC gl3wVertexAttribL3dv;
+extern PFNGLVERTEXATTRIBL4DVPROC gl3wVertexAttribL4dv;
+extern PFNGLVERTEXATTRIBLPOINTERPROC gl3wVertexAttribLPointer;
+extern PFNGLGETVERTEXATTRIBLDVPROC gl3wGetVertexAttribLdv;
+extern PFNGLVIEWPORTARRAYVPROC gl3wViewportArrayv;
+extern PFNGLVIEWPORTINDEXEDFPROC gl3wViewportIndexedf;
+extern PFNGLVIEWPORTINDEXEDFVPROC gl3wViewportIndexedfv;
+extern PFNGLSCISSORARRAYVPROC gl3wScissorArrayv;
+extern PFNGLSCISSORINDEXEDPROC gl3wScissorIndexed;
+extern PFNGLSCISSORINDEXEDVPROC gl3wScissorIndexedv;
+extern PFNGLDEPTHRANGEARRAYVPROC gl3wDepthRangeArrayv;
+extern PFNGLDEPTHRANGEINDEXEDPROC gl3wDepthRangeIndexed;
+extern PFNGLGETFLOATI_VPROC gl3wGetFloati_v;
+extern PFNGLGETDOUBLEI_VPROC gl3wGetDoublei_v;
+extern PFNGLCREATESYNCFROMCLEVENTARBPROC gl3wCreateSyncFromCLeventARB;
+extern PFNGLDEBUGMESSAGECONTROLARBPROC gl3wDebugMessageControlARB;
+extern PFNGLDEBUGMESSAGEINSERTARBPROC gl3wDebugMessageInsertARB;
+extern PFNGLDEBUGMESSAGECALLBACKARBPROC gl3wDebugMessageCallbackARB;
+extern PFNGLGETDEBUGMESSAGELOGARBPROC gl3wGetDebugMessageLogARB;
+extern PFNGLGETGRAPHICSRESETSTATUSARBPROC gl3wGetGraphicsResetStatusARB;
+extern PFNGLGETNTEXIMAGEARBPROC gl3wGetnTexImageARB;
+extern PFNGLREADNPIXELSARBPROC gl3wReadnPixelsARB;
+extern PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC gl3wGetnCompressedTexImageARB;
+extern PFNGLGETNUNIFORMFVARBPROC gl3wGetnUniformfvARB;
+extern PFNGLGETNUNIFORMIVARBPROC gl3wGetnUniformivARB;
+extern PFNGLGETNUNIFORMUIVARBPROC gl3wGetnUniformuivARB;
+extern PFNGLGETNUNIFORMDVARBPROC gl3wGetnUniformdvARB;
+extern PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC gl3wDrawArraysInstancedBaseInstance;
+extern PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC gl3wDrawElementsInstancedBaseInstance;
+extern PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC gl3wDrawElementsInstancedBaseVertexBaseInstance;
+extern PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC gl3wDrawTransformFeedbackInstanced;
+extern PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC gl3wDrawTransformFeedbackStreamInstanced;
+extern PFNGLGETINTERNALFORMATIVPROC gl3wGetInternalformativ;
+extern PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC gl3wGetActiveAtomicCounterBufferiv;
+extern PFNGLBINDIMAGETEXTUREPROC gl3wBindImageTexture;
+extern PFNGLMEMORYBARRIERPROC gl3wMemoryBarrier;
+extern PFNGLTEXSTORAGE1DPROC gl3wTexStorage1D;
+extern PFNGLTEXSTORAGE2DPROC gl3wTexStorage2D;
+extern PFNGLTEXSTORAGE3DPROC gl3wTexStorage3D;
+extern PFNGLTEXTURESTORAGE1DEXTPROC gl3wTextureStorage1DEXT;
+extern PFNGLTEXTURESTORAGE2DEXTPROC gl3wTextureStorage2DEXT;
+extern PFNGLTEXTURESTORAGE3DEXTPROC gl3wTextureStorage3DEXT;
+extern PFNGLDEBUGMESSAGECONTROLPROC gl3wDebugMessageControl;
+extern PFNGLDEBUGMESSAGEINSERTPROC gl3wDebugMessageInsert;
+extern PFNGLDEBUGMESSAGECALLBACKPROC gl3wDebugMessageCallback;
+extern PFNGLGETDEBUGMESSAGELOGPROC gl3wGetDebugMessageLog;
+extern PFNGLPUSHDEBUGGROUPPROC gl3wPushDebugGroup;
+extern PFNGLPOPDEBUGGROUPPROC gl3wPopDebugGroup;
+extern PFNGLOBJECTLABELPROC gl3wObjectLabel;
+extern PFNGLGETOBJECTLABELPROC gl3wGetObjectLabel;
+extern PFNGLOBJECTPTRLABELPROC gl3wObjectPtrLabel;
+extern PFNGLGETOBJECTPTRLABELPROC gl3wGetObjectPtrLabel;
+extern PFNGLCLEARBUFFERDATAPROC gl3wClearBufferData;
+extern PFNGLCLEARBUFFERSUBDATAPROC gl3wClearBufferSubData;
+extern PFNGLCLEARNAMEDBUFFERDATAEXTPROC gl3wClearNamedBufferDataEXT;
+extern PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC gl3wClearNamedBufferSubDataEXT;
+extern PFNGLDISPATCHCOMPUTEPROC gl3wDispatchCompute;
+extern PFNGLDISPATCHCOMPUTEINDIRECTPROC gl3wDispatchComputeIndirect;
+extern PFNGLCOPYIMAGESUBDATAPROC gl3wCopyImageSubData;
+extern PFNGLTEXTUREVIEWPROC gl3wTextureView;
+extern PFNGLBINDVERTEXBUFFERPROC gl3wBindVertexBuffer;
+extern PFNGLVERTEXATTRIBFORMATPROC gl3wVertexAttribFormat;
+extern PFNGLVERTEXATTRIBIFORMATPROC gl3wVertexAttribIFormat;
+extern PFNGLVERTEXATTRIBLFORMATPROC gl3wVertexAttribLFormat;
+extern PFNGLVERTEXATTRIBBINDINGPROC gl3wVertexAttribBinding;
+extern PFNGLVERTEXBINDINGDIVISORPROC gl3wVertexBindingDivisor;
+extern PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC gl3wVertexArrayBindVertexBufferEXT;
+extern PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC gl3wVertexArrayVertexAttribFormatEXT;
+extern PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC gl3wVertexArrayVertexAttribIFormatEXT;
+extern PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC gl3wVertexArrayVertexAttribLFormatEXT;
+extern PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC gl3wVertexArrayVertexAttribBindingEXT;
+extern PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC gl3wVertexArrayVertexBindingDivisorEXT;
+extern PFNGLFRAMEBUFFERPARAMETERIPROC gl3wFramebufferParameteri;
+extern PFNGLGETFRAMEBUFFERPARAMETERIVPROC gl3wGetFramebufferParameteriv;
+extern PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC gl3wNamedFramebufferParameteriEXT;
+extern PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC gl3wGetNamedFramebufferParameterivEXT;
+extern PFNGLGETINTERNALFORMATI64VPROC gl3wGetInternalformati64v;
+extern PFNGLINVALIDATETEXSUBIMAGEPROC gl3wInvalidateTexSubImage;
+extern PFNGLINVALIDATETEXIMAGEPROC gl3wInvalidateTexImage;
+extern PFNGLINVALIDATEBUFFERSUBDATAPROC gl3wInvalidateBufferSubData;
+extern PFNGLINVALIDATEBUFFERDATAPROC gl3wInvalidateBufferData;
+extern PFNGLINVALIDATEFRAMEBUFFERPROC gl3wInvalidateFramebuffer;
+extern PFNGLINVALIDATESUBFRAMEBUFFERPROC gl3wInvalidateSubFramebuffer;
+extern PFNGLMULTIDRAWARRAYSINDIRECTPROC gl3wMultiDrawArraysIndirect;
+extern PFNGLMULTIDRAWELEMENTSINDIRECTPROC gl3wMultiDrawElementsIndirect;
+extern PFNGLGETPROGRAMINTERFACEIVPROC gl3wGetProgramInterfaceiv;
+extern PFNGLGETPROGRAMRESOURCEINDEXPROC gl3wGetProgramResourceIndex;
+extern PFNGLGETPROGRAMRESOURCENAMEPROC gl3wGetProgramResourceName;
+extern PFNGLGETPROGRAMRESOURCEIVPROC gl3wGetProgramResourceiv;
+extern PFNGLGETPROGRAMRESOURCELOCATIONPROC gl3wGetProgramResourceLocation;
+extern PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC gl3wGetProgramResourceLocationIndex;
+extern PFNGLSHADERSTORAGEBLOCKBINDINGPROC gl3wShaderStorageBlockBinding;
+extern PFNGLTEXBUFFERRANGEPROC gl3wTexBufferRange;
+extern PFNGLTEXTUREBUFFERRANGEEXTPROC gl3wTextureBufferRangeEXT;
+extern PFNGLTEXSTORAGE2DMULTISAMPLEPROC gl3wTexStorage2DMultisample;
+extern PFNGLTEXSTORAGE3DMULTISAMPLEPROC gl3wTexStorage3DMultisample;
+extern PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC gl3wTextureStorage2DMultisampleEXT;
+extern PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC gl3wTextureStorage3DMultisampleEXT;
+
+#define glCullFace gl3wCullFace
+#define glFrontFace gl3wFrontFace
+#define glHint gl3wHint
+#define glLineWidth gl3wLineWidth
+#define glPointSize gl3wPointSize
+#define glPolygonMode gl3wPolygonMode
+#define glScissor gl3wScissor
+#define glTexParameterf gl3wTexParameterf
+#define glTexParameterfv gl3wTexParameterfv
+#define glTexParameteri gl3wTexParameteri
+#define glTexParameteriv gl3wTexParameteriv
+#define glTexImage1D gl3wTexImage1D
+#define glTexImage2D gl3wTexImage2D
+#define glDrawBuffer gl3wDrawBuffer
+#define glClear gl3wClear
+#define glClearColor gl3wClearColor
+#define glClearStencil gl3wClearStencil
+#define glClearDepth gl3wClearDepth
+#define glStencilMask gl3wStencilMask
+#define glColorMask gl3wColorMask
+#define glDepthMask gl3wDepthMask
+#define glDisable gl3wDisable
+#define glEnable gl3wEnable
+#define glFinish gl3wFinish
+#define glFlush gl3wFlush
+#define glBlendFunc gl3wBlendFunc
+#define glLogicOp gl3wLogicOp
+#define glStencilFunc gl3wStencilFunc
+#define glStencilOp gl3wStencilOp
+#define glDepthFunc gl3wDepthFunc
+#define glPixelStoref gl3wPixelStoref
+#define glPixelStorei gl3wPixelStorei
+#define glReadBuffer gl3wReadBuffer
+#define glReadPixels gl3wReadPixels
+#define glGetBooleanv gl3wGetBooleanv
+#define glGetDoublev gl3wGetDoublev
+#define glGetError gl3wGetError
+#define glGetFloatv gl3wGetFloatv
+#define glGetIntegerv gl3wGetIntegerv
+#define glGetString gl3wGetString
+#define glGetTexImage gl3wGetTexImage
+#define glGetTexParameterfv gl3wGetTexParameterfv
+#define glGetTexParameteriv gl3wGetTexParameteriv
+#define glGetTexLevelParameterfv gl3wGetTexLevelParameterfv
+#define glGetTexLevelParameteriv gl3wGetTexLevelParameteriv
+#define glIsEnabled gl3wIsEnabled
+#define glDepthRange gl3wDepthRange
+#define glViewport gl3wViewport
+#define glDrawArrays gl3wDrawArrays
+#define glDrawElements gl3wDrawElements
+#define glGetPointerv gl3wGetPointerv
+#define glPolygonOffset gl3wPolygonOffset
+#define glCopyTexImage1D gl3wCopyTexImage1D
+#define glCopyTexImage2D gl3wCopyTexImage2D
+#define glCopyTexSubImage1D gl3wCopyTexSubImage1D
+#define glCopyTexSubImage2D gl3wCopyTexSubImage2D
+#define glTexSubImage1D gl3wTexSubImage1D
+#define glTexSubImage2D gl3wTexSubImage2D
+#define glBindTexture gl3wBindTexture
+#define glDeleteTextures gl3wDeleteTextures
+#define glGenTextures gl3wGenTextures
+#define glIsTexture gl3wIsTexture
+#define glBlendColor gl3wBlendColor
+#define glBlendEquation gl3wBlendEquation
+#define glDrawRangeElements gl3wDrawRangeElements
+#define glTexImage3D gl3wTexImage3D
+#define glTexSubImage3D gl3wTexSubImage3D
+#define glCopyTexSubImage3D gl3wCopyTexSubImage3D
+#define glActiveTexture gl3wActiveTexture
+#define glSampleCoverage gl3wSampleCoverage
+#define glCompressedTexImage3D gl3wCompressedTexImage3D
+#define glCompressedTexImage2D gl3wCompressedTexImage2D
+#define glCompressedTexImage1D gl3wCompressedTexImage1D
+#define glCompressedTexSubImage3D gl3wCompressedTexSubImage3D
+#define glCompressedTexSubImage2D gl3wCompressedTexSubImage2D
+#define glCompressedTexSubImage1D gl3wCompressedTexSubImage1D
+#define glGetCompressedTexImage gl3wGetCompressedTexImage
+#define glBlendFuncSeparate gl3wBlendFuncSeparate
+#define glMultiDrawArrays gl3wMultiDrawArrays
+#define glMultiDrawElements gl3wMultiDrawElements
+#define glPointParameterf gl3wPointParameterf
+#define glPointParameterfv gl3wPointParameterfv
+#define glPointParameteri gl3wPointParameteri
+#define glPointParameteriv gl3wPointParameteriv
+#define glGenQueries gl3wGenQueries
+#define glDeleteQueries gl3wDeleteQueries
+#define glIsQuery gl3wIsQuery
+#define glBeginQuery gl3wBeginQuery
+#define glEndQuery gl3wEndQuery
+#define glGetQueryiv gl3wGetQueryiv
+#define glGetQueryObjectiv gl3wGetQueryObjectiv
+#define glGetQueryObjectuiv gl3wGetQueryObjectuiv
+#define glBindBuffer gl3wBindBuffer
+#define glDeleteBuffers gl3wDeleteBuffers
+#define glGenBuffers gl3wGenBuffers
+#define glIsBuffer gl3wIsBuffer
+#define glBufferData gl3wBufferData
+#define glBufferSubData gl3wBufferSubData
+#define glGetBufferSubData gl3wGetBufferSubData
+#define glMapBuffer gl3wMapBuffer
+#define glUnmapBuffer gl3wUnmapBuffer
+#define glGetBufferParameteriv gl3wGetBufferParameteriv
+#define glGetBufferPointerv gl3wGetBufferPointerv
+#define glBlendEquationSeparate gl3wBlendEquationSeparate
+#define glDrawBuffers gl3wDrawBuffers
+#define glStencilOpSeparate gl3wStencilOpSeparate
+#define glStencilFuncSeparate gl3wStencilFuncSeparate
+#define glStencilMaskSeparate gl3wStencilMaskSeparate
+#define glAttachShader gl3wAttachShader
+#define glBindAttribLocation gl3wBindAttribLocation
+#define glCompileShader gl3wCompileShader
+#define glCreateProgram gl3wCreateProgram
+#define glCreateShader gl3wCreateShader
+#define glDeleteProgram gl3wDeleteProgram
+#define glDeleteShader gl3wDeleteShader
+#define glDetachShader gl3wDetachShader
+#define glDisableVertexAttribArray gl3wDisableVertexAttribArray
+#define glEnableVertexAttribArray gl3wEnableVertexAttribArray
+#define glGetActiveAttrib gl3wGetActiveAttrib
+#define glGetActiveUniform gl3wGetActiveUniform
+#define glGetAttachedShaders gl3wGetAttachedShaders
+#define glGetAttribLocation gl3wGetAttribLocation
+#define glGetProgramiv gl3wGetProgramiv
+#define glGetProgramInfoLog gl3wGetProgramInfoLog
+#define glGetShaderiv gl3wGetShaderiv
+#define glGetShaderInfoLog gl3wGetShaderInfoLog
+#define glGetShaderSource gl3wGetShaderSource
+#define glGetUniformLocation gl3wGetUniformLocation
+#define glGetUniformfv gl3wGetUniformfv
+#define glGetUniformiv gl3wGetUniformiv
+#define glGetVertexAttribdv gl3wGetVertexAttribdv
+#define glGetVertexAttribfv gl3wGetVertexAttribfv
+#define glGetVertexAttribiv gl3wGetVertexAttribiv
+#define glGetVertexAttribPointerv gl3wGetVertexAttribPointerv
+#define glIsProgram gl3wIsProgram
+#define glIsShader gl3wIsShader
+#define glLinkProgram gl3wLinkProgram
+#define glShaderSource gl3wShaderSource
+#define glUseProgram gl3wUseProgram
+#define glUniform1f gl3wUniform1f
+#define glUniform2f gl3wUniform2f
+#define glUniform3f gl3wUniform3f
+#define glUniform4f gl3wUniform4f
+#define glUniform1i gl3wUniform1i
+#define glUniform2i gl3wUniform2i
+#define glUniform3i gl3wUniform3i
+#define glUniform4i gl3wUniform4i
+#define glUniform1fv gl3wUniform1fv
+#define glUniform2fv gl3wUniform2fv
+#define glUniform3fv gl3wUniform3fv
+#define glUniform4fv gl3wUniform4fv
+#define glUniform1iv gl3wUniform1iv
+#define glUniform2iv gl3wUniform2iv
+#define glUniform3iv gl3wUniform3iv
+#define glUniform4iv gl3wUniform4iv
+#define glUniformMatrix2fv gl3wUniformMatrix2fv
+#define glUniformMatrix3fv gl3wUniformMatrix3fv
+#define glUniformMatrix4fv gl3wUniformMatrix4fv
+#define glValidateProgram gl3wValidateProgram
+#define glVertexAttrib1d gl3wVertexAttrib1d
+#define glVertexAttrib1dv gl3wVertexAttrib1dv
+#define glVertexAttrib1f gl3wVertexAttrib1f
+#define glVertexAttrib1fv gl3wVertexAttrib1fv
+#define glVertexAttrib1s gl3wVertexAttrib1s
+#define glVertexAttrib1sv gl3wVertexAttrib1sv
+#define glVertexAttrib2d gl3wVertexAttrib2d
+#define glVertexAttrib2dv gl3wVertexAttrib2dv
+#define glVertexAttrib2f gl3wVertexAttrib2f
+#define glVertexAttrib2fv gl3wVertexAttrib2fv
+#define glVertexAttrib2s gl3wVertexAttrib2s
+#define glVertexAttrib2sv gl3wVertexAttrib2sv
+#define glVertexAttrib3d gl3wVertexAttrib3d
+#define glVertexAttrib3dv gl3wVertexAttrib3dv
+#define glVertexAttrib3f gl3wVertexAttrib3f
+#define glVertexAttrib3fv gl3wVertexAttrib3fv
+#define glVertexAttrib3s gl3wVertexAttrib3s
+#define glVertexAttrib3sv gl3wVertexAttrib3sv
+#define glVertexAttrib4Nbv gl3wVertexAttrib4Nbv
+#define glVertexAttrib4Niv gl3wVertexAttrib4Niv
+#define glVertexAttrib4Nsv gl3wVertexAttrib4Nsv
+#define glVertexAttrib4Nub gl3wVertexAttrib4Nub
+#define glVertexAttrib4Nubv gl3wVertexAttrib4Nubv
+#define glVertexAttrib4Nuiv gl3wVertexAttrib4Nuiv
+#define glVertexAttrib4Nusv gl3wVertexAttrib4Nusv
+#define glVertexAttrib4bv gl3wVertexAttrib4bv
+#define glVertexAttrib4d gl3wVertexAttrib4d
+#define glVertexAttrib4dv gl3wVertexAttrib4dv
+#define glVertexAttrib4f gl3wVertexAttrib4f
+#define glVertexAttrib4fv gl3wVertexAttrib4fv
+#define glVertexAttrib4iv gl3wVertexAttrib4iv
+#define glVertexAttrib4s gl3wVertexAttrib4s
+#define glVertexAttrib4sv gl3wVertexAttrib4sv
+#define glVertexAttrib4ubv gl3wVertexAttrib4ubv
+#define glVertexAttrib4uiv gl3wVertexAttrib4uiv
+#define glVertexAttrib4usv gl3wVertexAttrib4usv
+#define glVertexAttribPointer gl3wVertexAttribPointer
+#define glUniformMatrix2x3fv gl3wUniformMatrix2x3fv
+#define glUniformMatrix3x2fv gl3wUniformMatrix3x2fv
+#define glUniformMatrix2x4fv gl3wUniformMatrix2x4fv
+#define glUniformMatrix4x2fv gl3wUniformMatrix4x2fv
+#define glUniformMatrix3x4fv gl3wUniformMatrix3x4fv
+#define glUniformMatrix4x3fv gl3wUniformMatrix4x3fv
+#define glColorMaski gl3wColorMaski
+#define glGetBooleani_v gl3wGetBooleani_v
+#define glGetIntegeri_v gl3wGetIntegeri_v
+#define glEnablei gl3wEnablei
+#define glDisablei gl3wDisablei
+#define glIsEnabledi gl3wIsEnabledi
+#define glBeginTransformFeedback gl3wBeginTransformFeedback
+#define glEndTransformFeedback gl3wEndTransformFeedback
+#define glBindBufferRange gl3wBindBufferRange
+#define glBindBufferBase gl3wBindBufferBase
+#define glTransformFeedbackVaryings gl3wTransformFeedbackVaryings
+#define glGetTransformFeedbackVarying gl3wGetTransformFeedbackVarying
+#define glClampColor gl3wClampColor
+#define glBeginConditionalRender gl3wBeginConditionalRender
+#define glEndConditionalRender gl3wEndConditionalRender
+#define glVertexAttribIPointer gl3wVertexAttribIPointer
+#define glGetVertexAttribIiv gl3wGetVertexAttribIiv
+#define glGetVertexAttribIuiv gl3wGetVertexAttribIuiv
+#define glVertexAttribI1i gl3wVertexAttribI1i
+#define glVertexAttribI2i gl3wVertexAttribI2i
+#define glVertexAttribI3i gl3wVertexAttribI3i
+#define glVertexAttribI4i gl3wVertexAttribI4i
+#define glVertexAttribI1ui gl3wVertexAttribI1ui
+#define glVertexAttribI2ui gl3wVertexAttribI2ui
+#define glVertexAttribI3ui gl3wVertexAttribI3ui
+#define glVertexAttribI4ui gl3wVertexAttribI4ui
+#define glVertexAttribI1iv gl3wVertexAttribI1iv
+#define glVertexAttribI2iv gl3wVertexAttribI2iv
+#define glVertexAttribI3iv gl3wVertexAttribI3iv
+#define glVertexAttribI4iv gl3wVertexAttribI4iv
+#define glVertexAttribI1uiv gl3wVertexAttribI1uiv
+#define glVertexAttribI2uiv gl3wVertexAttribI2uiv
+#define glVertexAttribI3uiv gl3wVertexAttribI3uiv
+#define glVertexAttribI4uiv gl3wVertexAttribI4uiv
+#define glVertexAttribI4bv gl3wVertexAttribI4bv
+#define glVertexAttribI4sv gl3wVertexAttribI4sv
+#define glVertexAttribI4ubv gl3wVertexAttribI4ubv
+#define glVertexAttribI4usv gl3wVertexAttribI4usv
+#define glGetUniformuiv gl3wGetUniformuiv
+#define glBindFragDataLocation gl3wBindFragDataLocation
+#define glGetFragDataLocation gl3wGetFragDataLocation
+#define glUniform1ui gl3wUniform1ui
+#define glUniform2ui gl3wUniform2ui
+#define glUniform3ui gl3wUniform3ui
+#define glUniform4ui gl3wUniform4ui
+#define glUniform1uiv gl3wUniform1uiv
+#define glUniform2uiv gl3wUniform2uiv
+#define glUniform3uiv gl3wUniform3uiv
+#define glUniform4uiv gl3wUniform4uiv
+#define glTexParameterIiv gl3wTexParameterIiv
+#define glTexParameterIuiv gl3wTexParameterIuiv
+#define glGetTexParameterIiv gl3wGetTexParameterIiv
+#define glGetTexParameterIuiv gl3wGetTexParameterIuiv
+#define glClearBufferiv gl3wClearBufferiv
+#define glClearBufferuiv gl3wClearBufferuiv
+#define glClearBufferfv gl3wClearBufferfv
+#define glClearBufferfi gl3wClearBufferfi
+#define glGetStringi gl3wGetStringi
+#define glDrawArraysInstanced gl3wDrawArraysInstanced
+#define glDrawElementsInstanced gl3wDrawElementsInstanced
+#define glTexBuffer gl3wTexBuffer
+#define glPrimitiveRestartIndex gl3wPrimitiveRestartIndex
+#define glGetInteger64i_v gl3wGetInteger64i_v
+#define glGetBufferParameteri64v gl3wGetBufferParameteri64v
+#define glFramebufferTexture gl3wFramebufferTexture
+#define glVertexAttribDivisor gl3wVertexAttribDivisor
+#define glMinSampleShading gl3wMinSampleShading
+#define glBlendEquationi gl3wBlendEquationi
+#define glBlendEquationSeparatei gl3wBlendEquationSeparatei
+#define glBlendFunci gl3wBlendFunci
+#define glBlendFuncSeparatei gl3wBlendFuncSeparatei
+#define glIsRenderbuffer gl3wIsRenderbuffer
+#define glBindRenderbuffer gl3wBindRenderbuffer
+#define glDeleteRenderbuffers gl3wDeleteRenderbuffers
+#define glGenRenderbuffers gl3wGenRenderbuffers
+#define glRenderbufferStorage gl3wRenderbufferStorage
+#define glGetRenderbufferParameteriv gl3wGetRenderbufferParameteriv
+#define glIsFramebuffer gl3wIsFramebuffer
+#define glBindFramebuffer gl3wBindFramebuffer
+#define glDeleteFramebuffers gl3wDeleteFramebuffers
+#define glGenFramebuffers gl3wGenFramebuffers
+#define glCheckFramebufferStatus gl3wCheckFramebufferStatus
+#define glFramebufferTexture1D gl3wFramebufferTexture1D
+#define glFramebufferTexture2D gl3wFramebufferTexture2D
+#define glFramebufferTexture3D gl3wFramebufferTexture3D
+#define glFramebufferRenderbuffer gl3wFramebufferRenderbuffer
+#define glGetFramebufferAttachmentParameteriv gl3wGetFramebufferAttachmentParameteriv
+#define glGenerateMipmap gl3wGenerateMipmap
+#define glBlitFramebuffer gl3wBlitFramebuffer
+#define glRenderbufferStorageMultisample gl3wRenderbufferStorageMultisample
+#define glFramebufferTextureLayer gl3wFramebufferTextureLayer
+#define glMapBufferRange gl3wMapBufferRange
+#define glFlushMappedBufferRange gl3wFlushMappedBufferRange
+#define glBindVertexArray gl3wBindVertexArray
+#define glDeleteVertexArrays gl3wDeleteVertexArrays
+#define glGenVertexArrays gl3wGenVertexArrays
+#define glIsVertexArray gl3wIsVertexArray
+#define glGetUniformIndices gl3wGetUniformIndices
+#define glGetActiveUniformsiv gl3wGetActiveUniformsiv
+#define glGetActiveUniformName gl3wGetActiveUniformName
+#define glGetUniformBlockIndex gl3wGetUniformBlockIndex
+#define glGetActiveUniformBlockiv gl3wGetActiveUniformBlockiv
+#define glGetActiveUniformBlockName gl3wGetActiveUniformBlockName
+#define glUniformBlockBinding gl3wUniformBlockBinding
+#define glCopyBufferSubData gl3wCopyBufferSubData
+#define glDrawElementsBaseVertex gl3wDrawElementsBaseVertex
+#define glDrawRangeElementsBaseVertex gl3wDrawRangeElementsBaseVertex
+#define glDrawElementsInstancedBaseVertex gl3wDrawElementsInstancedBaseVertex
+#define glMultiDrawElementsBaseVertex gl3wMultiDrawElementsBaseVertex
+#define glProvokingVertex gl3wProvokingVertex
+#define glFenceSync gl3wFenceSync
+#define glIsSync gl3wIsSync
+#define glDeleteSync gl3wDeleteSync
+#define glClientWaitSync gl3wClientWaitSync
+#define glWaitSync gl3wWaitSync
+#define glGetInteger64v gl3wGetInteger64v
+#define glGetSynciv gl3wGetSynciv
+#define glTexImage2DMultisample gl3wTexImage2DMultisample
+#define glTexImage3DMultisample gl3wTexImage3DMultisample
+#define glGetMultisamplefv gl3wGetMultisamplefv
+#define glSampleMaski gl3wSampleMaski
+#define glBlendEquationiARB gl3wBlendEquationiARB
+#define glBlendEquationSeparateiARB gl3wBlendEquationSeparateiARB
+#define glBlendFunciARB gl3wBlendFunciARB
+#define glBlendFuncSeparateiARB gl3wBlendFuncSeparateiARB
+#define glMinSampleShadingARB gl3wMinSampleShadingARB
+#define glNamedStringARB gl3wNamedStringARB
+#define glDeleteNamedStringARB gl3wDeleteNamedStringARB
+#define glCompileShaderIncludeARB gl3wCompileShaderIncludeARB
+#define glIsNamedStringARB gl3wIsNamedStringARB
+#define glGetNamedStringARB gl3wGetNamedStringARB
+#define glGetNamedStringivARB gl3wGetNamedStringivARB
+#define glBindFragDataLocationIndexed gl3wBindFragDataLocationIndexed
+#define glGetFragDataIndex gl3wGetFragDataIndex
+#define glGenSamplers gl3wGenSamplers
+#define glDeleteSamplers gl3wDeleteSamplers
+#define glIsSampler gl3wIsSampler
+#define glBindSampler gl3wBindSampler
+#define glSamplerParameteri gl3wSamplerParameteri
+#define glSamplerParameteriv gl3wSamplerParameteriv
+#define glSamplerParameterf gl3wSamplerParameterf
+#define glSamplerParameterfv gl3wSamplerParameterfv
+#define glSamplerParameterIiv gl3wSamplerParameterIiv
+#define glSamplerParameterIuiv gl3wSamplerParameterIuiv
+#define glGetSamplerParameteriv gl3wGetSamplerParameteriv
+#define glGetSamplerParameterIiv gl3wGetSamplerParameterIiv
+#define glGetSamplerParameterfv gl3wGetSamplerParameterfv
+#define glGetSamplerParameterIuiv gl3wGetSamplerParameterIuiv
+#define glQueryCounter gl3wQueryCounter
+#define glGetQueryObjecti64v gl3wGetQueryObjecti64v
+#define glGetQueryObjectui64v gl3wGetQueryObjectui64v
+#define glVertexP2ui gl3wVertexP2ui
+#define glVertexP2uiv gl3wVertexP2uiv
+#define glVertexP3ui gl3wVertexP3ui
+#define glVertexP3uiv gl3wVertexP3uiv
+#define glVertexP4ui gl3wVertexP4ui
+#define glVertexP4uiv gl3wVertexP4uiv
+#define glTexCoordP1ui gl3wTexCoordP1ui
+#define glTexCoordP1uiv gl3wTexCoordP1uiv
+#define glTexCoordP2ui gl3wTexCoordP2ui
+#define glTexCoordP2uiv gl3wTexCoordP2uiv
+#define glTexCoordP3ui gl3wTexCoordP3ui
+#define glTexCoordP3uiv gl3wTexCoordP3uiv
+#define glTexCoordP4ui gl3wTexCoordP4ui
+#define glTexCoordP4uiv gl3wTexCoordP4uiv
+#define glMultiTexCoordP1ui gl3wMultiTexCoordP1ui
+#define glMultiTexCoordP1uiv gl3wMultiTexCoordP1uiv
+#define glMultiTexCoordP2ui gl3wMultiTexCoordP2ui
+#define glMultiTexCoordP2uiv gl3wMultiTexCoordP2uiv
+#define glMultiTexCoordP3ui gl3wMultiTexCoordP3ui
+#define glMultiTexCoordP3uiv gl3wMultiTexCoordP3uiv
+#define glMultiTexCoordP4ui gl3wMultiTexCoordP4ui
+#define glMultiTexCoordP4uiv gl3wMultiTexCoordP4uiv
+#define glNormalP3ui gl3wNormalP3ui
+#define glNormalP3uiv gl3wNormalP3uiv
+#define glColorP3ui gl3wColorP3ui
+#define glColorP3uiv gl3wColorP3uiv
+#define glColorP4ui gl3wColorP4ui
+#define glColorP4uiv gl3wColorP4uiv
+#define glSecondaryColorP3ui gl3wSecondaryColorP3ui
+#define glSecondaryColorP3uiv gl3wSecondaryColorP3uiv
+#define glVertexAttribP1ui gl3wVertexAttribP1ui
+#define glVertexAttribP1uiv gl3wVertexAttribP1uiv
+#define glVertexAttribP2ui gl3wVertexAttribP2ui
+#define glVertexAttribP2uiv gl3wVertexAttribP2uiv
+#define glVertexAttribP3ui gl3wVertexAttribP3ui
+#define glVertexAttribP3uiv gl3wVertexAttribP3uiv
+#define glVertexAttribP4ui gl3wVertexAttribP4ui
+#define glVertexAttribP4uiv gl3wVertexAttribP4uiv
+#define glDrawArraysIndirect gl3wDrawArraysIndirect
+#define glDrawElementsIndirect gl3wDrawElementsIndirect
+#define glUniform1d gl3wUniform1d
+#define glUniform2d gl3wUniform2d
+#define glUniform3d gl3wUniform3d
+#define glUniform4d gl3wUniform4d
+#define glUniform1dv gl3wUniform1dv
+#define glUniform2dv gl3wUniform2dv
+#define glUniform3dv gl3wUniform3dv
+#define glUniform4dv gl3wUniform4dv
+#define glUniformMatrix2dv gl3wUniformMatrix2dv
+#define glUniformMatrix3dv gl3wUniformMatrix3dv
+#define glUniformMatrix4dv gl3wUniformMatrix4dv
+#define glUniformMatrix2x3dv gl3wUniformMatrix2x3dv
+#define glUniformMatrix2x4dv gl3wUniformMatrix2x4dv
+#define glUniformMatrix3x2dv gl3wUniformMatrix3x2dv
+#define glUniformMatrix3x4dv gl3wUniformMatrix3x4dv
+#define glUniformMatrix4x2dv gl3wUniformMatrix4x2dv
+#define glUniformMatrix4x3dv gl3wUniformMatrix4x3dv
+#define glGetUniformdv gl3wGetUniformdv
+#define glGetSubroutineUniformLocation gl3wGetSubroutineUniformLocation
+#define glGetSubroutineIndex gl3wGetSubroutineIndex
+#define glGetActiveSubroutineUniformiv gl3wGetActiveSubroutineUniformiv
+#define glGetActiveSubroutineUniformName gl3wGetActiveSubroutineUniformName
+#define glGetActiveSubroutineName gl3wGetActiveSubroutineName
+#define glUniformSubroutinesuiv gl3wUniformSubroutinesuiv
+#define glGetUniformSubroutineuiv gl3wGetUniformSubroutineuiv
+#define glGetProgramStageiv gl3wGetProgramStageiv
+#define glPatchParameteri gl3wPatchParameteri
+#define glPatchParameterfv gl3wPatchParameterfv
+#define glBindTransformFeedback gl3wBindTransformFeedback
+#define glDeleteTransformFeedbacks gl3wDeleteTransformFeedbacks
+#define glGenTransformFeedbacks gl3wGenTransformFeedbacks
+#define glIsTransformFeedback gl3wIsTransformFeedback
+#define glPauseTransformFeedback gl3wPauseTransformFeedback
+#define glResumeTransformFeedback gl3wResumeTransformFeedback
+#define glDrawTransformFeedback gl3wDrawTransformFeedback
+#define glDrawTransformFeedbackStream gl3wDrawTransformFeedbackStream
+#define glBeginQueryIndexed gl3wBeginQueryIndexed
+#define glEndQueryIndexed gl3wEndQueryIndexed
+#define glGetQueryIndexediv gl3wGetQueryIndexediv
+#define glReleaseShaderCompiler gl3wReleaseShaderCompiler
+#define glShaderBinary gl3wShaderBinary
+#define glGetShaderPrecisionFormat gl3wGetShaderPrecisionFormat
+#define glDepthRangef gl3wDepthRangef
+#define glClearDepthf gl3wClearDepthf
+#define glGetProgramBinary gl3wGetProgramBinary
+#define glProgramBinary gl3wProgramBinary
+#define glProgramParameteri gl3wProgramParameteri
+#define glUseProgramStages gl3wUseProgramStages
+#define glActiveShaderProgram gl3wActiveShaderProgram
+#define glCreateShaderProgramv gl3wCreateShaderProgramv
+#define glBindProgramPipeline gl3wBindProgramPipeline
+#define glDeleteProgramPipelines gl3wDeleteProgramPipelines
+#define glGenProgramPipelines gl3wGenProgramPipelines
+#define glIsProgramPipeline gl3wIsProgramPipeline
+#define glGetProgramPipelineiv gl3wGetProgramPipelineiv
+#define glProgramUniform1i gl3wProgramUniform1i
+#define glProgramUniform1iv gl3wProgramUniform1iv
+#define glProgramUniform1f gl3wProgramUniform1f
+#define glProgramUniform1fv gl3wProgramUniform1fv
+#define glProgramUniform1d gl3wProgramUniform1d
+#define glProgramUniform1dv gl3wProgramUniform1dv
+#define glProgramUniform1ui gl3wProgramUniform1ui
+#define glProgramUniform1uiv gl3wProgramUniform1uiv
+#define glProgramUniform2i gl3wProgramUniform2i
+#define glProgramUniform2iv gl3wProgramUniform2iv
+#define glProgramUniform2f gl3wProgramUniform2f
+#define glProgramUniform2fv gl3wProgramUniform2fv
+#define glProgramUniform2d gl3wProgramUniform2d
+#define glProgramUniform2dv gl3wProgramUniform2dv
+#define glProgramUniform2ui gl3wProgramUniform2ui
+#define glProgramUniform2uiv gl3wProgramUniform2uiv
+#define glProgramUniform3i gl3wProgramUniform3i
+#define glProgramUniform3iv gl3wProgramUniform3iv
+#define glProgramUniform3f gl3wProgramUniform3f
+#define glProgramUniform3fv gl3wProgramUniform3fv
+#define glProgramUniform3d gl3wProgramUniform3d
+#define glProgramUniform3dv gl3wProgramUniform3dv
+#define glProgramUniform3ui gl3wProgramUniform3ui
+#define glProgramUniform3uiv gl3wProgramUniform3uiv
+#define glProgramUniform4i gl3wProgramUniform4i
+#define glProgramUniform4iv gl3wProgramUniform4iv
+#define glProgramUniform4f gl3wProgramUniform4f
+#define glProgramUniform4fv gl3wProgramUniform4fv
+#define glProgramUniform4d gl3wProgramUniform4d
+#define glProgramUniform4dv gl3wProgramUniform4dv
+#define glProgramUniform4ui gl3wProgramUniform4ui
+#define glProgramUniform4uiv gl3wProgramUniform4uiv
+#define glProgramUniformMatrix2fv gl3wProgramUniformMatrix2fv
+#define glProgramUniformMatrix3fv gl3wProgramUniformMatrix3fv
+#define glProgramUniformMatrix4fv gl3wProgramUniformMatrix4fv
+#define glProgramUniformMatrix2dv gl3wProgramUniformMatrix2dv
+#define glProgramUniformMatrix3dv gl3wProgramUniformMatrix3dv
+#define glProgramUniformMatrix4dv gl3wProgramUniformMatrix4dv
+#define glProgramUniformMatrix2x3fv gl3wProgramUniformMatrix2x3fv
+#define glProgramUniformMatrix3x2fv gl3wProgramUniformMatrix3x2fv
+#define glProgramUniformMatrix2x4fv gl3wProgramUniformMatrix2x4fv
+#define glProgramUniformMatrix4x2fv gl3wProgramUniformMatrix4x2fv
+#define glProgramUniformMatrix3x4fv gl3wProgramUniformMatrix3x4fv
+#define glProgramUniformMatrix4x3fv gl3wProgramUniformMatrix4x3fv
+#define glProgramUniformMatrix2x3dv gl3wProgramUniformMatrix2x3dv
+#define glProgramUniformMatrix3x2dv gl3wProgramUniformMatrix3x2dv
+#define glProgramUniformMatrix2x4dv gl3wProgramUniformMatrix2x4dv
+#define glProgramUniformMatrix4x2dv gl3wProgramUniformMatrix4x2dv
+#define glProgramUniformMatrix3x4dv gl3wProgramUniformMatrix3x4dv
+#define glProgramUniformMatrix4x3dv gl3wProgramUniformMatrix4x3dv
+#define glValidateProgramPipeline gl3wValidateProgramPipeline
+#define glGetProgramPipelineInfoLog gl3wGetProgramPipelineInfoLog
+#define glVertexAttribL1d gl3wVertexAttribL1d
+#define glVertexAttribL2d gl3wVertexAttribL2d
+#define glVertexAttribL3d gl3wVertexAttribL3d
+#define glVertexAttribL4d gl3wVertexAttribL4d
+#define glVertexAttribL1dv gl3wVertexAttribL1dv
+#define glVertexAttribL2dv gl3wVertexAttribL2dv
+#define glVertexAttribL3dv gl3wVertexAttribL3dv
+#define glVertexAttribL4dv gl3wVertexAttribL4dv
+#define glVertexAttribLPointer gl3wVertexAttribLPointer
+#define glGetVertexAttribLdv gl3wGetVertexAttribLdv
+#define glViewportArrayv gl3wViewportArrayv
+#define glViewportIndexedf gl3wViewportIndexedf
+#define glViewportIndexedfv gl3wViewportIndexedfv
+#define glScissorArrayv gl3wScissorArrayv
+#define glScissorIndexed gl3wScissorIndexed
+#define glScissorIndexedv gl3wScissorIndexedv
+#define glDepthRangeArrayv gl3wDepthRangeArrayv
+#define glDepthRangeIndexed gl3wDepthRangeIndexed
+#define glGetFloati_v gl3wGetFloati_v
+#define glGetDoublei_v gl3wGetDoublei_v
+#define glCreateSyncFromCLeventARB gl3wCreateSyncFromCLeventARB
+#define glDebugMessageControlARB gl3wDebugMessageControlARB
+#define glDebugMessageInsertARB gl3wDebugMessageInsertARB
+#define glDebugMessageCallbackARB gl3wDebugMessageCallbackARB
+#define glGetDebugMessageLogARB gl3wGetDebugMessageLogARB
+#define glGetGraphicsResetStatusARB gl3wGetGraphicsResetStatusARB
+#define glGetnTexImageARB gl3wGetnTexImageARB
+#define glReadnPixelsARB gl3wReadnPixelsARB
+#define glGetnCompressedTexImageARB gl3wGetnCompressedTexImageARB
+#define glGetnUniformfvARB gl3wGetnUniformfvARB
+#define glGetnUniformivARB gl3wGetnUniformivARB
+#define glGetnUniformuivARB gl3wGetnUniformuivARB
+#define glGetnUniformdvARB gl3wGetnUniformdvARB
+#define glDrawArraysInstancedBaseInstance gl3wDrawArraysInstancedBaseInstance
+#define glDrawElementsInstancedBaseInstance gl3wDrawElementsInstancedBaseInstance
+#define glDrawElementsInstancedBaseVertexBaseInstance gl3wDrawElementsInstancedBaseVertexBaseInstance
+#define glDrawTransformFeedbackInstanced gl3wDrawTransformFeedbackInstanced
+#define glDrawTransformFeedbackStreamInstanced gl3wDrawTransformFeedbackStreamInstanced
+#define glGetInternalformativ gl3wGetInternalformativ
+#define glGetActiveAtomicCounterBufferiv gl3wGetActiveAtomicCounterBufferiv
+#define glBindImageTexture gl3wBindImageTexture
+#define glMemoryBarrier gl3wMemoryBarrier
+#define glTexStorage1D gl3wTexStorage1D
+#define glTexStorage2D gl3wTexStorage2D
+#define glTexStorage3D gl3wTexStorage3D
+#define glTextureStorage1DEXT gl3wTextureStorage1DEXT
+#define glTextureStorage2DEXT gl3wTextureStorage2DEXT
+#define glTextureStorage3DEXT gl3wTextureStorage3DEXT
+#define glDebugMessageControl gl3wDebugMessageControl
+#define glDebugMessageInsert gl3wDebugMessageInsert
+#define glDebugMessageCallback gl3wDebugMessageCallback
+#define glGetDebugMessageLog gl3wGetDebugMessageLog
+#define glPushDebugGroup gl3wPushDebugGroup
+#define glPopDebugGroup gl3wPopDebugGroup
+#define glObjectLabel gl3wObjectLabel
+#define glGetObjectLabel gl3wGetObjectLabel
+#define glObjectPtrLabel gl3wObjectPtrLabel
+#define glGetObjectPtrLabel gl3wGetObjectPtrLabel
+#define glClearBufferData gl3wClearBufferData
+#define glClearBufferSubData gl3wClearBufferSubData
+#define glClearNamedBufferDataEXT gl3wClearNamedBufferDataEXT
+#define glClearNamedBufferSubDataEXT gl3wClearNamedBufferSubDataEXT
+#define glDispatchCompute gl3wDispatchCompute
+#define glDispatchComputeIndirect gl3wDispatchComputeIndirect
+#define glCopyImageSubData gl3wCopyImageSubData
+#define glTextureView gl3wTextureView
+#define glBindVertexBuffer gl3wBindVertexBuffer
+#define glVertexAttribFormat gl3wVertexAttribFormat
+#define glVertexAttribIFormat gl3wVertexAttribIFormat
+#define glVertexAttribLFormat gl3wVertexAttribLFormat
+#define glVertexAttribBinding gl3wVertexAttribBinding
+#define glVertexBindingDivisor gl3wVertexBindingDivisor
+#define glVertexArrayBindVertexBufferEXT gl3wVertexArrayBindVertexBufferEXT
+#define glVertexArrayVertexAttribFormatEXT gl3wVertexArrayVertexAttribFormatEXT
+#define glVertexArrayVertexAttribIFormatEXT gl3wVertexArrayVertexAttribIFormatEXT
+#define glVertexArrayVertexAttribLFormatEXT gl3wVertexArrayVertexAttribLFormatEXT
+#define glVertexArrayVertexAttribBindingEXT gl3wVertexArrayVertexAttribBindingEXT
+#define glVertexArrayVertexBindingDivisorEXT gl3wVertexArrayVertexBindingDivisorEXT
+#define glFramebufferParameteri gl3wFramebufferParameteri
+#define glGetFramebufferParameteriv gl3wGetFramebufferParameteriv
+#define glNamedFramebufferParameteriEXT gl3wNamedFramebufferParameteriEXT
+#define glGetNamedFramebufferParameterivEXT gl3wGetNamedFramebufferParameterivEXT
+#define glGetInternalformati64v gl3wGetInternalformati64v
+#define glInvalidateTexSubImage gl3wInvalidateTexSubImage
+#define glInvalidateTexImage gl3wInvalidateTexImage
+#define glInvalidateBufferSubData gl3wInvalidateBufferSubData
+#define glInvalidateBufferData gl3wInvalidateBufferData
+#define glInvalidateFramebuffer gl3wInvalidateFramebuffer
+#define glInvalidateSubFramebuffer gl3wInvalidateSubFramebuffer
+#define glMultiDrawArraysIndirect gl3wMultiDrawArraysIndirect
+#define glMultiDrawElementsIndirect gl3wMultiDrawElementsIndirect
+#define glGetProgramInterfaceiv gl3wGetProgramInterfaceiv
+#define glGetProgramResourceIndex gl3wGetProgramResourceIndex
+#define glGetProgramResourceName gl3wGetProgramResourceName
+#define glGetProgramResourceiv gl3wGetProgramResourceiv
+#define glGetProgramResourceLocation gl3wGetProgramResourceLocation
+#define glGetProgramResourceLocationIndex gl3wGetProgramResourceLocationIndex
+#define glShaderStorageBlockBinding gl3wShaderStorageBlockBinding
+#define glTexBufferRange gl3wTexBufferRange
+#define glTextureBufferRangeEXT gl3wTextureBufferRangeEXT
+#define glTexStorage2DMultisample gl3wTexStorage2DMultisample
+#define glTexStorage3DMultisample gl3wTexStorage3DMultisample
+#define glTextureStorage2DMultisampleEXT gl3wTextureStorage2DMultisampleEXT
+#define glTextureStorage3DMultisampleEXT gl3wTextureStorage3DMultisampleEXT
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/3rdparty/imgui/examples/libs/gl3w/GL/glcorearb.h b/3rdparty/imgui/examples/libs/gl3w/GL/glcorearb.h
new file mode 100644
index 00000000..07cb03e1
--- /dev/null
+++ b/3rdparty/imgui/examples/libs/gl3w/GL/glcorearb.h
@@ -0,0 +1,4533 @@
+#ifndef __glcorearb_h_
+#define __glcorearb_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+** Copyright (c) 2007-2012 The Khronos Group Inc.
+**
+** Permission is hereby granted, free of charge, to any person obtaining a
+** copy of this software and/or associated documentation files (the
+** "Materials"), to deal in the Materials without restriction, including
+** without limitation the rights to use, copy, modify, merge, publish,
+** distribute, sublicense, and/or sell copies of the Materials, and to
+** permit persons to whom the Materials are furnished to do so, subject to
+** the following conditions:
+**
+** The above copyright notice and this permission notice shall be included
+** in all copies or substantial portions of the Materials.
+**
+** THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+** EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+** MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+** IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+** CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+** TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+** MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
+*/
+
+/* glcorearb.h replaces gl3.h. It is for use with OpenGL core
+ * profile implementations.
+ *
+ * glcorearb.h last updated on $Date: 2012-09-19 19:02:24 -0700 (Wed, 19 Sep 2012) $
+ *
+ * RELEASE NOTES - 2012/09/19
+ *
+ * glcorearb.h should be placed in the same directory as gl.h and
+ * included as
+ * ''.
+ *
+ * glcorearb.h includes only APIs in the latest OpenGL core profile
+ * implementation together with APIs in newer ARB extensions which can be
+ * can be supported by the core profile. It does not, and never will
+ * include functionality removed from the core profile, such as
+ * fixed-function vertex and fragment processing.
+ *
+ * It is not possible to #include both and either of
+ * or in the same source file.
+ *
+ * Feedback can be given by registering for the Khronos Bugzilla
+ * (www.khronos.org/bugzilla) and filing issues there under product
+ * "OpenGL", category "Registry".
+ */
+
+/* Function declaration macros - to move into glplatform.h */
+
+#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
+#define WIN32_LEAN_AND_MEAN 1
+#include
+#endif
+
+#ifndef APIENTRY
+#define APIENTRY
+#endif
+#ifndef APIENTRYP
+#define APIENTRYP APIENTRY *
+#endif
+#ifndef GLAPI
+#define GLAPI extern
+#endif
+
+/* Base GL types */
+
+typedef unsigned int GLenum;
+typedef unsigned char GLboolean;
+typedef unsigned int GLbitfield;
+typedef signed char GLbyte;
+typedef short GLshort;
+typedef int GLint;
+typedef int GLsizei;
+typedef unsigned char GLubyte;
+typedef unsigned short GLushort;
+typedef unsigned int GLuint;
+typedef unsigned short GLhalf;
+typedef float GLfloat;
+typedef float GLclampf;
+typedef double GLdouble;
+typedef double GLclampd;
+typedef void GLvoid;
+
+/*************************************************************/
+
+#ifndef GL_VERSION_1_1
+/* AttribMask */
+#define GL_DEPTH_BUFFER_BIT 0x00000100
+#define GL_STENCIL_BUFFER_BIT 0x00000400
+#define GL_COLOR_BUFFER_BIT 0x00004000
+/* Boolean */
+#define GL_FALSE 0
+#define GL_TRUE 1
+/* BeginMode */
+#define GL_POINTS 0x0000
+#define GL_LINES 0x0001
+#define GL_LINE_LOOP 0x0002
+#define GL_LINE_STRIP 0x0003
+#define GL_TRIANGLES 0x0004
+#define GL_TRIANGLE_STRIP 0x0005
+#define GL_TRIANGLE_FAN 0x0006
+#define GL_QUADS 0x0007
+/* AlphaFunction */
+#define GL_NEVER 0x0200
+#define GL_LESS 0x0201
+#define GL_EQUAL 0x0202
+#define GL_LEQUAL 0x0203
+#define GL_GREATER 0x0204
+#define GL_NOTEQUAL 0x0205
+#define GL_GEQUAL 0x0206
+#define GL_ALWAYS 0x0207
+/* BlendingFactorDest */
+#define GL_ZERO 0
+#define GL_ONE 1
+#define GL_SRC_COLOR 0x0300
+#define GL_ONE_MINUS_SRC_COLOR 0x0301
+#define GL_SRC_ALPHA 0x0302
+#define GL_ONE_MINUS_SRC_ALPHA 0x0303
+#define GL_DST_ALPHA 0x0304
+#define GL_ONE_MINUS_DST_ALPHA 0x0305
+/* BlendingFactorSrc */
+#define GL_DST_COLOR 0x0306
+#define GL_ONE_MINUS_DST_COLOR 0x0307
+#define GL_SRC_ALPHA_SATURATE 0x0308
+/* DrawBufferMode */
+#define GL_NONE 0
+#define GL_FRONT_LEFT 0x0400
+#define GL_FRONT_RIGHT 0x0401
+#define GL_BACK_LEFT 0x0402
+#define GL_BACK_RIGHT 0x0403
+#define GL_FRONT 0x0404
+#define GL_BACK 0x0405
+#define GL_LEFT 0x0406
+#define GL_RIGHT 0x0407
+#define GL_FRONT_AND_BACK 0x0408
+/* ErrorCode */
+#define GL_NO_ERROR 0
+#define GL_INVALID_ENUM 0x0500
+#define GL_INVALID_VALUE 0x0501
+#define GL_INVALID_OPERATION 0x0502
+#define GL_OUT_OF_MEMORY 0x0505
+/* FrontFaceDirection */
+#define GL_CW 0x0900
+#define GL_CCW 0x0901
+/* GetPName */
+#define GL_POINT_SIZE 0x0B11
+#define GL_POINT_SIZE_RANGE 0x0B12
+#define GL_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_LINE_SMOOTH 0x0B20
+#define GL_LINE_WIDTH 0x0B21
+#define GL_LINE_WIDTH_RANGE 0x0B22
+#define GL_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_POLYGON_MODE 0x0B40
+#define GL_POLYGON_SMOOTH 0x0B41
+#define GL_CULL_FACE 0x0B44
+#define GL_CULL_FACE_MODE 0x0B45
+#define GL_FRONT_FACE 0x0B46
+#define GL_DEPTH_RANGE 0x0B70
+#define GL_DEPTH_TEST 0x0B71
+#define GL_DEPTH_WRITEMASK 0x0B72
+#define GL_DEPTH_CLEAR_VALUE 0x0B73
+#define GL_DEPTH_FUNC 0x0B74
+#define GL_STENCIL_TEST 0x0B90
+#define GL_STENCIL_CLEAR_VALUE 0x0B91
+#define GL_STENCIL_FUNC 0x0B92
+#define GL_STENCIL_VALUE_MASK 0x0B93
+#define GL_STENCIL_FAIL 0x0B94
+#define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95
+#define GL_STENCIL_PASS_DEPTH_PASS 0x0B96
+#define GL_STENCIL_REF 0x0B97
+#define GL_STENCIL_WRITEMASK 0x0B98
+#define GL_VIEWPORT 0x0BA2
+#define GL_DITHER 0x0BD0
+#define GL_BLEND_DST 0x0BE0
+#define GL_BLEND_SRC 0x0BE1
+#define GL_BLEND 0x0BE2
+#define GL_LOGIC_OP_MODE 0x0BF0
+#define GL_COLOR_LOGIC_OP 0x0BF2
+#define GL_DRAW_BUFFER 0x0C01
+#define GL_READ_BUFFER 0x0C02
+#define GL_SCISSOR_BOX 0x0C10
+#define GL_SCISSOR_TEST 0x0C11
+#define GL_COLOR_CLEAR_VALUE 0x0C22
+#define GL_COLOR_WRITEMASK 0x0C23
+#define GL_DOUBLEBUFFER 0x0C32
+#define GL_STEREO 0x0C33
+#define GL_LINE_SMOOTH_HINT 0x0C52
+#define GL_POLYGON_SMOOTH_HINT 0x0C53
+#define GL_UNPACK_SWAP_BYTES 0x0CF0
+#define GL_UNPACK_LSB_FIRST 0x0CF1
+#define GL_UNPACK_ROW_LENGTH 0x0CF2
+#define GL_UNPACK_SKIP_ROWS 0x0CF3
+#define GL_UNPACK_SKIP_PIXELS 0x0CF4
+#define GL_UNPACK_ALIGNMENT 0x0CF5
+#define GL_PACK_SWAP_BYTES 0x0D00
+#define GL_PACK_LSB_FIRST 0x0D01
+#define GL_PACK_ROW_LENGTH 0x0D02
+#define GL_PACK_SKIP_ROWS 0x0D03
+#define GL_PACK_SKIP_PIXELS 0x0D04
+#define GL_PACK_ALIGNMENT 0x0D05
+#define GL_MAX_TEXTURE_SIZE 0x0D33
+#define GL_MAX_VIEWPORT_DIMS 0x0D3A
+#define GL_SUBPIXEL_BITS 0x0D50
+#define GL_TEXTURE_1D 0x0DE0
+#define GL_TEXTURE_2D 0x0DE1
+#define GL_POLYGON_OFFSET_UNITS 0x2A00
+#define GL_POLYGON_OFFSET_POINT 0x2A01
+#define GL_POLYGON_OFFSET_LINE 0x2A02
+#define GL_POLYGON_OFFSET_FILL 0x8037
+#define GL_POLYGON_OFFSET_FACTOR 0x8038
+#define GL_TEXTURE_BINDING_1D 0x8068
+#define GL_TEXTURE_BINDING_2D 0x8069
+/* GetTextureParameter */
+#define GL_TEXTURE_WIDTH 0x1000
+#define GL_TEXTURE_HEIGHT 0x1001
+#define GL_TEXTURE_INTERNAL_FORMAT 0x1003
+#define GL_TEXTURE_BORDER_COLOR 0x1004
+#define GL_TEXTURE_RED_SIZE 0x805C
+#define GL_TEXTURE_GREEN_SIZE 0x805D
+#define GL_TEXTURE_BLUE_SIZE 0x805E
+#define GL_TEXTURE_ALPHA_SIZE 0x805F
+/* HintMode */
+#define GL_DONT_CARE 0x1100
+#define GL_FASTEST 0x1101
+#define GL_NICEST 0x1102
+/* DataType */
+#define GL_BYTE 0x1400
+#define GL_UNSIGNED_BYTE 0x1401
+#define GL_SHORT 0x1402
+#define GL_UNSIGNED_SHORT 0x1403
+#define GL_INT 0x1404
+#define GL_UNSIGNED_INT 0x1405
+#define GL_FLOAT 0x1406
+#define GL_DOUBLE 0x140A
+/* ErrorCode */
+#define GL_STACK_OVERFLOW 0x0503
+#define GL_STACK_UNDERFLOW 0x0504
+/* LogicOp */
+#define GL_CLEAR 0x1500
+#define GL_AND 0x1501
+#define GL_AND_REVERSE 0x1502
+#define GL_COPY 0x1503
+#define GL_AND_INVERTED 0x1504
+#define GL_NOOP 0x1505
+#define GL_XOR 0x1506
+#define GL_OR 0x1507
+#define GL_NOR 0x1508
+#define GL_EQUIV 0x1509
+#define GL_INVERT 0x150A
+#define GL_OR_REVERSE 0x150B
+#define GL_COPY_INVERTED 0x150C
+#define GL_OR_INVERTED 0x150D
+#define GL_NAND 0x150E
+#define GL_SET 0x150F
+/* MatrixMode (for gl3.h, FBO attachment type) */
+#define GL_TEXTURE 0x1702
+/* PixelCopyType */
+#define GL_COLOR 0x1800
+#define GL_DEPTH 0x1801
+#define GL_STENCIL 0x1802
+/* PixelFormat */
+#define GL_STENCIL_INDEX 0x1901
+#define GL_DEPTH_COMPONENT 0x1902
+#define GL_RED 0x1903
+#define GL_GREEN 0x1904
+#define GL_BLUE 0x1905
+#define GL_ALPHA 0x1906
+#define GL_RGB 0x1907
+#define GL_RGBA 0x1908
+/* PolygonMode */
+#define GL_POINT 0x1B00
+#define GL_LINE 0x1B01
+#define GL_FILL 0x1B02
+/* StencilOp */
+#define GL_KEEP 0x1E00
+#define GL_REPLACE 0x1E01
+#define GL_INCR 0x1E02
+#define GL_DECR 0x1E03
+/* StringName */
+#define GL_VENDOR 0x1F00
+#define GL_RENDERER 0x1F01
+#define GL_VERSION 0x1F02
+#define GL_EXTENSIONS 0x1F03
+/* TextureMagFilter */
+#define GL_NEAREST 0x2600
+#define GL_LINEAR 0x2601
+/* TextureMinFilter */
+#define GL_NEAREST_MIPMAP_NEAREST 0x2700
+#define GL_LINEAR_MIPMAP_NEAREST 0x2701
+#define GL_NEAREST_MIPMAP_LINEAR 0x2702
+#define GL_LINEAR_MIPMAP_LINEAR 0x2703
+/* TextureParameterName */
+#define GL_TEXTURE_MAG_FILTER 0x2800
+#define GL_TEXTURE_MIN_FILTER 0x2801
+#define GL_TEXTURE_WRAP_S 0x2802
+#define GL_TEXTURE_WRAP_T 0x2803
+/* TextureTarget */
+#define GL_PROXY_TEXTURE_1D 0x8063
+#define GL_PROXY_TEXTURE_2D 0x8064
+/* TextureWrapMode */
+#define GL_REPEAT 0x2901
+/* PixelInternalFormat */
+#define GL_R3_G3_B2 0x2A10
+#define GL_RGB4 0x804F
+#define GL_RGB5 0x8050
+#define GL_RGB8 0x8051
+#define GL_RGB10 0x8052
+#define GL_RGB12 0x8053
+#define GL_RGB16 0x8054
+#define GL_RGBA2 0x8055
+#define GL_RGBA4 0x8056
+#define GL_RGB5_A1 0x8057
+#define GL_RGBA8 0x8058
+#define GL_RGB10_A2 0x8059
+#define GL_RGBA12 0x805A
+#define GL_RGBA16 0x805B
+#endif
+
+#ifndef GL_VERSION_1_2
+#define GL_UNSIGNED_BYTE_3_3_2 0x8032
+#define GL_UNSIGNED_SHORT_4_4_4_4 0x8033
+#define GL_UNSIGNED_SHORT_5_5_5_1 0x8034
+#define GL_UNSIGNED_INT_8_8_8_8 0x8035
+#define GL_UNSIGNED_INT_10_10_10_2 0x8036
+#define GL_TEXTURE_BINDING_3D 0x806A
+#define GL_PACK_SKIP_IMAGES 0x806B
+#define GL_PACK_IMAGE_HEIGHT 0x806C
+#define GL_UNPACK_SKIP_IMAGES 0x806D
+#define GL_UNPACK_IMAGE_HEIGHT 0x806E
+#define GL_TEXTURE_3D 0x806F
+#define GL_PROXY_TEXTURE_3D 0x8070
+#define GL_TEXTURE_DEPTH 0x8071
+#define GL_TEXTURE_WRAP_R 0x8072
+#define GL_MAX_3D_TEXTURE_SIZE 0x8073
+#define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362
+#define GL_UNSIGNED_SHORT_5_6_5 0x8363
+#define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364
+#define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365
+#define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366
+#define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367
+#define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368
+#define GL_BGR 0x80E0
+#define GL_BGRA 0x80E1
+#define GL_MAX_ELEMENTS_VERTICES 0x80E8
+#define GL_MAX_ELEMENTS_INDICES 0x80E9
+#define GL_CLAMP_TO_EDGE 0x812F
+#define GL_TEXTURE_MIN_LOD 0x813A
+#define GL_TEXTURE_MAX_LOD 0x813B
+#define GL_TEXTURE_BASE_LEVEL 0x813C
+#define GL_TEXTURE_MAX_LEVEL 0x813D
+#define GL_SMOOTH_POINT_SIZE_RANGE 0x0B12
+#define GL_SMOOTH_POINT_SIZE_GRANULARITY 0x0B13
+#define GL_SMOOTH_LINE_WIDTH_RANGE 0x0B22
+#define GL_SMOOTH_LINE_WIDTH_GRANULARITY 0x0B23
+#define GL_ALIASED_LINE_WIDTH_RANGE 0x846E
+#endif
+
+#ifndef GL_ARB_imaging
+#define GL_CONSTANT_COLOR 0x8001
+#define GL_ONE_MINUS_CONSTANT_COLOR 0x8002
+#define GL_CONSTANT_ALPHA 0x8003
+#define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004
+#define GL_BLEND_COLOR 0x8005
+#define GL_FUNC_ADD 0x8006
+#define GL_MIN 0x8007
+#define GL_MAX 0x8008
+#define GL_BLEND_EQUATION 0x8009
+#define GL_FUNC_SUBTRACT 0x800A
+#define GL_FUNC_REVERSE_SUBTRACT 0x800B
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_TEXTURE0 0x84C0
+#define GL_TEXTURE1 0x84C1
+#define GL_TEXTURE2 0x84C2
+#define GL_TEXTURE3 0x84C3
+#define GL_TEXTURE4 0x84C4
+#define GL_TEXTURE5 0x84C5
+#define GL_TEXTURE6 0x84C6
+#define GL_TEXTURE7 0x84C7
+#define GL_TEXTURE8 0x84C8
+#define GL_TEXTURE9 0x84C9
+#define GL_TEXTURE10 0x84CA
+#define GL_TEXTURE11 0x84CB
+#define GL_TEXTURE12 0x84CC
+#define GL_TEXTURE13 0x84CD
+#define GL_TEXTURE14 0x84CE
+#define GL_TEXTURE15 0x84CF
+#define GL_TEXTURE16 0x84D0
+#define GL_TEXTURE17 0x84D1
+#define GL_TEXTURE18 0x84D2
+#define GL_TEXTURE19 0x84D3
+#define GL_TEXTURE20 0x84D4
+#define GL_TEXTURE21 0x84D5
+#define GL_TEXTURE22 0x84D6
+#define GL_TEXTURE23 0x84D7
+#define GL_TEXTURE24 0x84D8
+#define GL_TEXTURE25 0x84D9
+#define GL_TEXTURE26 0x84DA
+#define GL_TEXTURE27 0x84DB
+#define GL_TEXTURE28 0x84DC
+#define GL_TEXTURE29 0x84DD
+#define GL_TEXTURE30 0x84DE
+#define GL_TEXTURE31 0x84DF
+#define GL_ACTIVE_TEXTURE 0x84E0
+#define GL_MULTISAMPLE 0x809D
+#define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
+#define GL_SAMPLE_ALPHA_TO_ONE 0x809F
+#define GL_SAMPLE_COVERAGE 0x80A0
+#define GL_SAMPLE_BUFFERS 0x80A8
+#define GL_SAMPLES 0x80A9
+#define GL_SAMPLE_COVERAGE_VALUE 0x80AA
+#define GL_SAMPLE_COVERAGE_INVERT 0x80AB
+#define GL_TEXTURE_CUBE_MAP 0x8513
+#define GL_TEXTURE_BINDING_CUBE_MAP 0x8514
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518
+#define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519
+#define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A
+#define GL_PROXY_TEXTURE_CUBE_MAP 0x851B
+#define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C
+#define GL_COMPRESSED_RGB 0x84ED
+#define GL_COMPRESSED_RGBA 0x84EE
+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#define GL_TEXTURE_COMPRESSED_IMAGE_SIZE 0x86A0
+#define GL_TEXTURE_COMPRESSED 0x86A1
+#define GL_NUM_COMPRESSED_TEXTURE_FORMATS 0x86A2
+#define GL_COMPRESSED_TEXTURE_FORMATS 0x86A3
+#define GL_CLAMP_TO_BORDER 0x812D
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_BLEND_DST_RGB 0x80C8
+#define GL_BLEND_SRC_RGB 0x80C9
+#define GL_BLEND_DST_ALPHA 0x80CA
+#define GL_BLEND_SRC_ALPHA 0x80CB
+#define GL_POINT_FADE_THRESHOLD_SIZE 0x8128
+#define GL_DEPTH_COMPONENT16 0x81A5
+#define GL_DEPTH_COMPONENT24 0x81A6
+#define GL_DEPTH_COMPONENT32 0x81A7
+#define GL_MIRRORED_REPEAT 0x8370
+#define GL_MAX_TEXTURE_LOD_BIAS 0x84FD
+#define GL_TEXTURE_LOD_BIAS 0x8501
+#define GL_INCR_WRAP 0x8507
+#define GL_DECR_WRAP 0x8508
+#define GL_TEXTURE_DEPTH_SIZE 0x884A
+#define GL_TEXTURE_COMPARE_MODE 0x884C
+#define GL_TEXTURE_COMPARE_FUNC 0x884D
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_BUFFER_SIZE 0x8764
+#define GL_BUFFER_USAGE 0x8765
+#define GL_QUERY_COUNTER_BITS 0x8864
+#define GL_CURRENT_QUERY 0x8865
+#define GL_QUERY_RESULT 0x8866
+#define GL_QUERY_RESULT_AVAILABLE 0x8867
+#define GL_ARRAY_BUFFER 0x8892
+#define GL_ELEMENT_ARRAY_BUFFER 0x8893
+#define GL_ARRAY_BUFFER_BINDING 0x8894
+#define GL_ELEMENT_ARRAY_BUFFER_BINDING 0x8895
+#define GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING 0x889F
+#define GL_READ_ONLY 0x88B8
+#define GL_WRITE_ONLY 0x88B9
+#define GL_READ_WRITE 0x88BA
+#define GL_BUFFER_ACCESS 0x88BB
+#define GL_BUFFER_MAPPED 0x88BC
+#define GL_BUFFER_MAP_POINTER 0x88BD
+#define GL_STREAM_DRAW 0x88E0
+#define GL_STREAM_READ 0x88E1
+#define GL_STREAM_COPY 0x88E2
+#define GL_STATIC_DRAW 0x88E4
+#define GL_STATIC_READ 0x88E5
+#define GL_STATIC_COPY 0x88E6
+#define GL_DYNAMIC_DRAW 0x88E8
+#define GL_DYNAMIC_READ 0x88E9
+#define GL_DYNAMIC_COPY 0x88EA
+#define GL_SAMPLES_PASSED 0x8914
+#define GL_SRC1_ALPHA 0x8589
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_BLEND_EQUATION_RGB 0x8009
+#define GL_VERTEX_ATTRIB_ARRAY_ENABLED 0x8622
+#define GL_VERTEX_ATTRIB_ARRAY_SIZE 0x8623
+#define GL_VERTEX_ATTRIB_ARRAY_STRIDE 0x8624
+#define GL_VERTEX_ATTRIB_ARRAY_TYPE 0x8625
+#define GL_CURRENT_VERTEX_ATTRIB 0x8626
+#define GL_VERTEX_PROGRAM_POINT_SIZE 0x8642
+#define GL_VERTEX_ATTRIB_ARRAY_POINTER 0x8645
+#define GL_STENCIL_BACK_FUNC 0x8800
+#define GL_STENCIL_BACK_FAIL 0x8801
+#define GL_STENCIL_BACK_PASS_DEPTH_FAIL 0x8802
+#define GL_STENCIL_BACK_PASS_DEPTH_PASS 0x8803
+#define GL_MAX_DRAW_BUFFERS 0x8824
+#define GL_DRAW_BUFFER0 0x8825
+#define GL_DRAW_BUFFER1 0x8826
+#define GL_DRAW_BUFFER2 0x8827
+#define GL_DRAW_BUFFER3 0x8828
+#define GL_DRAW_BUFFER4 0x8829
+#define GL_DRAW_BUFFER5 0x882A
+#define GL_DRAW_BUFFER6 0x882B
+#define GL_DRAW_BUFFER7 0x882C
+#define GL_DRAW_BUFFER8 0x882D
+#define GL_DRAW_BUFFER9 0x882E
+#define GL_DRAW_BUFFER10 0x882F
+#define GL_DRAW_BUFFER11 0x8830
+#define GL_DRAW_BUFFER12 0x8831
+#define GL_DRAW_BUFFER13 0x8832
+#define GL_DRAW_BUFFER14 0x8833
+#define GL_DRAW_BUFFER15 0x8834
+#define GL_BLEND_EQUATION_ALPHA 0x883D
+#define GL_MAX_VERTEX_ATTRIBS 0x8869
+#define GL_VERTEX_ATTRIB_ARRAY_NORMALIZED 0x886A
+#define GL_MAX_TEXTURE_IMAGE_UNITS 0x8872
+#define GL_FRAGMENT_SHADER 0x8B30
+#define GL_VERTEX_SHADER 0x8B31
+#define GL_MAX_FRAGMENT_UNIFORM_COMPONENTS 0x8B49
+#define GL_MAX_VERTEX_UNIFORM_COMPONENTS 0x8B4A
+#define GL_MAX_VARYING_FLOATS 0x8B4B
+#define GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS 0x8B4C
+#define GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS 0x8B4D
+#define GL_SHADER_TYPE 0x8B4F
+#define GL_FLOAT_VEC2 0x8B50
+#define GL_FLOAT_VEC3 0x8B51
+#define GL_FLOAT_VEC4 0x8B52
+#define GL_INT_VEC2 0x8B53
+#define GL_INT_VEC3 0x8B54
+#define GL_INT_VEC4 0x8B55
+#define GL_BOOL 0x8B56
+#define GL_BOOL_VEC2 0x8B57
+#define GL_BOOL_VEC3 0x8B58
+#define GL_BOOL_VEC4 0x8B59
+#define GL_FLOAT_MAT2 0x8B5A
+#define GL_FLOAT_MAT3 0x8B5B
+#define GL_FLOAT_MAT4 0x8B5C
+#define GL_SAMPLER_1D 0x8B5D
+#define GL_SAMPLER_2D 0x8B5E
+#define GL_SAMPLER_3D 0x8B5F
+#define GL_SAMPLER_CUBE 0x8B60
+#define GL_SAMPLER_1D_SHADOW 0x8B61
+#define GL_SAMPLER_2D_SHADOW 0x8B62
+#define GL_DELETE_STATUS 0x8B80
+#define GL_COMPILE_STATUS 0x8B81
+#define GL_LINK_STATUS 0x8B82
+#define GL_VALIDATE_STATUS 0x8B83
+#define GL_INFO_LOG_LENGTH 0x8B84
+#define GL_ATTACHED_SHADERS 0x8B85
+#define GL_ACTIVE_UNIFORMS 0x8B86
+#define GL_ACTIVE_UNIFORM_MAX_LENGTH 0x8B87
+#define GL_SHADER_SOURCE_LENGTH 0x8B88
+#define GL_ACTIVE_ATTRIBUTES 0x8B89
+#define GL_ACTIVE_ATTRIBUTE_MAX_LENGTH 0x8B8A
+#define GL_FRAGMENT_SHADER_DERIVATIVE_HINT 0x8B8B
+#define GL_SHADING_LANGUAGE_VERSION 0x8B8C
+#define GL_CURRENT_PROGRAM 0x8B8D
+#define GL_POINT_SPRITE_COORD_ORIGIN 0x8CA0
+#define GL_LOWER_LEFT 0x8CA1
+#define GL_UPPER_LEFT 0x8CA2
+#define GL_STENCIL_BACK_REF 0x8CA3
+#define GL_STENCIL_BACK_VALUE_MASK 0x8CA4
+#define GL_STENCIL_BACK_WRITEMASK 0x8CA5
+#endif
+
+#ifndef GL_VERSION_2_1
+#define GL_PIXEL_PACK_BUFFER 0x88EB
+#define GL_PIXEL_UNPACK_BUFFER 0x88EC
+#define GL_PIXEL_PACK_BUFFER_BINDING 0x88ED
+#define GL_PIXEL_UNPACK_BUFFER_BINDING 0x88EF
+#define GL_FLOAT_MAT2x3 0x8B65
+#define GL_FLOAT_MAT2x4 0x8B66
+#define GL_FLOAT_MAT3x2 0x8B67
+#define GL_FLOAT_MAT3x4 0x8B68
+#define GL_FLOAT_MAT4x2 0x8B69
+#define GL_FLOAT_MAT4x3 0x8B6A
+#define GL_SRGB 0x8C40
+#define GL_SRGB8 0x8C41
+#define GL_SRGB_ALPHA 0x8C42
+#define GL_SRGB8_ALPHA8 0x8C43
+#define GL_COMPRESSED_SRGB 0x8C48
+#define GL_COMPRESSED_SRGB_ALPHA 0x8C49
+#endif
+
+#ifndef GL_VERSION_3_0
+#define GL_COMPARE_REF_TO_TEXTURE 0x884E
+#define GL_CLIP_DISTANCE0 0x3000
+#define GL_CLIP_DISTANCE1 0x3001
+#define GL_CLIP_DISTANCE2 0x3002
+#define GL_CLIP_DISTANCE3 0x3003
+#define GL_CLIP_DISTANCE4 0x3004
+#define GL_CLIP_DISTANCE5 0x3005
+#define GL_CLIP_DISTANCE6 0x3006
+#define GL_CLIP_DISTANCE7 0x3007
+#define GL_MAX_CLIP_DISTANCES 0x0D32
+#define GL_MAJOR_VERSION 0x821B
+#define GL_MINOR_VERSION 0x821C
+#define GL_NUM_EXTENSIONS 0x821D
+#define GL_CONTEXT_FLAGS 0x821E
+#define GL_COMPRESSED_RED 0x8225
+#define GL_COMPRESSED_RG 0x8226
+#define GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT 0x0001
+#define GL_RGBA32F 0x8814
+#define GL_RGB32F 0x8815
+#define GL_RGBA16F 0x881A
+#define GL_RGB16F 0x881B
+#define GL_VERTEX_ATTRIB_ARRAY_INTEGER 0x88FD
+#define GL_MAX_ARRAY_TEXTURE_LAYERS 0x88FF
+#define GL_MIN_PROGRAM_TEXEL_OFFSET 0x8904
+#define GL_MAX_PROGRAM_TEXEL_OFFSET 0x8905
+#define GL_CLAMP_READ_COLOR 0x891C
+#define GL_FIXED_ONLY 0x891D
+#define GL_MAX_VARYING_COMPONENTS 0x8B4B
+#define GL_TEXTURE_1D_ARRAY 0x8C18
+#define GL_PROXY_TEXTURE_1D_ARRAY 0x8C19
+#define GL_TEXTURE_2D_ARRAY 0x8C1A
+#define GL_PROXY_TEXTURE_2D_ARRAY 0x8C1B
+#define GL_TEXTURE_BINDING_1D_ARRAY 0x8C1C
+#define GL_TEXTURE_BINDING_2D_ARRAY 0x8C1D
+#define GL_R11F_G11F_B10F 0x8C3A
+#define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
+#define GL_RGB9_E5 0x8C3D
+#define GL_UNSIGNED_INT_5_9_9_9_REV 0x8C3E
+#define GL_TEXTURE_SHARED_SIZE 0x8C3F
+#define GL_TRANSFORM_FEEDBACK_VARYING_MAX_LENGTH 0x8C76
+#define GL_TRANSFORM_FEEDBACK_BUFFER_MODE 0x8C7F
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS 0x8C80
+#define GL_TRANSFORM_FEEDBACK_VARYINGS 0x8C83
+#define GL_TRANSFORM_FEEDBACK_BUFFER_START 0x8C84
+#define GL_TRANSFORM_FEEDBACK_BUFFER_SIZE 0x8C85
+#define GL_PRIMITIVES_GENERATED 0x8C87
+#define GL_TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN 0x8C88
+#define GL_RASTERIZER_DISCARD 0x8C89
+#define GL_MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS 0x8C8A
+#define GL_MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS 0x8C8B
+#define GL_INTERLEAVED_ATTRIBS 0x8C8C
+#define GL_SEPARATE_ATTRIBS 0x8C8D
+#define GL_TRANSFORM_FEEDBACK_BUFFER 0x8C8E
+#define GL_TRANSFORM_FEEDBACK_BUFFER_BINDING 0x8C8F
+#define GL_RGBA32UI 0x8D70
+#define GL_RGB32UI 0x8D71
+#define GL_RGBA16UI 0x8D76
+#define GL_RGB16UI 0x8D77
+#define GL_RGBA8UI 0x8D7C
+#define GL_RGB8UI 0x8D7D
+#define GL_RGBA32I 0x8D82
+#define GL_RGB32I 0x8D83
+#define GL_RGBA16I 0x8D88
+#define GL_RGB16I 0x8D89
+#define GL_RGBA8I 0x8D8E
+#define GL_RGB8I 0x8D8F
+#define GL_RED_INTEGER 0x8D94
+#define GL_GREEN_INTEGER 0x8D95
+#define GL_BLUE_INTEGER 0x8D96
+#define GL_RGB_INTEGER 0x8D98
+#define GL_RGBA_INTEGER 0x8D99
+#define GL_BGR_INTEGER 0x8D9A
+#define GL_BGRA_INTEGER 0x8D9B
+#define GL_SAMPLER_1D_ARRAY 0x8DC0
+#define GL_SAMPLER_2D_ARRAY 0x8DC1
+#define GL_SAMPLER_1D_ARRAY_SHADOW 0x8DC3
+#define GL_SAMPLER_2D_ARRAY_SHADOW 0x8DC4
+#define GL_SAMPLER_CUBE_SHADOW 0x8DC5
+#define GL_UNSIGNED_INT_VEC2 0x8DC6
+#define GL_UNSIGNED_INT_VEC3 0x8DC7
+#define GL_UNSIGNED_INT_VEC4 0x8DC8
+#define GL_INT_SAMPLER_1D 0x8DC9
+#define GL_INT_SAMPLER_2D 0x8DCA
+#define GL_INT_SAMPLER_3D 0x8DCB
+#define GL_INT_SAMPLER_CUBE 0x8DCC
+#define GL_INT_SAMPLER_1D_ARRAY 0x8DCE
+#define GL_INT_SAMPLER_2D_ARRAY 0x8DCF
+#define GL_UNSIGNED_INT_SAMPLER_1D 0x8DD1
+#define GL_UNSIGNED_INT_SAMPLER_2D 0x8DD2
+#define GL_UNSIGNED_INT_SAMPLER_3D 0x8DD3
+#define GL_UNSIGNED_INT_SAMPLER_CUBE 0x8DD4
+#define GL_UNSIGNED_INT_SAMPLER_1D_ARRAY 0x8DD6
+#define GL_UNSIGNED_INT_SAMPLER_2D_ARRAY 0x8DD7
+#define GL_QUERY_WAIT 0x8E13
+#define GL_QUERY_NO_WAIT 0x8E14
+#define GL_QUERY_BY_REGION_WAIT 0x8E15
+#define GL_QUERY_BY_REGION_NO_WAIT 0x8E16
+#define GL_BUFFER_ACCESS_FLAGS 0x911F
+#define GL_BUFFER_MAP_LENGTH 0x9120
+#define GL_BUFFER_MAP_OFFSET 0x9121
+/* Reuse tokens from ARB_depth_buffer_float */
+/* reuse GL_DEPTH_COMPONENT32F */
+/* reuse GL_DEPTH32F_STENCIL8 */
+/* reuse GL_FLOAT_32_UNSIGNED_INT_24_8_REV */
+/* Reuse tokens from ARB_framebuffer_object */
+/* reuse GL_INVALID_FRAMEBUFFER_OPERATION */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE */
+/* reuse GL_FRAMEBUFFER_DEFAULT */
+/* reuse GL_FRAMEBUFFER_UNDEFINED */
+/* reuse GL_DEPTH_STENCIL_ATTACHMENT */
+/* reuse GL_INDEX */
+/* reuse GL_MAX_RENDERBUFFER_SIZE */
+/* reuse GL_DEPTH_STENCIL */
+/* reuse GL_UNSIGNED_INT_24_8 */
+/* reuse GL_DEPTH24_STENCIL8 */
+/* reuse GL_TEXTURE_STENCIL_SIZE */
+/* reuse GL_TEXTURE_RED_TYPE */
+/* reuse GL_TEXTURE_GREEN_TYPE */
+/* reuse GL_TEXTURE_BLUE_TYPE */
+/* reuse GL_TEXTURE_ALPHA_TYPE */
+/* reuse GL_TEXTURE_DEPTH_TYPE */
+/* reuse GL_UNSIGNED_NORMALIZED */
+/* reuse GL_FRAMEBUFFER_BINDING */
+/* reuse GL_DRAW_FRAMEBUFFER_BINDING */
+/* reuse GL_RENDERBUFFER_BINDING */
+/* reuse GL_READ_FRAMEBUFFER */
+/* reuse GL_DRAW_FRAMEBUFFER */
+/* reuse GL_READ_FRAMEBUFFER_BINDING */
+/* reuse GL_RENDERBUFFER_SAMPLES */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+/* reuse GL_FRAMEBUFFER_COMPLETE */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER */
+/* reuse GL_FRAMEBUFFER_UNSUPPORTED */
+/* reuse GL_MAX_COLOR_ATTACHMENTS */
+/* reuse GL_COLOR_ATTACHMENT0 */
+/* reuse GL_COLOR_ATTACHMENT1 */
+/* reuse GL_COLOR_ATTACHMENT2 */
+/* reuse GL_COLOR_ATTACHMENT3 */
+/* reuse GL_COLOR_ATTACHMENT4 */
+/* reuse GL_COLOR_ATTACHMENT5 */
+/* reuse GL_COLOR_ATTACHMENT6 */
+/* reuse GL_COLOR_ATTACHMENT7 */
+/* reuse GL_COLOR_ATTACHMENT8 */
+/* reuse GL_COLOR_ATTACHMENT9 */
+/* reuse GL_COLOR_ATTACHMENT10 */
+/* reuse GL_COLOR_ATTACHMENT11 */
+/* reuse GL_COLOR_ATTACHMENT12 */
+/* reuse GL_COLOR_ATTACHMENT13 */
+/* reuse GL_COLOR_ATTACHMENT14 */
+/* reuse GL_COLOR_ATTACHMENT15 */
+/* reuse GL_DEPTH_ATTACHMENT */
+/* reuse GL_STENCIL_ATTACHMENT */
+/* reuse GL_FRAMEBUFFER */
+/* reuse GL_RENDERBUFFER */
+/* reuse GL_RENDERBUFFER_WIDTH */
+/* reuse GL_RENDERBUFFER_HEIGHT */
+/* reuse GL_RENDERBUFFER_INTERNAL_FORMAT */
+/* reuse GL_STENCIL_INDEX1 */
+/* reuse GL_STENCIL_INDEX4 */
+/* reuse GL_STENCIL_INDEX8 */
+/* reuse GL_STENCIL_INDEX16 */
+/* reuse GL_RENDERBUFFER_RED_SIZE */
+/* reuse GL_RENDERBUFFER_GREEN_SIZE */
+/* reuse GL_RENDERBUFFER_BLUE_SIZE */
+/* reuse GL_RENDERBUFFER_ALPHA_SIZE */
+/* reuse GL_RENDERBUFFER_DEPTH_SIZE */
+/* reuse GL_RENDERBUFFER_STENCIL_SIZE */
+/* reuse GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE */
+/* reuse GL_MAX_SAMPLES */
+/* Reuse tokens from ARB_framebuffer_sRGB */
+/* reuse GL_FRAMEBUFFER_SRGB */
+/* Reuse tokens from ARB_half_float_vertex */
+/* reuse GL_HALF_FLOAT */
+/* Reuse tokens from ARB_map_buffer_range */
+/* reuse GL_MAP_READ_BIT */
+/* reuse GL_MAP_WRITE_BIT */
+/* reuse GL_MAP_INVALIDATE_RANGE_BIT */
+/* reuse GL_MAP_INVALIDATE_BUFFER_BIT */
+/* reuse GL_MAP_FLUSH_EXPLICIT_BIT */
+/* reuse GL_MAP_UNSYNCHRONIZED_BIT */
+/* Reuse tokens from ARB_texture_compression_rgtc */
+/* reuse GL_COMPRESSED_RED_RGTC1 */
+/* reuse GL_COMPRESSED_SIGNED_RED_RGTC1 */
+/* reuse GL_COMPRESSED_RG_RGTC2 */
+/* reuse GL_COMPRESSED_SIGNED_RG_RGTC2 */
+/* Reuse tokens from ARB_texture_rg */
+/* reuse GL_RG */
+/* reuse GL_RG_INTEGER */
+/* reuse GL_R8 */
+/* reuse GL_R16 */
+/* reuse GL_RG8 */
+/* reuse GL_RG16 */
+/* reuse GL_R16F */
+/* reuse GL_R32F */
+/* reuse GL_RG16F */
+/* reuse GL_RG32F */
+/* reuse GL_R8I */
+/* reuse GL_R8UI */
+/* reuse GL_R16I */
+/* reuse GL_R16UI */
+/* reuse GL_R32I */
+/* reuse GL_R32UI */
+/* reuse GL_RG8I */
+/* reuse GL_RG8UI */
+/* reuse GL_RG16I */
+/* reuse GL_RG16UI */
+/* reuse GL_RG32I */
+/* reuse GL_RG32UI */
+/* Reuse tokens from ARB_vertex_array_object */
+/* reuse GL_VERTEX_ARRAY_BINDING */
+#endif
+
+#ifndef GL_VERSION_3_1
+#define GL_SAMPLER_2D_RECT 0x8B63
+#define GL_SAMPLER_2D_RECT_SHADOW 0x8B64
+#define GL_SAMPLER_BUFFER 0x8DC2
+#define GL_INT_SAMPLER_2D_RECT 0x8DCD
+#define GL_INT_SAMPLER_BUFFER 0x8DD0
+#define GL_UNSIGNED_INT_SAMPLER_2D_RECT 0x8DD5
+#define GL_UNSIGNED_INT_SAMPLER_BUFFER 0x8DD8
+#define GL_TEXTURE_BUFFER 0x8C2A
+#define GL_MAX_TEXTURE_BUFFER_SIZE 0x8C2B
+#define GL_TEXTURE_BINDING_BUFFER 0x8C2C
+#define GL_TEXTURE_BUFFER_DATA_STORE_BINDING 0x8C2D
+#define GL_TEXTURE_RECTANGLE 0x84F5
+#define GL_TEXTURE_BINDING_RECTANGLE 0x84F6
+#define GL_PROXY_TEXTURE_RECTANGLE 0x84F7
+#define GL_MAX_RECTANGLE_TEXTURE_SIZE 0x84F8
+#define GL_RED_SNORM 0x8F90
+#define GL_RG_SNORM 0x8F91
+#define GL_RGB_SNORM 0x8F92
+#define GL_RGBA_SNORM 0x8F93
+#define GL_R8_SNORM 0x8F94
+#define GL_RG8_SNORM 0x8F95
+#define GL_RGB8_SNORM 0x8F96
+#define GL_RGBA8_SNORM 0x8F97
+#define GL_R16_SNORM 0x8F98
+#define GL_RG16_SNORM 0x8F99
+#define GL_RGB16_SNORM 0x8F9A
+#define GL_RGBA16_SNORM 0x8F9B
+#define GL_SIGNED_NORMALIZED 0x8F9C
+#define GL_PRIMITIVE_RESTART 0x8F9D
+#define GL_PRIMITIVE_RESTART_INDEX 0x8F9E
+/* Reuse tokens from ARB_copy_buffer */
+/* reuse GL_COPY_READ_BUFFER */
+/* reuse GL_COPY_WRITE_BUFFER */
+/* Reuse tokens from ARB_draw_instanced (none) */
+/* Reuse tokens from ARB_uniform_buffer_object */
+/* reuse GL_UNIFORM_BUFFER */
+/* reuse GL_UNIFORM_BUFFER_BINDING */
+/* reuse GL_UNIFORM_BUFFER_START */
+/* reuse GL_UNIFORM_BUFFER_SIZE */
+/* reuse GL_MAX_VERTEX_UNIFORM_BLOCKS */
+/* reuse GL_MAX_FRAGMENT_UNIFORM_BLOCKS */
+/* reuse GL_MAX_COMBINED_UNIFORM_BLOCKS */
+/* reuse GL_MAX_UNIFORM_BUFFER_BINDINGS */
+/* reuse GL_MAX_UNIFORM_BLOCK_SIZE */
+/* reuse GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS */
+/* reuse GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT */
+/* reuse GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH */
+/* reuse GL_ACTIVE_UNIFORM_BLOCKS */
+/* reuse GL_UNIFORM_TYPE */
+/* reuse GL_UNIFORM_SIZE */
+/* reuse GL_UNIFORM_NAME_LENGTH */
+/* reuse GL_UNIFORM_BLOCK_INDEX */
+/* reuse GL_UNIFORM_OFFSET */
+/* reuse GL_UNIFORM_ARRAY_STRIDE */
+/* reuse GL_UNIFORM_MATRIX_STRIDE */
+/* reuse GL_UNIFORM_IS_ROW_MAJOR */
+/* reuse GL_UNIFORM_BLOCK_BINDING */
+/* reuse GL_UNIFORM_BLOCK_DATA_SIZE */
+/* reuse GL_UNIFORM_BLOCK_NAME_LENGTH */
+/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS */
+/* reuse GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER */
+/* reuse GL_INVALID_INDEX */
+#endif
+
+#ifndef GL_VERSION_3_2
+#define GL_CONTEXT_CORE_PROFILE_BIT 0x00000001
+#define GL_CONTEXT_COMPATIBILITY_PROFILE_BIT 0x00000002
+#define GL_LINES_ADJACENCY 0x000A
+#define GL_LINE_STRIP_ADJACENCY 0x000B
+#define GL_TRIANGLES_ADJACENCY 0x000C
+#define GL_TRIANGLE_STRIP_ADJACENCY 0x000D
+#define GL_PROGRAM_POINT_SIZE 0x8642
+#define GL_MAX_GEOMETRY_TEXTURE_IMAGE_UNITS 0x8C29
+#define GL_FRAMEBUFFER_ATTACHMENT_LAYERED 0x8DA7
+#define GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS 0x8DA8
+#define GL_GEOMETRY_SHADER 0x8DD9
+#define GL_GEOMETRY_VERTICES_OUT 0x8916
+#define GL_GEOMETRY_INPUT_TYPE 0x8917
+#define GL_GEOMETRY_OUTPUT_TYPE 0x8918
+#define GL_MAX_GEOMETRY_UNIFORM_COMPONENTS 0x8DDF
+#define GL_MAX_GEOMETRY_OUTPUT_VERTICES 0x8DE0
+#define GL_MAX_GEOMETRY_TOTAL_OUTPUT_COMPONENTS 0x8DE1
+#define GL_MAX_VERTEX_OUTPUT_COMPONENTS 0x9122
+#define GL_MAX_GEOMETRY_INPUT_COMPONENTS 0x9123
+#define GL_MAX_GEOMETRY_OUTPUT_COMPONENTS 0x9124
+#define GL_MAX_FRAGMENT_INPUT_COMPONENTS 0x9125
+#define GL_CONTEXT_PROFILE_MASK 0x9126
+/* reuse GL_MAX_VARYING_COMPONENTS */
+/* reuse GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER */
+/* Reuse tokens from ARB_depth_clamp */
+/* reuse GL_DEPTH_CLAMP */
+/* Reuse tokens from ARB_draw_elements_base_vertex (none) */
+/* Reuse tokens from ARB_fragment_coord_conventions (none) */
+/* Reuse tokens from ARB_provoking_vertex */
+/* reuse GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION */
+/* reuse GL_FIRST_VERTEX_CONVENTION */
+/* reuse GL_LAST_VERTEX_CONVENTION */
+/* reuse GL_PROVOKING_VERTEX */
+/* Reuse tokens from ARB_seamless_cube_map */
+/* reuse GL_TEXTURE_CUBE_MAP_SEAMLESS */
+/* Reuse tokens from ARB_sync */
+/* reuse GL_MAX_SERVER_WAIT_TIMEOUT */
+/* reuse GL_OBJECT_TYPE */
+/* reuse GL_SYNC_CONDITION */
+/* reuse GL_SYNC_STATUS */
+/* reuse GL_SYNC_FLAGS */
+/* reuse GL_SYNC_FENCE */
+/* reuse GL_SYNC_GPU_COMMANDS_COMPLETE */
+/* reuse GL_UNSIGNALED */
+/* reuse GL_SIGNALED */
+/* reuse GL_ALREADY_SIGNALED */
+/* reuse GL_TIMEOUT_EXPIRED */
+/* reuse GL_CONDITION_SATISFIED */
+/* reuse GL_WAIT_FAILED */
+/* reuse GL_TIMEOUT_IGNORED */
+/* reuse GL_SYNC_FLUSH_COMMANDS_BIT */
+/* reuse GL_TIMEOUT_IGNORED */
+/* Reuse tokens from ARB_texture_multisample */
+/* reuse GL_SAMPLE_POSITION */
+/* reuse GL_SAMPLE_MASK */
+/* reuse GL_SAMPLE_MASK_VALUE */
+/* reuse GL_MAX_SAMPLE_MASK_WORDS */
+/* reuse GL_TEXTURE_2D_MULTISAMPLE */
+/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE */
+/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE */
+/* reuse GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_TEXTURE_SAMPLES */
+/* reuse GL_TEXTURE_FIXED_SAMPLE_LOCATIONS */
+/* reuse GL_SAMPLER_2D_MULTISAMPLE */
+/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE */
+/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE */
+/* reuse GL_SAMPLER_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_MAX_COLOR_TEXTURE_SAMPLES */
+/* reuse GL_MAX_DEPTH_TEXTURE_SAMPLES */
+/* reuse GL_MAX_INTEGER_SAMPLES */
+/* Don't need to reuse tokens from ARB_vertex_array_bgra since they're already in 1.2 core */
+#endif
+
+#ifndef GL_VERSION_3_3
+#define GL_VERTEX_ATTRIB_ARRAY_DIVISOR 0x88FE
+/* Reuse tokens from ARB_blend_func_extended */
+/* reuse GL_SRC1_COLOR */
+/* reuse GL_ONE_MINUS_SRC1_COLOR */
+/* reuse GL_ONE_MINUS_SRC1_ALPHA */
+/* reuse GL_MAX_DUAL_SOURCE_DRAW_BUFFERS */
+/* Reuse tokens from ARB_explicit_attrib_location (none) */
+/* Reuse tokens from ARB_occlusion_query2 */
+/* reuse GL_ANY_SAMPLES_PASSED */
+/* Reuse tokens from ARB_sampler_objects */
+/* reuse GL_SAMPLER_BINDING */
+/* Reuse tokens from ARB_shader_bit_encoding (none) */
+/* Reuse tokens from ARB_texture_rgb10_a2ui */
+/* reuse GL_RGB10_A2UI */
+/* Reuse tokens from ARB_texture_swizzle */
+/* reuse GL_TEXTURE_SWIZZLE_R */
+/* reuse GL_TEXTURE_SWIZZLE_G */
+/* reuse GL_TEXTURE_SWIZZLE_B */
+/* reuse GL_TEXTURE_SWIZZLE_A */
+/* reuse GL_TEXTURE_SWIZZLE_RGBA */
+/* Reuse tokens from ARB_timer_query */
+/* reuse GL_TIME_ELAPSED */
+/* reuse GL_TIMESTAMP */
+/* Reuse tokens from ARB_vertex_type_2_10_10_10_rev */
+/* reuse GL_INT_2_10_10_10_REV */
+#endif
+
+#ifndef GL_VERSION_4_0
+#define GL_SAMPLE_SHADING 0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE 0x8C37
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET 0x8E5F
+#define GL_TEXTURE_CUBE_MAP_ARRAY 0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY 0x900A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY 0x900B
+#define GL_SAMPLER_CUBE_MAP_ARRAY 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW 0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY 0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY 0x900F
+/* Reuse tokens from ARB_texture_query_lod (none) */
+/* Reuse tokens from ARB_draw_buffers_blend (none) */
+/* Reuse tokens from ARB_draw_indirect */
+/* reuse GL_DRAW_INDIRECT_BUFFER */
+/* reuse GL_DRAW_INDIRECT_BUFFER_BINDING */
+/* Reuse tokens from ARB_gpu_shader5 */
+/* reuse GL_GEOMETRY_SHADER_INVOCATIONS */
+/* reuse GL_MAX_GEOMETRY_SHADER_INVOCATIONS */
+/* reuse GL_MIN_FRAGMENT_INTERPOLATION_OFFSET */
+/* reuse GL_MAX_FRAGMENT_INTERPOLATION_OFFSET */
+/* reuse GL_FRAGMENT_INTERPOLATION_OFFSET_BITS */
+/* reuse GL_MAX_VERTEX_STREAMS */
+/* Reuse tokens from ARB_gpu_shader_fp64 */
+/* reuse GL_DOUBLE_VEC2 */
+/* reuse GL_DOUBLE_VEC3 */
+/* reuse GL_DOUBLE_VEC4 */
+/* reuse GL_DOUBLE_MAT2 */
+/* reuse GL_DOUBLE_MAT3 */
+/* reuse GL_DOUBLE_MAT4 */
+/* reuse GL_DOUBLE_MAT2x3 */
+/* reuse GL_DOUBLE_MAT2x4 */
+/* reuse GL_DOUBLE_MAT3x2 */
+/* reuse GL_DOUBLE_MAT3x4 */
+/* reuse GL_DOUBLE_MAT4x2 */
+/* reuse GL_DOUBLE_MAT4x3 */
+/* Reuse tokens from ARB_shader_subroutine */
+/* reuse GL_ACTIVE_SUBROUTINES */
+/* reuse GL_ACTIVE_SUBROUTINE_UNIFORMS */
+/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS */
+/* reuse GL_ACTIVE_SUBROUTINE_MAX_LENGTH */
+/* reuse GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH */
+/* reuse GL_MAX_SUBROUTINES */
+/* reuse GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS */
+/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */
+/* reuse GL_COMPATIBLE_SUBROUTINES */
+/* Reuse tokens from ARB_tessellation_shader */
+/* reuse GL_PATCHES */
+/* reuse GL_PATCH_VERTICES */
+/* reuse GL_PATCH_DEFAULT_INNER_LEVEL */
+/* reuse GL_PATCH_DEFAULT_OUTER_LEVEL */
+/* reuse GL_TESS_CONTROL_OUTPUT_VERTICES */
+/* reuse GL_TESS_GEN_MODE */
+/* reuse GL_TESS_GEN_SPACING */
+/* reuse GL_TESS_GEN_VERTEX_ORDER */
+/* reuse GL_TESS_GEN_POINT_MODE */
+/* reuse GL_ISOLINES */
+/* reuse GL_FRACTIONAL_ODD */
+/* reuse GL_FRACTIONAL_EVEN */
+/* reuse GL_MAX_PATCH_VERTICES */
+/* reuse GL_MAX_TESS_GEN_LEVEL */
+/* reuse GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS */
+/* reuse GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS */
+/* reuse GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_PATCH_COMPONENTS */
+/* reuse GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS */
+/* reuse GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS */
+/* reuse GL_MAX_TESS_CONTROL_INPUT_COMPONENTS */
+/* reuse GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS */
+/* reuse GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER */
+/* reuse GL_TESS_EVALUATION_SHADER */
+/* reuse GL_TESS_CONTROL_SHADER */
+/* Reuse tokens from ARB_texture_buffer_object_rgb32 (none) */
+/* Reuse tokens from ARB_transform_feedback2 */
+/* reuse GL_TRANSFORM_FEEDBACK */
+/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED */
+/* reuse GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE */
+/* reuse GL_TRANSFORM_FEEDBACK_BINDING */
+/* Reuse tokens from ARB_transform_feedback3 */
+/* reuse GL_MAX_TRANSFORM_FEEDBACK_BUFFERS */
+/* reuse GL_MAX_VERTEX_STREAMS */
+#endif
+
+#ifndef GL_VERSION_4_1
+/* Reuse tokens from ARB_ES2_compatibility */
+/* reuse GL_FIXED */
+/* reuse GL_IMPLEMENTATION_COLOR_READ_TYPE */
+/* reuse GL_IMPLEMENTATION_COLOR_READ_FORMAT */
+/* reuse GL_LOW_FLOAT */
+/* reuse GL_MEDIUM_FLOAT */
+/* reuse GL_HIGH_FLOAT */
+/* reuse GL_LOW_INT */
+/* reuse GL_MEDIUM_INT */
+/* reuse GL_HIGH_INT */
+/* reuse GL_SHADER_COMPILER */
+/* reuse GL_SHADER_BINARY_FORMATS */
+/* reuse GL_NUM_SHADER_BINARY_FORMATS */
+/* reuse GL_MAX_VERTEX_UNIFORM_VECTORS */
+/* reuse GL_MAX_VARYING_VECTORS */
+/* reuse GL_MAX_FRAGMENT_UNIFORM_VECTORS */
+/* reuse GL_RGB565 */
+/* Reuse tokens from ARB_get_program_binary */
+/* reuse GL_PROGRAM_BINARY_RETRIEVABLE_HINT */
+/* reuse GL_PROGRAM_BINARY_LENGTH */
+/* reuse GL_NUM_PROGRAM_BINARY_FORMATS */
+/* reuse GL_PROGRAM_BINARY_FORMATS */
+/* Reuse tokens from ARB_separate_shader_objects */
+/* reuse GL_VERTEX_SHADER_BIT */
+/* reuse GL_FRAGMENT_SHADER_BIT */
+/* reuse GL_GEOMETRY_SHADER_BIT */
+/* reuse GL_TESS_CONTROL_SHADER_BIT */
+/* reuse GL_TESS_EVALUATION_SHADER_BIT */
+/* reuse GL_ALL_SHADER_BITS */
+/* reuse GL_PROGRAM_SEPARABLE */
+/* reuse GL_ACTIVE_PROGRAM */
+/* reuse GL_PROGRAM_PIPELINE_BINDING */
+/* Reuse tokens from ARB_shader_precision (none) */
+/* Reuse tokens from ARB_vertex_attrib_64bit - all are in GL 3.0 and 4.0 already */
+/* Reuse tokens from ARB_viewport_array - some are in GL 1.1 and ARB_provoking_vertex already */
+/* reuse GL_MAX_VIEWPORTS */
+/* reuse GL_VIEWPORT_SUBPIXEL_BITS */
+/* reuse GL_VIEWPORT_BOUNDS_RANGE */
+/* reuse GL_LAYER_PROVOKING_VERTEX */
+/* reuse GL_VIEWPORT_INDEX_PROVOKING_VERTEX */
+/* reuse GL_UNDEFINED_VERTEX */
+#endif
+
+#ifndef GL_VERSION_4_2
+/* Reuse tokens from ARB_base_instance (none) */
+/* Reuse tokens from ARB_shading_language_420pack (none) */
+/* Reuse tokens from ARB_transform_feedback_instanced (none) */
+/* Reuse tokens from ARB_compressed_texture_pixel_storage */
+/* reuse GL_UNPACK_COMPRESSED_BLOCK_WIDTH */
+/* reuse GL_UNPACK_COMPRESSED_BLOCK_HEIGHT */
+/* reuse GL_UNPACK_COMPRESSED_BLOCK_DEPTH */
+/* reuse GL_UNPACK_COMPRESSED_BLOCK_SIZE */
+/* reuse GL_PACK_COMPRESSED_BLOCK_WIDTH */
+/* reuse GL_PACK_COMPRESSED_BLOCK_HEIGHT */
+/* reuse GL_PACK_COMPRESSED_BLOCK_DEPTH */
+/* reuse GL_PACK_COMPRESSED_BLOCK_SIZE */
+/* Reuse tokens from ARB_conservative_depth (none) */
+/* Reuse tokens from ARB_internalformat_query */
+/* reuse GL_NUM_SAMPLE_COUNTS */
+/* Reuse tokens from ARB_map_buffer_alignment */
+/* reuse GL_MIN_MAP_BUFFER_ALIGNMENT */
+/* Reuse tokens from ARB_shader_atomic_counters */
+/* reuse GL_ATOMIC_COUNTER_BUFFER */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_BINDING */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_START */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_SIZE */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER */
+/* reuse GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_VERTEX_ATOMIC_COUNTERS */
+/* reuse GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS */
+/* reuse GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS */
+/* reuse GL_MAX_GEOMETRY_ATOMIC_COUNTERS */
+/* reuse GL_MAX_FRAGMENT_ATOMIC_COUNTERS */
+/* reuse GL_MAX_COMBINED_ATOMIC_COUNTERS */
+/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE */
+/* reuse GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS */
+/* reuse GL_ACTIVE_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX */
+/* reuse GL_UNSIGNED_INT_ATOMIC_COUNTER */
+/* Reuse tokens from ARB_shader_image_load_store */
+/* reuse GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT */
+/* reuse GL_ELEMENT_ARRAY_BARRIER_BIT */
+/* reuse GL_UNIFORM_BARRIER_BIT */
+/* reuse GL_TEXTURE_FETCH_BARRIER_BIT */
+/* reuse GL_SHADER_IMAGE_ACCESS_BARRIER_BIT */
+/* reuse GL_COMMAND_BARRIER_BIT */
+/* reuse GL_PIXEL_BUFFER_BARRIER_BIT */
+/* reuse GL_TEXTURE_UPDATE_BARRIER_BIT */
+/* reuse GL_BUFFER_UPDATE_BARRIER_BIT */
+/* reuse GL_FRAMEBUFFER_BARRIER_BIT */
+/* reuse GL_TRANSFORM_FEEDBACK_BARRIER_BIT */
+/* reuse GL_ATOMIC_COUNTER_BARRIER_BIT */
+/* reuse GL_ALL_BARRIER_BITS */
+/* reuse GL_MAX_IMAGE_UNITS */
+/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */
+/* reuse GL_IMAGE_BINDING_NAME */
+/* reuse GL_IMAGE_BINDING_LEVEL */
+/* reuse GL_IMAGE_BINDING_LAYERED */
+/* reuse GL_IMAGE_BINDING_LAYER */
+/* reuse GL_IMAGE_BINDING_ACCESS */
+/* reuse GL_IMAGE_1D */
+/* reuse GL_IMAGE_2D */
+/* reuse GL_IMAGE_3D */
+/* reuse GL_IMAGE_2D_RECT */
+/* reuse GL_IMAGE_CUBE */
+/* reuse GL_IMAGE_BUFFER */
+/* reuse GL_IMAGE_1D_ARRAY */
+/* reuse GL_IMAGE_2D_ARRAY */
+/* reuse GL_IMAGE_CUBE_MAP_ARRAY */
+/* reuse GL_IMAGE_2D_MULTISAMPLE */
+/* reuse GL_IMAGE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_INT_IMAGE_1D */
+/* reuse GL_INT_IMAGE_2D */
+/* reuse GL_INT_IMAGE_3D */
+/* reuse GL_INT_IMAGE_2D_RECT */
+/* reuse GL_INT_IMAGE_CUBE */
+/* reuse GL_INT_IMAGE_BUFFER */
+/* reuse GL_INT_IMAGE_1D_ARRAY */
+/* reuse GL_INT_IMAGE_2D_ARRAY */
+/* reuse GL_INT_IMAGE_CUBE_MAP_ARRAY */
+/* reuse GL_INT_IMAGE_2D_MULTISAMPLE */
+/* reuse GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_UNSIGNED_INT_IMAGE_1D */
+/* reuse GL_UNSIGNED_INT_IMAGE_2D */
+/* reuse GL_UNSIGNED_INT_IMAGE_3D */
+/* reuse GL_UNSIGNED_INT_IMAGE_2D_RECT */
+/* reuse GL_UNSIGNED_INT_IMAGE_CUBE */
+/* reuse GL_UNSIGNED_INT_IMAGE_BUFFER */
+/* reuse GL_UNSIGNED_INT_IMAGE_1D_ARRAY */
+/* reuse GL_UNSIGNED_INT_IMAGE_2D_ARRAY */
+/* reuse GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY */
+/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE */
+/* reuse GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_MAX_IMAGE_SAMPLES */
+/* reuse GL_IMAGE_BINDING_FORMAT */
+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */
+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE */
+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS */
+/* reuse GL_MAX_VERTEX_IMAGE_UNIFORMS */
+/* reuse GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS */
+/* reuse GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS */
+/* reuse GL_MAX_GEOMETRY_IMAGE_UNIFORMS */
+/* reuse GL_MAX_FRAGMENT_IMAGE_UNIFORMS */
+/* reuse GL_MAX_COMBINED_IMAGE_UNIFORMS */
+/* Reuse tokens from ARB_shading_language_packing (none) */
+/* Reuse tokens from ARB_texture_storage */
+/* reuse GL_TEXTURE_IMMUTABLE_FORMAT */
+#endif
+
+#ifndef GL_VERSION_4_3
+#define GL_NUM_SHADING_LANGUAGE_VERSIONS 0x82E9
+#define GL_VERTEX_ATTRIB_ARRAY_LONG 0x874E
+/* Reuse tokens from ARB_arrays_of_arrays (none, GLSL only) */
+/* Reuse tokens from ARB_fragment_layer_viewport (none, GLSL only) */
+/* Reuse tokens from ARB_shader_image_size (none, GLSL only) */
+/* Reuse tokens from ARB_ES3_compatibility */
+/* reuse GL_COMPRESSED_RGB8_ETC2 */
+/* reuse GL_COMPRESSED_SRGB8_ETC2 */
+/* reuse GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 */
+/* reuse GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 */
+/* reuse GL_COMPRESSED_RGBA8_ETC2_EAC */
+/* reuse GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC */
+/* reuse GL_COMPRESSED_R11_EAC */
+/* reuse GL_COMPRESSED_SIGNED_R11_EAC */
+/* reuse GL_COMPRESSED_RG11_EAC */
+/* reuse GL_COMPRESSED_SIGNED_RG11_EAC */
+/* reuse GL_PRIMITIVE_RESTART_FIXED_INDEX */
+/* reuse GL_ANY_SAMPLES_PASSED_CONSERVATIVE */
+/* reuse GL_MAX_ELEMENT_INDEX */
+/* Reuse tokens from ARB_clear_buffer_object (none) */
+/* Reuse tokens from ARB_compute_shader */
+/* reuse GL_COMPUTE_SHADER */
+/* reuse GL_MAX_COMPUTE_UNIFORM_BLOCKS */
+/* reuse GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS */
+/* reuse GL_MAX_COMPUTE_IMAGE_UNIFORMS */
+/* reuse GL_MAX_COMPUTE_SHARED_MEMORY_SIZE */
+/* reuse GL_MAX_COMPUTE_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS */
+/* reuse GL_MAX_COMPUTE_ATOMIC_COUNTERS */
+/* reuse GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS */
+/* reuse GL_MAX_COMPUTE_LOCAL_INVOCATIONS */
+/* reuse GL_MAX_COMPUTE_WORK_GROUP_COUNT */
+/* reuse GL_MAX_COMPUTE_WORK_GROUP_SIZE */
+/* reuse GL_COMPUTE_LOCAL_WORK_SIZE */
+/* reuse GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER */
+/* reuse GL_DISPATCH_INDIRECT_BUFFER */
+/* reuse GL_DISPATCH_INDIRECT_BUFFER_BINDING */
+/* Reuse tokens from ARB_copy_image (none) */
+/* Reuse tokens from KHR_debug */
+/* reuse GL_DEBUG_OUTPUT_SYNCHRONOUS */
+/* reuse GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH */
+/* reuse GL_DEBUG_CALLBACK_FUNCTION */
+/* reuse GL_DEBUG_CALLBACK_USER_PARAM */
+/* reuse GL_DEBUG_SOURCE_API */
+/* reuse GL_DEBUG_SOURCE_WINDOW_SYSTEM */
+/* reuse GL_DEBUG_SOURCE_SHADER_COMPILER */
+/* reuse GL_DEBUG_SOURCE_THIRD_PARTY */
+/* reuse GL_DEBUG_SOURCE_APPLICATION */
+/* reuse GL_DEBUG_SOURCE_OTHER */
+/* reuse GL_DEBUG_TYPE_ERROR */
+/* reuse GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR */
+/* reuse GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR */
+/* reuse GL_DEBUG_TYPE_PORTABILITY */
+/* reuse GL_DEBUG_TYPE_PERFORMANCE */
+/* reuse GL_DEBUG_TYPE_OTHER */
+/* reuse GL_MAX_DEBUG_MESSAGE_LENGTH */
+/* reuse GL_MAX_DEBUG_LOGGED_MESSAGES */
+/* reuse GL_DEBUG_LOGGED_MESSAGES */
+/* reuse GL_DEBUG_SEVERITY_HIGH */
+/* reuse GL_DEBUG_SEVERITY_MEDIUM */
+/* reuse GL_DEBUG_SEVERITY_LOW */
+/* reuse GL_DEBUG_TYPE_MARKER */
+/* reuse GL_DEBUG_TYPE_PUSH_GROUP */
+/* reuse GL_DEBUG_TYPE_POP_GROUP */
+/* reuse GL_DEBUG_SEVERITY_NOTIFICATION */
+/* reuse GL_MAX_DEBUG_GROUP_STACK_DEPTH */
+/* reuse GL_DEBUG_GROUP_STACK_DEPTH */
+/* reuse GL_BUFFER */
+/* reuse GL_SHADER */
+/* reuse GL_PROGRAM */
+/* reuse GL_QUERY */
+/* reuse GL_PROGRAM_PIPELINE */
+/* reuse GL_SAMPLER */
+/* reuse GL_DISPLAY_LIST */
+/* reuse GL_MAX_LABEL_LENGTH */
+/* reuse GL_DEBUG_OUTPUT */
+/* reuse GL_CONTEXT_FLAG_DEBUG_BIT */
+/* reuse GL_STACK_UNDERFLOW */
+/* reuse GL_STACK_OVERFLOW */
+/* Reuse tokens from ARB_explicit_uniform_location */
+/* reuse GL_MAX_UNIFORM_LOCATIONS */
+/* Reuse tokens from ARB_framebuffer_no_attachments */
+/* reuse GL_FRAMEBUFFER_DEFAULT_WIDTH */
+/* reuse GL_FRAMEBUFFER_DEFAULT_HEIGHT */
+/* reuse GL_FRAMEBUFFER_DEFAULT_LAYERS */
+/* reuse GL_FRAMEBUFFER_DEFAULT_SAMPLES */
+/* reuse GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS */
+/* reuse GL_MAX_FRAMEBUFFER_WIDTH */
+/* reuse GL_MAX_FRAMEBUFFER_HEIGHT */
+/* reuse GL_MAX_FRAMEBUFFER_LAYERS */
+/* reuse GL_MAX_FRAMEBUFFER_SAMPLES */
+/* Reuse tokens from ARB_internalformat_query2 */
+/* reuse GL_INTERNALFORMAT_SUPPORTED */
+/* reuse GL_INTERNALFORMAT_PREFERRED */
+/* reuse GL_INTERNALFORMAT_RED_SIZE */
+/* reuse GL_INTERNALFORMAT_GREEN_SIZE */
+/* reuse GL_INTERNALFORMAT_BLUE_SIZE */
+/* reuse GL_INTERNALFORMAT_ALPHA_SIZE */
+/* reuse GL_INTERNALFORMAT_DEPTH_SIZE */
+/* reuse GL_INTERNALFORMAT_STENCIL_SIZE */
+/* reuse GL_INTERNALFORMAT_SHARED_SIZE */
+/* reuse GL_INTERNALFORMAT_RED_TYPE */
+/* reuse GL_INTERNALFORMAT_GREEN_TYPE */
+/* reuse GL_INTERNALFORMAT_BLUE_TYPE */
+/* reuse GL_INTERNALFORMAT_ALPHA_TYPE */
+/* reuse GL_INTERNALFORMAT_DEPTH_TYPE */
+/* reuse GL_INTERNALFORMAT_STENCIL_TYPE */
+/* reuse GL_MAX_WIDTH */
+/* reuse GL_MAX_HEIGHT */
+/* reuse GL_MAX_DEPTH */
+/* reuse GL_MAX_LAYERS */
+/* reuse GL_MAX_COMBINED_DIMENSIONS */
+/* reuse GL_COLOR_COMPONENTS */
+/* reuse GL_DEPTH_COMPONENTS */
+/* reuse GL_STENCIL_COMPONENTS */
+/* reuse GL_COLOR_RENDERABLE */
+/* reuse GL_DEPTH_RENDERABLE */
+/* reuse GL_STENCIL_RENDERABLE */
+/* reuse GL_FRAMEBUFFER_RENDERABLE */
+/* reuse GL_FRAMEBUFFER_RENDERABLE_LAYERED */
+/* reuse GL_FRAMEBUFFER_BLEND */
+/* reuse GL_READ_PIXELS */
+/* reuse GL_READ_PIXELS_FORMAT */
+/* reuse GL_READ_PIXELS_TYPE */
+/* reuse GL_TEXTURE_IMAGE_FORMAT */
+/* reuse GL_TEXTURE_IMAGE_TYPE */
+/* reuse GL_GET_TEXTURE_IMAGE_FORMAT */
+/* reuse GL_GET_TEXTURE_IMAGE_TYPE */
+/* reuse GL_MIPMAP */
+/* reuse GL_MANUAL_GENERATE_MIPMAP */
+/* reuse GL_AUTO_GENERATE_MIPMAP */
+/* reuse GL_COLOR_ENCODING */
+/* reuse GL_SRGB_READ */
+/* reuse GL_SRGB_WRITE */
+/* reuse GL_FILTER */
+/* reuse GL_VERTEX_TEXTURE */
+/* reuse GL_TESS_CONTROL_TEXTURE */
+/* reuse GL_TESS_EVALUATION_TEXTURE */
+/* reuse GL_GEOMETRY_TEXTURE */
+/* reuse GL_FRAGMENT_TEXTURE */
+/* reuse GL_COMPUTE_TEXTURE */
+/* reuse GL_TEXTURE_SHADOW */
+/* reuse GL_TEXTURE_GATHER */
+/* reuse GL_TEXTURE_GATHER_SHADOW */
+/* reuse GL_SHADER_IMAGE_LOAD */
+/* reuse GL_SHADER_IMAGE_STORE */
+/* reuse GL_SHADER_IMAGE_ATOMIC */
+/* reuse GL_IMAGE_TEXEL_SIZE */
+/* reuse GL_IMAGE_COMPATIBILITY_CLASS */
+/* reuse GL_IMAGE_PIXEL_FORMAT */
+/* reuse GL_IMAGE_PIXEL_TYPE */
+/* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST */
+/* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST */
+/* reuse GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE */
+/* reuse GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE */
+/* reuse GL_TEXTURE_COMPRESSED_BLOCK_WIDTH */
+/* reuse GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT */
+/* reuse GL_TEXTURE_COMPRESSED_BLOCK_SIZE */
+/* reuse GL_CLEAR_BUFFER */
+/* reuse GL_TEXTURE_VIEW */
+/* reuse GL_VIEW_COMPATIBILITY_CLASS */
+/* reuse GL_FULL_SUPPORT */
+/* reuse GL_CAVEAT_SUPPORT */
+/* reuse GL_IMAGE_CLASS_4_X_32 */
+/* reuse GL_IMAGE_CLASS_2_X_32 */
+/* reuse GL_IMAGE_CLASS_1_X_32 */
+/* reuse GL_IMAGE_CLASS_4_X_16 */
+/* reuse GL_IMAGE_CLASS_2_X_16 */
+/* reuse GL_IMAGE_CLASS_1_X_16 */
+/* reuse GL_IMAGE_CLASS_4_X_8 */
+/* reuse GL_IMAGE_CLASS_2_X_8 */
+/* reuse GL_IMAGE_CLASS_1_X_8 */
+/* reuse GL_IMAGE_CLASS_11_11_10 */
+/* reuse GL_IMAGE_CLASS_10_10_10_2 */
+/* reuse GL_VIEW_CLASS_128_BITS */
+/* reuse GL_VIEW_CLASS_96_BITS */
+/* reuse GL_VIEW_CLASS_64_BITS */
+/* reuse GL_VIEW_CLASS_48_BITS */
+/* reuse GL_VIEW_CLASS_32_BITS */
+/* reuse GL_VIEW_CLASS_24_BITS */
+/* reuse GL_VIEW_CLASS_16_BITS */
+/* reuse GL_VIEW_CLASS_8_BITS */
+/* reuse GL_VIEW_CLASS_S3TC_DXT1_RGB */
+/* reuse GL_VIEW_CLASS_S3TC_DXT1_RGBA */
+/* reuse GL_VIEW_CLASS_S3TC_DXT3_RGBA */
+/* reuse GL_VIEW_CLASS_S3TC_DXT5_RGBA */
+/* reuse GL_VIEW_CLASS_RGTC1_RED */
+/* reuse GL_VIEW_CLASS_RGTC2_RG */
+/* reuse GL_VIEW_CLASS_BPTC_UNORM */
+/* reuse GL_VIEW_CLASS_BPTC_FLOAT */
+/* Reuse tokens from ARB_invalidate_subdata (none) */
+/* Reuse tokens from ARB_multi_draw_indirect (none) */
+/* Reuse tokens from ARB_program_interface_query */
+/* reuse GL_UNIFORM */
+/* reuse GL_UNIFORM_BLOCK */
+/* reuse GL_PROGRAM_INPUT */
+/* reuse GL_PROGRAM_OUTPUT */
+/* reuse GL_BUFFER_VARIABLE */
+/* reuse GL_SHADER_STORAGE_BLOCK */
+/* reuse GL_VERTEX_SUBROUTINE */
+/* reuse GL_TESS_CONTROL_SUBROUTINE */
+/* reuse GL_TESS_EVALUATION_SUBROUTINE */
+/* reuse GL_GEOMETRY_SUBROUTINE */
+/* reuse GL_FRAGMENT_SUBROUTINE */
+/* reuse GL_COMPUTE_SUBROUTINE */
+/* reuse GL_VERTEX_SUBROUTINE_UNIFORM */
+/* reuse GL_TESS_CONTROL_SUBROUTINE_UNIFORM */
+/* reuse GL_TESS_EVALUATION_SUBROUTINE_UNIFORM */
+/* reuse GL_GEOMETRY_SUBROUTINE_UNIFORM */
+/* reuse GL_FRAGMENT_SUBROUTINE_UNIFORM */
+/* reuse GL_COMPUTE_SUBROUTINE_UNIFORM */
+/* reuse GL_TRANSFORM_FEEDBACK_VARYING */
+/* reuse GL_ACTIVE_RESOURCES */
+/* reuse GL_MAX_NAME_LENGTH */
+/* reuse GL_MAX_NUM_ACTIVE_VARIABLES */
+/* reuse GL_MAX_NUM_COMPATIBLE_SUBROUTINES */
+/* reuse GL_NAME_LENGTH */
+/* reuse GL_TYPE */
+/* reuse GL_ARRAY_SIZE */
+/* reuse GL_OFFSET */
+/* reuse GL_BLOCK_INDEX */
+/* reuse GL_ARRAY_STRIDE */
+/* reuse GL_MATRIX_STRIDE */
+/* reuse GL_IS_ROW_MAJOR */
+/* reuse GL_ATOMIC_COUNTER_BUFFER_INDEX */
+/* reuse GL_BUFFER_BINDING */
+/* reuse GL_BUFFER_DATA_SIZE */
+/* reuse GL_NUM_ACTIVE_VARIABLES */
+/* reuse GL_ACTIVE_VARIABLES */
+/* reuse GL_REFERENCED_BY_VERTEX_SHADER */
+/* reuse GL_REFERENCED_BY_TESS_CONTROL_SHADER */
+/* reuse GL_REFERENCED_BY_TESS_EVALUATION_SHADER */
+/* reuse GL_REFERENCED_BY_GEOMETRY_SHADER */
+/* reuse GL_REFERENCED_BY_FRAGMENT_SHADER */
+/* reuse GL_REFERENCED_BY_COMPUTE_SHADER */
+/* reuse GL_TOP_LEVEL_ARRAY_SIZE */
+/* reuse GL_TOP_LEVEL_ARRAY_STRIDE */
+/* reuse GL_LOCATION */
+/* reuse GL_LOCATION_INDEX */
+/* reuse GL_IS_PER_PATCH */
+/* Reuse tokens from ARB_robust_buffer_access_behavior (none) */
+/* Reuse tokens from ARB_shader_storage_buffer_object */
+/* reuse GL_SHADER_STORAGE_BUFFER */
+/* reuse GL_SHADER_STORAGE_BUFFER_BINDING */
+/* reuse GL_SHADER_STORAGE_BUFFER_START */
+/* reuse GL_SHADER_STORAGE_BUFFER_SIZE */
+/* reuse GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS */
+/* reuse GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS */
+/* reuse GL_MAX_SHADER_STORAGE_BLOCK_SIZE */
+/* reuse GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT */
+/* reuse GL_SHADER_STORAGE_BARRIER_BIT */
+/* reuse GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES */
+/* Reuse tokens from ARB_stencil_texturing */
+/* reuse GL_DEPTH_STENCIL_TEXTURE_MODE */
+/* Reuse tokens from ARB_texture_buffer_range */
+/* reuse GL_TEXTURE_BUFFER_OFFSET */
+/* reuse GL_TEXTURE_BUFFER_SIZE */
+/* reuse GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT */
+/* Reuse tokens from ARB_texture_query_levels (none) */
+/* Reuse tokens from ARB_texture_storage_multisample (none) */
+/* Reuse tokens from ARB_texture_view */
+/* reuse GL_TEXTURE_VIEW_MIN_LEVEL */
+/* reuse GL_TEXTURE_VIEW_NUM_LEVELS */
+/* reuse GL_TEXTURE_VIEW_MIN_LAYER */
+/* reuse GL_TEXTURE_VIEW_NUM_LAYERS */
+/* reuse GL_TEXTURE_IMMUTABLE_LEVELS */
+/* Reuse tokens from ARB_vertex_attrib_binding */
+/* reuse GL_VERTEX_ATTRIB_BINDING */
+/* reuse GL_VERTEX_ATTRIB_RELATIVE_OFFSET */
+/* reuse GL_VERTEX_BINDING_DIVISOR */
+/* reuse GL_VERTEX_BINDING_OFFSET */
+/* reuse GL_VERTEX_BINDING_STRIDE */
+/* reuse GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET */
+/* reuse GL_MAX_VERTEX_ATTRIB_BINDINGS */
+#endif
+
+#ifndef GL_ARB_depth_buffer_float
+#define GL_DEPTH_COMPONENT32F 0x8CAC
+#define GL_DEPTH32F_STENCIL8 0x8CAD
+#define GL_FLOAT_32_UNSIGNED_INT_24_8_REV 0x8DAD
+#endif
+
+#ifndef GL_ARB_framebuffer_object
+#define GL_INVALID_FRAMEBUFFER_OPERATION 0x0506
+#define GL_FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING 0x8210
+#define GL_FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE 0x8211
+#define GL_FRAMEBUFFER_ATTACHMENT_RED_SIZE 0x8212
+#define GL_FRAMEBUFFER_ATTACHMENT_GREEN_SIZE 0x8213
+#define GL_FRAMEBUFFER_ATTACHMENT_BLUE_SIZE 0x8214
+#define GL_FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE 0x8215
+#define GL_FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE 0x8216
+#define GL_FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE 0x8217
+#define GL_FRAMEBUFFER_DEFAULT 0x8218
+#define GL_FRAMEBUFFER_UNDEFINED 0x8219
+#define GL_DEPTH_STENCIL_ATTACHMENT 0x821A
+#define GL_MAX_RENDERBUFFER_SIZE 0x84E8
+#define GL_DEPTH_STENCIL 0x84F9
+#define GL_UNSIGNED_INT_24_8 0x84FA
+#define GL_DEPTH24_STENCIL8 0x88F0
+#define GL_TEXTURE_STENCIL_SIZE 0x88F1
+#define GL_TEXTURE_RED_TYPE 0x8C10
+#define GL_TEXTURE_GREEN_TYPE 0x8C11
+#define GL_TEXTURE_BLUE_TYPE 0x8C12
+#define GL_TEXTURE_ALPHA_TYPE 0x8C13
+#define GL_TEXTURE_DEPTH_TYPE 0x8C16
+#define GL_UNSIGNED_NORMALIZED 0x8C17
+#define GL_FRAMEBUFFER_BINDING 0x8CA6
+#define GL_DRAW_FRAMEBUFFER_BINDING GL_FRAMEBUFFER_BINDING
+#define GL_RENDERBUFFER_BINDING 0x8CA7
+#define GL_READ_FRAMEBUFFER 0x8CA8
+#define GL_DRAW_FRAMEBUFFER 0x8CA9
+#define GL_READ_FRAMEBUFFER_BINDING 0x8CAA
+#define GL_RENDERBUFFER_SAMPLES 0x8CAB
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE 0x8CD0
+#define GL_FRAMEBUFFER_ATTACHMENT_OBJECT_NAME 0x8CD1
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL 0x8CD2
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE 0x8CD3
+#define GL_FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER 0x8CD4
+#define GL_FRAMEBUFFER_COMPLETE 0x8CD5
+#define GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT 0x8CD6
+#define GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT 0x8CD7
+#define GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER 0x8CDB
+#define GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER 0x8CDC
+#define GL_FRAMEBUFFER_UNSUPPORTED 0x8CDD
+#define GL_MAX_COLOR_ATTACHMENTS 0x8CDF
+#define GL_COLOR_ATTACHMENT0 0x8CE0
+#define GL_COLOR_ATTACHMENT1 0x8CE1
+#define GL_COLOR_ATTACHMENT2 0x8CE2
+#define GL_COLOR_ATTACHMENT3 0x8CE3
+#define GL_COLOR_ATTACHMENT4 0x8CE4
+#define GL_COLOR_ATTACHMENT5 0x8CE5
+#define GL_COLOR_ATTACHMENT6 0x8CE6
+#define GL_COLOR_ATTACHMENT7 0x8CE7
+#define GL_COLOR_ATTACHMENT8 0x8CE8
+#define GL_COLOR_ATTACHMENT9 0x8CE9
+#define GL_COLOR_ATTACHMENT10 0x8CEA
+#define GL_COLOR_ATTACHMENT11 0x8CEB
+#define GL_COLOR_ATTACHMENT12 0x8CEC
+#define GL_COLOR_ATTACHMENT13 0x8CED
+#define GL_COLOR_ATTACHMENT14 0x8CEE
+#define GL_COLOR_ATTACHMENT15 0x8CEF
+#define GL_DEPTH_ATTACHMENT 0x8D00
+#define GL_STENCIL_ATTACHMENT 0x8D20
+#define GL_FRAMEBUFFER 0x8D40
+#define GL_RENDERBUFFER 0x8D41
+#define GL_RENDERBUFFER_WIDTH 0x8D42
+#define GL_RENDERBUFFER_HEIGHT 0x8D43
+#define GL_RENDERBUFFER_INTERNAL_FORMAT 0x8D44
+#define GL_STENCIL_INDEX1 0x8D46
+#define GL_STENCIL_INDEX4 0x8D47
+#define GL_STENCIL_INDEX8 0x8D48
+#define GL_STENCIL_INDEX16 0x8D49
+#define GL_RENDERBUFFER_RED_SIZE 0x8D50
+#define GL_RENDERBUFFER_GREEN_SIZE 0x8D51
+#define GL_RENDERBUFFER_BLUE_SIZE 0x8D52
+#define GL_RENDERBUFFER_ALPHA_SIZE 0x8D53
+#define GL_RENDERBUFFER_DEPTH_SIZE 0x8D54
+#define GL_RENDERBUFFER_STENCIL_SIZE 0x8D55
+#define GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE 0x8D56
+#define GL_MAX_SAMPLES 0x8D57
+#endif
+
+#ifndef GL_ARB_framebuffer_sRGB
+#define GL_FRAMEBUFFER_SRGB 0x8DB9
+#endif
+
+#ifndef GL_ARB_half_float_vertex
+#define GL_HALF_FLOAT 0x140B
+#endif
+
+#ifndef GL_ARB_map_buffer_range
+#define GL_MAP_READ_BIT 0x0001
+#define GL_MAP_WRITE_BIT 0x0002
+#define GL_MAP_INVALIDATE_RANGE_BIT 0x0004
+#define GL_MAP_INVALIDATE_BUFFER_BIT 0x0008
+#define GL_MAP_FLUSH_EXPLICIT_BIT 0x0010
+#define GL_MAP_UNSYNCHRONIZED_BIT 0x0020
+#endif
+
+#ifndef GL_ARB_texture_compression_rgtc
+#define GL_COMPRESSED_RED_RGTC1 0x8DBB
+#define GL_COMPRESSED_SIGNED_RED_RGTC1 0x8DBC
+#define GL_COMPRESSED_RG_RGTC2 0x8DBD
+#define GL_COMPRESSED_SIGNED_RG_RGTC2 0x8DBE
+#endif
+
+#ifndef GL_ARB_texture_rg
+#define GL_RG 0x8227
+#define GL_RG_INTEGER 0x8228
+#define GL_R8 0x8229
+#define GL_R16 0x822A
+#define GL_RG8 0x822B
+#define GL_RG16 0x822C
+#define GL_R16F 0x822D
+#define GL_R32F 0x822E
+#define GL_RG16F 0x822F
+#define GL_RG32F 0x8230
+#define GL_R8I 0x8231
+#define GL_R8UI 0x8232
+#define GL_R16I 0x8233
+#define GL_R16UI 0x8234
+#define GL_R32I 0x8235
+#define GL_R32UI 0x8236
+#define GL_RG8I 0x8237
+#define GL_RG8UI 0x8238
+#define GL_RG16I 0x8239
+#define GL_RG16UI 0x823A
+#define GL_RG32I 0x823B
+#define GL_RG32UI 0x823C
+#endif
+
+#ifndef GL_ARB_vertex_array_object
+#define GL_VERTEX_ARRAY_BINDING 0x85B5
+#endif
+
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_UNIFORM_BUFFER 0x8A11
+#define GL_UNIFORM_BUFFER_BINDING 0x8A28
+#define GL_UNIFORM_BUFFER_START 0x8A29
+#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
+#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
+#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
+#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
+#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
+#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
+#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
+#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
+#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
+#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
+#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
+#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
+#define GL_ACTIVE_UNIFORM_BLOCKS 0x8A36
+#define GL_UNIFORM_TYPE 0x8A37
+#define GL_UNIFORM_SIZE 0x8A38
+#define GL_UNIFORM_NAME_LENGTH 0x8A39
+#define GL_UNIFORM_BLOCK_INDEX 0x8A3A
+#define GL_UNIFORM_OFFSET 0x8A3B
+#define GL_UNIFORM_ARRAY_STRIDE 0x8A3C
+#define GL_UNIFORM_MATRIX_STRIDE 0x8A3D
+#define GL_UNIFORM_IS_ROW_MAJOR 0x8A3E
+#define GL_UNIFORM_BLOCK_BINDING 0x8A3F
+#define GL_UNIFORM_BLOCK_DATA_SIZE 0x8A40
+#define GL_UNIFORM_BLOCK_NAME_LENGTH 0x8A41
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
+#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
+#define GL_INVALID_INDEX 0xFFFFFFFFu
+#endif
+
+#ifndef GL_ARB_copy_buffer
+#define GL_COPY_READ_BUFFER_BINDING 0x8F36
+#define GL_COPY_READ_BUFFER GL_COPY_READ_BUFFER_BINDING
+#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
+#define GL_COPY_WRITE_BUFFER GL_COPY_WRITE_BUFFER_BINDING
+#endif
+
+#ifndef GL_ARB_depth_clamp
+#define GL_DEPTH_CLAMP 0x864F
+#endif
+
+#ifndef GL_ARB_draw_elements_base_vertex
+#endif
+
+#ifndef GL_ARB_fragment_coord_conventions
+#endif
+
+#ifndef GL_ARB_provoking_vertex
+#define GL_QUADS_FOLLOW_PROVOKING_VERTEX_CONVENTION 0x8E4C
+#define GL_FIRST_VERTEX_CONVENTION 0x8E4D
+#define GL_LAST_VERTEX_CONVENTION 0x8E4E
+#define GL_PROVOKING_VERTEX 0x8E4F
+#endif
+
+#ifndef GL_ARB_seamless_cube_map
+#define GL_TEXTURE_CUBE_MAP_SEAMLESS 0x884F
+#endif
+
+#ifndef GL_ARB_sync
+#define GL_MAX_SERVER_WAIT_TIMEOUT 0x9111
+#define GL_OBJECT_TYPE 0x9112
+#define GL_SYNC_CONDITION 0x9113
+#define GL_SYNC_STATUS 0x9114
+#define GL_SYNC_FLAGS 0x9115
+#define GL_SYNC_FENCE 0x9116
+#define GL_SYNC_GPU_COMMANDS_COMPLETE 0x9117
+#define GL_UNSIGNALED 0x9118
+#define GL_SIGNALED 0x9119
+#define GL_ALREADY_SIGNALED 0x911A
+#define GL_TIMEOUT_EXPIRED 0x911B
+#define GL_CONDITION_SATISFIED 0x911C
+#define GL_WAIT_FAILED 0x911D
+#define GL_SYNC_FLUSH_COMMANDS_BIT 0x00000001
+#define GL_TIMEOUT_IGNORED 0xFFFFFFFFFFFFFFFFull
+#endif
+
+#ifndef GL_ARB_texture_multisample
+#define GL_SAMPLE_POSITION 0x8E50
+#define GL_SAMPLE_MASK 0x8E51
+#define GL_SAMPLE_MASK_VALUE 0x8E52
+#define GL_MAX_SAMPLE_MASK_WORDS 0x8E59
+#define GL_TEXTURE_2D_MULTISAMPLE 0x9100
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE 0x9101
+#define GL_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9102
+#define GL_PROXY_TEXTURE_2D_MULTISAMPLE_ARRAY 0x9103
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE 0x9104
+#define GL_TEXTURE_BINDING_2D_MULTISAMPLE_ARRAY 0x9105
+#define GL_TEXTURE_SAMPLES 0x9106
+#define GL_TEXTURE_FIXED_SAMPLE_LOCATIONS 0x9107
+#define GL_SAMPLER_2D_MULTISAMPLE 0x9108
+#define GL_INT_SAMPLER_2D_MULTISAMPLE 0x9109
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE 0x910A
+#define GL_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910B
+#define GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910C
+#define GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY 0x910D
+#define GL_MAX_COLOR_TEXTURE_SAMPLES 0x910E
+#define GL_MAX_DEPTH_TEXTURE_SAMPLES 0x910F
+#define GL_MAX_INTEGER_SAMPLES 0x9110
+#endif
+
+#ifndef GL_ARB_vertex_array_bgra
+/* reuse GL_BGRA */
+#endif
+
+#ifndef GL_ARB_draw_buffers_blend
+#endif
+
+#ifndef GL_ARB_sample_shading
+#define GL_SAMPLE_SHADING_ARB 0x8C36
+#define GL_MIN_SAMPLE_SHADING_VALUE_ARB 0x8C37
+#endif
+
+#ifndef GL_ARB_texture_cube_map_array
+#define GL_TEXTURE_CUBE_MAP_ARRAY_ARB 0x9009
+#define GL_TEXTURE_BINDING_CUBE_MAP_ARRAY_ARB 0x900A
+#define GL_PROXY_TEXTURE_CUBE_MAP_ARRAY_ARB 0x900B
+#define GL_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900C
+#define GL_SAMPLER_CUBE_MAP_ARRAY_SHADOW_ARB 0x900D
+#define GL_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900E
+#define GL_UNSIGNED_INT_SAMPLER_CUBE_MAP_ARRAY_ARB 0x900F
+#endif
+
+#ifndef GL_ARB_texture_gather
+#define GL_MIN_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5E
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_OFFSET_ARB 0x8E5F
+#define GL_MAX_PROGRAM_TEXTURE_GATHER_COMPONENTS_ARB 0x8F9F
+#endif
+
+#ifndef GL_ARB_texture_query_lod
+#endif
+
+#ifndef GL_ARB_shading_language_include
+#define GL_SHADER_INCLUDE_ARB 0x8DAE
+#define GL_NAMED_STRING_LENGTH_ARB 0x8DE9
+#define GL_NAMED_STRING_TYPE_ARB 0x8DEA
+#endif
+
+#ifndef GL_ARB_texture_compression_bptc
+#define GL_COMPRESSED_RGBA_BPTC_UNORM_ARB 0x8E8C
+#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM_ARB 0x8E8D
+#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB 0x8E8E
+#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_ARB 0x8E8F
+#endif
+
+#ifndef GL_ARB_blend_func_extended
+#define GL_SRC1_COLOR 0x88F9
+/* reuse GL_SRC1_ALPHA */
+#define GL_ONE_MINUS_SRC1_COLOR 0x88FA
+#define GL_ONE_MINUS_SRC1_ALPHA 0x88FB
+#define GL_MAX_DUAL_SOURCE_DRAW_BUFFERS 0x88FC
+#endif
+
+#ifndef GL_ARB_explicit_attrib_location
+#endif
+
+#ifndef GL_ARB_occlusion_query2
+#define GL_ANY_SAMPLES_PASSED 0x8C2F
+#endif
+
+#ifndef GL_ARB_sampler_objects
+#define GL_SAMPLER_BINDING 0x8919
+#endif
+
+#ifndef GL_ARB_shader_bit_encoding
+#endif
+
+#ifndef GL_ARB_texture_rgb10_a2ui
+#define GL_RGB10_A2UI 0x906F
+#endif
+
+#ifndef GL_ARB_texture_swizzle
+#define GL_TEXTURE_SWIZZLE_R 0x8E42
+#define GL_TEXTURE_SWIZZLE_G 0x8E43
+#define GL_TEXTURE_SWIZZLE_B 0x8E44
+#define GL_TEXTURE_SWIZZLE_A 0x8E45
+#define GL_TEXTURE_SWIZZLE_RGBA 0x8E46
+#endif
+
+#ifndef GL_ARB_timer_query
+#define GL_TIME_ELAPSED 0x88BF
+#define GL_TIMESTAMP 0x8E28
+#endif
+
+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
+/* reuse GL_UNSIGNED_INT_2_10_10_10_REV */
+#define GL_INT_2_10_10_10_REV 0x8D9F
+#endif
+
+#ifndef GL_ARB_draw_indirect
+#define GL_DRAW_INDIRECT_BUFFER 0x8F3F
+#define GL_DRAW_INDIRECT_BUFFER_BINDING 0x8F43
+#endif
+
+#ifndef GL_ARB_gpu_shader5
+#define GL_GEOMETRY_SHADER_INVOCATIONS 0x887F
+#define GL_MAX_GEOMETRY_SHADER_INVOCATIONS 0x8E5A
+#define GL_MIN_FRAGMENT_INTERPOLATION_OFFSET 0x8E5B
+#define GL_MAX_FRAGMENT_INTERPOLATION_OFFSET 0x8E5C
+#define GL_FRAGMENT_INTERPOLATION_OFFSET_BITS 0x8E5D
+/* reuse GL_MAX_VERTEX_STREAMS */
+#endif
+
+#ifndef GL_ARB_gpu_shader_fp64
+/* reuse GL_DOUBLE */
+#define GL_DOUBLE_VEC2 0x8FFC
+#define GL_DOUBLE_VEC3 0x8FFD
+#define GL_DOUBLE_VEC4 0x8FFE
+#define GL_DOUBLE_MAT2 0x8F46
+#define GL_DOUBLE_MAT3 0x8F47
+#define GL_DOUBLE_MAT4 0x8F48
+#define GL_DOUBLE_MAT2x3 0x8F49
+#define GL_DOUBLE_MAT2x4 0x8F4A
+#define GL_DOUBLE_MAT3x2 0x8F4B
+#define GL_DOUBLE_MAT3x4 0x8F4C
+#define GL_DOUBLE_MAT4x2 0x8F4D
+#define GL_DOUBLE_MAT4x3 0x8F4E
+#endif
+
+#ifndef GL_ARB_shader_subroutine
+#define GL_ACTIVE_SUBROUTINES 0x8DE5
+#define GL_ACTIVE_SUBROUTINE_UNIFORMS 0x8DE6
+#define GL_ACTIVE_SUBROUTINE_UNIFORM_LOCATIONS 0x8E47
+#define GL_ACTIVE_SUBROUTINE_MAX_LENGTH 0x8E48
+#define GL_ACTIVE_SUBROUTINE_UNIFORM_MAX_LENGTH 0x8E49
+#define GL_MAX_SUBROUTINES 0x8DE7
+#define GL_MAX_SUBROUTINE_UNIFORM_LOCATIONS 0x8DE8
+#define GL_NUM_COMPATIBLE_SUBROUTINES 0x8E4A
+#define GL_COMPATIBLE_SUBROUTINES 0x8E4B
+/* reuse GL_UNIFORM_SIZE */
+/* reuse GL_UNIFORM_NAME_LENGTH */
+#endif
+
+#ifndef GL_ARB_tessellation_shader
+#define GL_PATCHES 0x000E
+#define GL_PATCH_VERTICES 0x8E72
+#define GL_PATCH_DEFAULT_INNER_LEVEL 0x8E73
+#define GL_PATCH_DEFAULT_OUTER_LEVEL 0x8E74
+#define GL_TESS_CONTROL_OUTPUT_VERTICES 0x8E75
+#define GL_TESS_GEN_MODE 0x8E76
+#define GL_TESS_GEN_SPACING 0x8E77
+#define GL_TESS_GEN_VERTEX_ORDER 0x8E78
+#define GL_TESS_GEN_POINT_MODE 0x8E79
+/* reuse GL_TRIANGLES */
+/* reuse GL_QUADS */
+#define GL_ISOLINES 0x8E7A
+/* reuse GL_EQUAL */
+#define GL_FRACTIONAL_ODD 0x8E7B
+#define GL_FRACTIONAL_EVEN 0x8E7C
+/* reuse GL_CCW */
+/* reuse GL_CW */
+#define GL_MAX_PATCH_VERTICES 0x8E7D
+#define GL_MAX_TESS_GEN_LEVEL 0x8E7E
+#define GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E7F
+#define GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E80
+#define GL_MAX_TESS_CONTROL_TEXTURE_IMAGE_UNITS 0x8E81
+#define GL_MAX_TESS_EVALUATION_TEXTURE_IMAGE_UNITS 0x8E82
+#define GL_MAX_TESS_CONTROL_OUTPUT_COMPONENTS 0x8E83
+#define GL_MAX_TESS_PATCH_COMPONENTS 0x8E84
+#define GL_MAX_TESS_CONTROL_TOTAL_OUTPUT_COMPONENTS 0x8E85
+#define GL_MAX_TESS_EVALUATION_OUTPUT_COMPONENTS 0x8E86
+#define GL_MAX_TESS_CONTROL_UNIFORM_BLOCKS 0x8E89
+#define GL_MAX_TESS_EVALUATION_UNIFORM_BLOCKS 0x8E8A
+#define GL_MAX_TESS_CONTROL_INPUT_COMPONENTS 0x886C
+#define GL_MAX_TESS_EVALUATION_INPUT_COMPONENTS 0x886D
+#define GL_MAX_COMBINED_TESS_CONTROL_UNIFORM_COMPONENTS 0x8E1E
+#define GL_MAX_COMBINED_TESS_EVALUATION_UNIFORM_COMPONENTS 0x8E1F
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_CONTROL_SHADER 0x84F0
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_TESS_EVALUATION_SHADER 0x84F1
+#define GL_TESS_EVALUATION_SHADER 0x8E87
+#define GL_TESS_CONTROL_SHADER 0x8E88
+#endif
+
+#ifndef GL_ARB_texture_buffer_object_rgb32
+/* reuse GL_RGB32F */
+/* reuse GL_RGB32UI */
+/* reuse GL_RGB32I */
+#endif
+
+#ifndef GL_ARB_transform_feedback2
+#define GL_TRANSFORM_FEEDBACK 0x8E22
+#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
+#define GL_TRANSFORM_FEEDBACK_BUFFER_PAUSED GL_TRANSFORM_FEEDBACK_PAUSED
+#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
+#define GL_TRANSFORM_FEEDBACK_BUFFER_ACTIVE GL_TRANSFORM_FEEDBACK_ACTIVE
+#define GL_TRANSFORM_FEEDBACK_BINDING 0x8E25
+#endif
+
+#ifndef GL_ARB_transform_feedback3
+#define GL_MAX_TRANSFORM_FEEDBACK_BUFFERS 0x8E70
+#define GL_MAX_VERTEX_STREAMS 0x8E71
+#endif
+
+#ifndef GL_ARB_ES2_compatibility
+#define GL_FIXED 0x140C
+#define GL_IMPLEMENTATION_COLOR_READ_TYPE 0x8B9A
+#define GL_IMPLEMENTATION_COLOR_READ_FORMAT 0x8B9B
+#define GL_LOW_FLOAT 0x8DF0
+#define GL_MEDIUM_FLOAT 0x8DF1
+#define GL_HIGH_FLOAT 0x8DF2
+#define GL_LOW_INT 0x8DF3
+#define GL_MEDIUM_INT 0x8DF4
+#define GL_HIGH_INT 0x8DF5
+#define GL_SHADER_COMPILER 0x8DFA
+#define GL_SHADER_BINARY_FORMATS 0x8DF8
+#define GL_NUM_SHADER_BINARY_FORMATS 0x8DF9
+#define GL_MAX_VERTEX_UNIFORM_VECTORS 0x8DFB
+#define GL_MAX_VARYING_VECTORS 0x8DFC
+#define GL_MAX_FRAGMENT_UNIFORM_VECTORS 0x8DFD
+#define GL_RGB565 0x8D62
+#endif
+
+#ifndef GL_ARB_get_program_binary
+#define GL_PROGRAM_BINARY_RETRIEVABLE_HINT 0x8257
+#define GL_PROGRAM_BINARY_LENGTH 0x8741
+#define GL_NUM_PROGRAM_BINARY_FORMATS 0x87FE
+#define GL_PROGRAM_BINARY_FORMATS 0x87FF
+#endif
+
+#ifndef GL_ARB_separate_shader_objects
+#define GL_VERTEX_SHADER_BIT 0x00000001
+#define GL_FRAGMENT_SHADER_BIT 0x00000002
+#define GL_GEOMETRY_SHADER_BIT 0x00000004
+#define GL_TESS_CONTROL_SHADER_BIT 0x00000008
+#define GL_TESS_EVALUATION_SHADER_BIT 0x00000010
+#define GL_ALL_SHADER_BITS 0xFFFFFFFF
+#define GL_PROGRAM_SEPARABLE 0x8258
+#define GL_ACTIVE_PROGRAM 0x8259
+#define GL_PROGRAM_PIPELINE_BINDING 0x825A
+#endif
+
+#ifndef GL_ARB_shader_precision
+#endif
+
+#ifndef GL_ARB_vertex_attrib_64bit
+/* reuse GL_RGB32I */
+/* reuse GL_DOUBLE_VEC2 */
+/* reuse GL_DOUBLE_VEC3 */
+/* reuse GL_DOUBLE_VEC4 */
+/* reuse GL_DOUBLE_MAT2 */
+/* reuse GL_DOUBLE_MAT3 */
+/* reuse GL_DOUBLE_MAT4 */
+/* reuse GL_DOUBLE_MAT2x3 */
+/* reuse GL_DOUBLE_MAT2x4 */
+/* reuse GL_DOUBLE_MAT3x2 */
+/* reuse GL_DOUBLE_MAT3x4 */
+/* reuse GL_DOUBLE_MAT4x2 */
+/* reuse GL_DOUBLE_MAT4x3 */
+#endif
+
+#ifndef GL_ARB_viewport_array
+/* reuse GL_SCISSOR_BOX */
+/* reuse GL_VIEWPORT */
+/* reuse GL_DEPTH_RANGE */
+/* reuse GL_SCISSOR_TEST */
+#define GL_MAX_VIEWPORTS 0x825B
+#define GL_VIEWPORT_SUBPIXEL_BITS 0x825C
+#define GL_VIEWPORT_BOUNDS_RANGE 0x825D
+#define GL_LAYER_PROVOKING_VERTEX 0x825E
+#define GL_VIEWPORT_INDEX_PROVOKING_VERTEX 0x825F
+#define GL_UNDEFINED_VERTEX 0x8260
+/* reuse GL_FIRST_VERTEX_CONVENTION */
+/* reuse GL_LAST_VERTEX_CONVENTION */
+/* reuse GL_PROVOKING_VERTEX */
+#endif
+
+#ifndef GL_ARB_cl_event
+#define GL_SYNC_CL_EVENT_ARB 0x8240
+#define GL_SYNC_CL_EVENT_COMPLETE_ARB 0x8241
+#endif
+
+#ifndef GL_ARB_debug_output
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS_ARB 0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH_ARB 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION_ARB 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM_ARB 0x8245
+#define GL_DEBUG_SOURCE_API_ARB 0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM_ARB 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER_ARB 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY_ARB 0x8249
+#define GL_DEBUG_SOURCE_APPLICATION_ARB 0x824A
+#define GL_DEBUG_SOURCE_OTHER_ARB 0x824B
+#define GL_DEBUG_TYPE_ERROR_ARB 0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR_ARB 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR_ARB 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY_ARB 0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE_ARB 0x8250
+#define GL_DEBUG_TYPE_OTHER_ARB 0x8251
+#define GL_MAX_DEBUG_MESSAGE_LENGTH_ARB 0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES_ARB 0x9144
+#define GL_DEBUG_LOGGED_MESSAGES_ARB 0x9145
+#define GL_DEBUG_SEVERITY_HIGH_ARB 0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM_ARB 0x9147
+#define GL_DEBUG_SEVERITY_LOW_ARB 0x9148
+#endif
+
+#ifndef GL_ARB_robustness
+/* reuse GL_NO_ERROR */
+#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT_ARB 0x00000004
+#define GL_LOSE_CONTEXT_ON_RESET_ARB 0x8252
+#define GL_GUILTY_CONTEXT_RESET_ARB 0x8253
+#define GL_INNOCENT_CONTEXT_RESET_ARB 0x8254
+#define GL_UNKNOWN_CONTEXT_RESET_ARB 0x8255
+#define GL_RESET_NOTIFICATION_STRATEGY_ARB 0x8256
+#define GL_NO_RESET_NOTIFICATION_ARB 0x8261
+#endif
+
+#ifndef GL_ARB_shader_stencil_export
+#endif
+
+#ifndef GL_ARB_base_instance
+#endif
+
+#ifndef GL_ARB_shading_language_420pack
+#endif
+
+#ifndef GL_ARB_transform_feedback_instanced
+#endif
+
+#ifndef GL_ARB_compressed_texture_pixel_storage
+#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
+#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
+#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
+#define GL_UNPACK_COMPRESSED_BLOCK_SIZE 0x912A
+#define GL_PACK_COMPRESSED_BLOCK_WIDTH 0x912B
+#define GL_PACK_COMPRESSED_BLOCK_HEIGHT 0x912C
+#define GL_PACK_COMPRESSED_BLOCK_DEPTH 0x912D
+#define GL_PACK_COMPRESSED_BLOCK_SIZE 0x912E
+#endif
+
+#ifndef GL_ARB_conservative_depth
+#endif
+
+#ifndef GL_ARB_internalformat_query
+#define GL_NUM_SAMPLE_COUNTS 0x9380
+#endif
+
+#ifndef GL_ARB_map_buffer_alignment
+#define GL_MIN_MAP_BUFFER_ALIGNMENT 0x90BC
+#endif
+
+#ifndef GL_ARB_shader_atomic_counters
+#define GL_ATOMIC_COUNTER_BUFFER 0x92C0
+#define GL_ATOMIC_COUNTER_BUFFER_BINDING 0x92C1
+#define GL_ATOMIC_COUNTER_BUFFER_START 0x92C2
+#define GL_ATOMIC_COUNTER_BUFFER_SIZE 0x92C3
+#define GL_ATOMIC_COUNTER_BUFFER_DATA_SIZE 0x92C4
+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTERS 0x92C5
+#define GL_ATOMIC_COUNTER_BUFFER_ACTIVE_ATOMIC_COUNTER_INDICES 0x92C6
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_VERTEX_SHADER 0x92C7
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_CONTROL_SHADER 0x92C8
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_TESS_EVALUATION_SHADER 0x92C9
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_GEOMETRY_SHADER 0x92CA
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_FRAGMENT_SHADER 0x92CB
+#define GL_MAX_VERTEX_ATOMIC_COUNTER_BUFFERS 0x92CC
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTER_BUFFERS 0x92CD
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTER_BUFFERS 0x92CE
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTER_BUFFERS 0x92CF
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTER_BUFFERS 0x92D0
+#define GL_MAX_COMBINED_ATOMIC_COUNTER_BUFFERS 0x92D1
+#define GL_MAX_VERTEX_ATOMIC_COUNTERS 0x92D2
+#define GL_MAX_TESS_CONTROL_ATOMIC_COUNTERS 0x92D3
+#define GL_MAX_TESS_EVALUATION_ATOMIC_COUNTERS 0x92D4
+#define GL_MAX_GEOMETRY_ATOMIC_COUNTERS 0x92D5
+#define GL_MAX_FRAGMENT_ATOMIC_COUNTERS 0x92D6
+#define GL_MAX_COMBINED_ATOMIC_COUNTERS 0x92D7
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_SIZE 0x92D8
+#define GL_MAX_ATOMIC_COUNTER_BUFFER_BINDINGS 0x92DC
+#define GL_ACTIVE_ATOMIC_COUNTER_BUFFERS 0x92D9
+#define GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX 0x92DA
+#define GL_UNSIGNED_INT_ATOMIC_COUNTER 0x92DB
+#endif
+
+#ifndef GL_ARB_shader_image_load_store
+#define GL_VERTEX_ATTRIB_ARRAY_BARRIER_BIT 0x00000001
+#define GL_ELEMENT_ARRAY_BARRIER_BIT 0x00000002
+#define GL_UNIFORM_BARRIER_BIT 0x00000004
+#define GL_TEXTURE_FETCH_BARRIER_BIT 0x00000008
+#define GL_SHADER_IMAGE_ACCESS_BARRIER_BIT 0x00000020
+#define GL_COMMAND_BARRIER_BIT 0x00000040
+#define GL_PIXEL_BUFFER_BARRIER_BIT 0x00000080
+#define GL_TEXTURE_UPDATE_BARRIER_BIT 0x00000100
+#define GL_BUFFER_UPDATE_BARRIER_BIT 0x00000200
+#define GL_FRAMEBUFFER_BARRIER_BIT 0x00000400
+#define GL_TRANSFORM_FEEDBACK_BARRIER_BIT 0x00000800
+#define GL_ATOMIC_COUNTER_BARRIER_BIT 0x00001000
+#define GL_ALL_BARRIER_BITS 0xFFFFFFFF
+#define GL_MAX_IMAGE_UNITS 0x8F38
+#define GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS 0x8F39
+#define GL_IMAGE_BINDING_NAME 0x8F3A
+#define GL_IMAGE_BINDING_LEVEL 0x8F3B
+#define GL_IMAGE_BINDING_LAYERED 0x8F3C
+#define GL_IMAGE_BINDING_LAYER 0x8F3D
+#define GL_IMAGE_BINDING_ACCESS 0x8F3E
+#define GL_IMAGE_1D 0x904C
+#define GL_IMAGE_2D 0x904D
+#define GL_IMAGE_3D 0x904E
+#define GL_IMAGE_2D_RECT 0x904F
+#define GL_IMAGE_CUBE 0x9050
+#define GL_IMAGE_BUFFER 0x9051
+#define GL_IMAGE_1D_ARRAY 0x9052
+#define GL_IMAGE_2D_ARRAY 0x9053
+#define GL_IMAGE_CUBE_MAP_ARRAY 0x9054
+#define GL_IMAGE_2D_MULTISAMPLE 0x9055
+#define GL_IMAGE_2D_MULTISAMPLE_ARRAY 0x9056
+#define GL_INT_IMAGE_1D 0x9057
+#define GL_INT_IMAGE_2D 0x9058
+#define GL_INT_IMAGE_3D 0x9059
+#define GL_INT_IMAGE_2D_RECT 0x905A
+#define GL_INT_IMAGE_CUBE 0x905B
+#define GL_INT_IMAGE_BUFFER 0x905C
+#define GL_INT_IMAGE_1D_ARRAY 0x905D
+#define GL_INT_IMAGE_2D_ARRAY 0x905E
+#define GL_INT_IMAGE_CUBE_MAP_ARRAY 0x905F
+#define GL_INT_IMAGE_2D_MULTISAMPLE 0x9060
+#define GL_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x9061
+#define GL_UNSIGNED_INT_IMAGE_1D 0x9062
+#define GL_UNSIGNED_INT_IMAGE_2D 0x9063
+#define GL_UNSIGNED_INT_IMAGE_3D 0x9064
+#define GL_UNSIGNED_INT_IMAGE_2D_RECT 0x9065
+#define GL_UNSIGNED_INT_IMAGE_CUBE 0x9066
+#define GL_UNSIGNED_INT_IMAGE_BUFFER 0x9067
+#define GL_UNSIGNED_INT_IMAGE_1D_ARRAY 0x9068
+#define GL_UNSIGNED_INT_IMAGE_2D_ARRAY 0x9069
+#define GL_UNSIGNED_INT_IMAGE_CUBE_MAP_ARRAY 0x906A
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE 0x906B
+#define GL_UNSIGNED_INT_IMAGE_2D_MULTISAMPLE_ARRAY 0x906C
+#define GL_MAX_IMAGE_SAMPLES 0x906D
+#define GL_IMAGE_BINDING_FORMAT 0x906E
+#define GL_IMAGE_FORMAT_COMPATIBILITY_TYPE 0x90C7
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_SIZE 0x90C8
+#define GL_IMAGE_FORMAT_COMPATIBILITY_BY_CLASS 0x90C9
+#define GL_MAX_VERTEX_IMAGE_UNIFORMS 0x90CA
+#define GL_MAX_TESS_CONTROL_IMAGE_UNIFORMS 0x90CB
+#define GL_MAX_TESS_EVALUATION_IMAGE_UNIFORMS 0x90CC
+#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
+#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
+#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
+#endif
+
+#ifndef GL_ARB_shading_language_packing
+#endif
+
+#ifndef GL_ARB_texture_storage
+#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
+#endif
+
+#ifndef GL_KHR_texture_compression_astc_ldr
+#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
+#define GL_COMPRESSED_RGBA_ASTC_5x4_KHR 0x93B1
+#define GL_COMPRESSED_RGBA_ASTC_5x5_KHR 0x93B2
+#define GL_COMPRESSED_RGBA_ASTC_6x5_KHR 0x93B3
+#define GL_COMPRESSED_RGBA_ASTC_6x6_KHR 0x93B4
+#define GL_COMPRESSED_RGBA_ASTC_8x5_KHR 0x93B5
+#define GL_COMPRESSED_RGBA_ASTC_8x6_KHR 0x93B6
+#define GL_COMPRESSED_RGBA_ASTC_8x8_KHR 0x93B7
+#define GL_COMPRESSED_RGBA_ASTC_10x5_KHR 0x93B8
+#define GL_COMPRESSED_RGBA_ASTC_10x6_KHR 0x93B9
+#define GL_COMPRESSED_RGBA_ASTC_10x8_KHR 0x93BA
+#define GL_COMPRESSED_RGBA_ASTC_10x10_KHR 0x93BB
+#define GL_COMPRESSED_RGBA_ASTC_12x10_KHR 0x93BC
+#define GL_COMPRESSED_RGBA_ASTC_12x12_KHR 0x93BD
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR 0x93D0
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR 0x93D1
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR 0x93D2
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR 0x93D3
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR 0x93D4
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR 0x93D5
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR 0x93D6
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR 0x93D7
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR 0x93D8
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR 0x93D9
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR 0x93DA
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR 0x93DB
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR 0x93DC
+#define GL_COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR 0x93DD
+#endif
+
+#ifndef GL_KHR_debug
+#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
+#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
+#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
+#define GL_DEBUG_CALLBACK_USER_PARAM 0x8245
+#define GL_DEBUG_SOURCE_API 0x8246
+#define GL_DEBUG_SOURCE_WINDOW_SYSTEM 0x8247
+#define GL_DEBUG_SOURCE_SHADER_COMPILER 0x8248
+#define GL_DEBUG_SOURCE_THIRD_PARTY 0x8249
+#define GL_DEBUG_SOURCE_APPLICATION 0x824A
+#define GL_DEBUG_SOURCE_OTHER 0x824B
+#define GL_DEBUG_TYPE_ERROR 0x824C
+#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR 0x824D
+#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR 0x824E
+#define GL_DEBUG_TYPE_PORTABILITY 0x824F
+#define GL_DEBUG_TYPE_PERFORMANCE 0x8250
+#define GL_DEBUG_TYPE_OTHER 0x8251
+#define GL_DEBUG_TYPE_MARKER 0x8268
+#define GL_DEBUG_TYPE_PUSH_GROUP 0x8269
+#define GL_DEBUG_TYPE_POP_GROUP 0x826A
+#define GL_DEBUG_SEVERITY_NOTIFICATION 0x826B
+#define GL_MAX_DEBUG_GROUP_STACK_DEPTH 0x826C
+#define GL_DEBUG_GROUP_STACK_DEPTH 0x826D
+#define GL_BUFFER 0x82E0
+#define GL_SHADER 0x82E1
+#define GL_PROGRAM 0x82E2
+#define GL_QUERY 0x82E3
+#define GL_PROGRAM_PIPELINE 0x82E4
+#define GL_SAMPLER 0x82E6
+#define GL_DISPLAY_LIST 0x82E7
+/* DISPLAY_LIST used in compatibility profile only */
+#define GL_MAX_LABEL_LENGTH 0x82E8
+#define GL_MAX_DEBUG_MESSAGE_LENGTH 0x9143
+#define GL_MAX_DEBUG_LOGGED_MESSAGES 0x9144
+#define GL_DEBUG_LOGGED_MESSAGES 0x9145
+#define GL_DEBUG_SEVERITY_HIGH 0x9146
+#define GL_DEBUG_SEVERITY_MEDIUM 0x9147
+#define GL_DEBUG_SEVERITY_LOW 0x9148
+#define GL_DEBUG_OUTPUT 0x92E0
+#define GL_CONTEXT_FLAG_DEBUG_BIT 0x00000002
+/* reuse GL_STACK_UNDERFLOW */
+/* reuse GL_STACK_OVERFLOW */
+#endif
+
+#ifndef GL_ARB_arrays_of_arrays
+#endif
+
+#ifndef GL_ARB_clear_buffer_object
+#endif
+
+#ifndef GL_ARB_compute_shader
+#define GL_COMPUTE_SHADER 0x91B9
+#define GL_MAX_COMPUTE_UNIFORM_BLOCKS 0x91BB
+#define GL_MAX_COMPUTE_TEXTURE_IMAGE_UNITS 0x91BC
+#define GL_MAX_COMPUTE_IMAGE_UNIFORMS 0x91BD
+#define GL_MAX_COMPUTE_SHARED_MEMORY_SIZE 0x8262
+#define GL_MAX_COMPUTE_UNIFORM_COMPONENTS 0x8263
+#define GL_MAX_COMPUTE_ATOMIC_COUNTER_BUFFERS 0x8264
+#define GL_MAX_COMPUTE_ATOMIC_COUNTERS 0x8265
+#define GL_MAX_COMBINED_COMPUTE_UNIFORM_COMPONENTS 0x8266
+#define GL_MAX_COMPUTE_LOCAL_INVOCATIONS 0x90EB
+#define GL_MAX_COMPUTE_WORK_GROUP_COUNT 0x91BE
+#define GL_MAX_COMPUTE_WORK_GROUP_SIZE 0x91BF
+#define GL_COMPUTE_LOCAL_WORK_SIZE 0x8267
+#define GL_UNIFORM_BLOCK_REFERENCED_BY_COMPUTE_SHADER 0x90EC
+#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
+#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
+#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
+#define GL_COMPUTE_SHADER_BIT 0x00000020
+#endif
+
+#ifndef GL_ARB_copy_image
+#endif
+
+#ifndef GL_ARB_texture_view
+#define GL_TEXTURE_VIEW_MIN_LEVEL 0x82DB
+#define GL_TEXTURE_VIEW_NUM_LEVELS 0x82DC
+#define GL_TEXTURE_VIEW_MIN_LAYER 0x82DD
+#define GL_TEXTURE_VIEW_NUM_LAYERS 0x82DE
+#define GL_TEXTURE_IMMUTABLE_LEVELS 0x82DF
+#endif
+
+#ifndef GL_ARB_vertex_attrib_binding
+#define GL_VERTEX_ATTRIB_BINDING 0x82D4
+#define GL_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D5
+#define GL_VERTEX_BINDING_DIVISOR 0x82D6
+#define GL_VERTEX_BINDING_OFFSET 0x82D7
+#define GL_VERTEX_BINDING_STRIDE 0x82D8
+#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
+#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
+#endif
+
+#ifndef GL_ARB_robustness_isolation
+#endif
+
+#ifndef GL_ARB_ES3_compatibility
+#define GL_COMPRESSED_RGB8_ETC2 0x9274
+#define GL_COMPRESSED_SRGB8_ETC2 0x9275
+#define GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9276
+#define GL_COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2 0x9277
+#define GL_COMPRESSED_RGBA8_ETC2_EAC 0x9278
+#define GL_COMPRESSED_SRGB8_ALPHA8_ETC2_EAC 0x9279
+#define GL_COMPRESSED_R11_EAC 0x9270
+#define GL_COMPRESSED_SIGNED_R11_EAC 0x9271
+#define GL_COMPRESSED_RG11_EAC 0x9272
+#define GL_COMPRESSED_SIGNED_RG11_EAC 0x9273
+#define GL_PRIMITIVE_RESTART_FIXED_INDEX 0x8D69
+#define GL_ANY_SAMPLES_PASSED_CONSERVATIVE 0x8D6A
+#define GL_MAX_ELEMENT_INDEX 0x8D6B
+#endif
+
+#ifndef GL_ARB_explicit_uniform_location
+#define GL_MAX_UNIFORM_LOCATIONS 0x826E
+#endif
+
+#ifndef GL_ARB_fragment_layer_viewport
+#endif
+
+#ifndef GL_ARB_framebuffer_no_attachments
+#define GL_FRAMEBUFFER_DEFAULT_WIDTH 0x9310
+#define GL_FRAMEBUFFER_DEFAULT_HEIGHT 0x9311
+#define GL_FRAMEBUFFER_DEFAULT_LAYERS 0x9312
+#define GL_FRAMEBUFFER_DEFAULT_SAMPLES 0x9313
+#define GL_FRAMEBUFFER_DEFAULT_FIXED_SAMPLE_LOCATIONS 0x9314
+#define GL_MAX_FRAMEBUFFER_WIDTH 0x9315
+#define GL_MAX_FRAMEBUFFER_HEIGHT 0x9316
+#define GL_MAX_FRAMEBUFFER_LAYERS 0x9317
+#define GL_MAX_FRAMEBUFFER_SAMPLES 0x9318
+#endif
+
+#ifndef GL_ARB_internalformat_query2
+/* reuse GL_IMAGE_FORMAT_COMPATIBILITY_TYPE */
+/* reuse GL_NUM_SAMPLE_COUNTS */
+/* reuse GL_RENDERBUFFER */
+/* reuse GL_SAMPLES */
+/* reuse GL_TEXTURE_1D */
+/* reuse GL_TEXTURE_1D_ARRAY */
+/* reuse GL_TEXTURE_2D */
+/* reuse GL_TEXTURE_2D_ARRAY */
+/* reuse GL_TEXTURE_3D */
+/* reuse GL_TEXTURE_CUBE_MAP */
+/* reuse GL_TEXTURE_CUBE_MAP_ARRAY */
+/* reuse GL_TEXTURE_RECTANGLE */
+/* reuse GL_TEXTURE_BUFFER */
+/* reuse GL_TEXTURE_2D_MULTISAMPLE */
+/* reuse GL_TEXTURE_2D_MULTISAMPLE_ARRAY */
+/* reuse GL_TEXTURE_COMPRESSED */
+#define GL_INTERNALFORMAT_SUPPORTED 0x826F
+#define GL_INTERNALFORMAT_PREFERRED 0x8270
+#define GL_INTERNALFORMAT_RED_SIZE 0x8271
+#define GL_INTERNALFORMAT_GREEN_SIZE 0x8272
+#define GL_INTERNALFORMAT_BLUE_SIZE 0x8273
+#define GL_INTERNALFORMAT_ALPHA_SIZE 0x8274
+#define GL_INTERNALFORMAT_DEPTH_SIZE 0x8275
+#define GL_INTERNALFORMAT_STENCIL_SIZE 0x8276
+#define GL_INTERNALFORMAT_SHARED_SIZE 0x8277
+#define GL_INTERNALFORMAT_RED_TYPE 0x8278
+#define GL_INTERNALFORMAT_GREEN_TYPE 0x8279
+#define GL_INTERNALFORMAT_BLUE_TYPE 0x827A
+#define GL_INTERNALFORMAT_ALPHA_TYPE 0x827B
+#define GL_INTERNALFORMAT_DEPTH_TYPE 0x827C
+#define GL_INTERNALFORMAT_STENCIL_TYPE 0x827D
+#define GL_MAX_WIDTH 0x827E
+#define GL_MAX_HEIGHT 0x827F
+#define GL_MAX_DEPTH 0x8280
+#define GL_MAX_LAYERS 0x8281
+#define GL_MAX_COMBINED_DIMENSIONS 0x8282
+#define GL_COLOR_COMPONENTS 0x8283
+#define GL_DEPTH_COMPONENTS 0x8284
+#define GL_STENCIL_COMPONENTS 0x8285
+#define GL_COLOR_RENDERABLE 0x8286
+#define GL_DEPTH_RENDERABLE 0x8287
+#define GL_STENCIL_RENDERABLE 0x8288
+#define GL_FRAMEBUFFER_RENDERABLE 0x8289
+#define GL_FRAMEBUFFER_RENDERABLE_LAYERED 0x828A
+#define GL_FRAMEBUFFER_BLEND 0x828B
+#define GL_READ_PIXELS 0x828C
+#define GL_READ_PIXELS_FORMAT 0x828D
+#define GL_READ_PIXELS_TYPE 0x828E
+#define GL_TEXTURE_IMAGE_FORMAT 0x828F
+#define GL_TEXTURE_IMAGE_TYPE 0x8290
+#define GL_GET_TEXTURE_IMAGE_FORMAT 0x8291
+#define GL_GET_TEXTURE_IMAGE_TYPE 0x8292
+#define GL_MIPMAP 0x8293
+#define GL_MANUAL_GENERATE_MIPMAP 0x8294
+#define GL_AUTO_GENERATE_MIPMAP 0x8295
+#define GL_COLOR_ENCODING 0x8296
+#define GL_SRGB_READ 0x8297
+#define GL_SRGB_WRITE 0x8298
+#define GL_SRGB_DECODE_ARB 0x8299
+#define GL_FILTER 0x829A
+#define GL_VERTEX_TEXTURE 0x829B
+#define GL_TESS_CONTROL_TEXTURE 0x829C
+#define GL_TESS_EVALUATION_TEXTURE 0x829D
+#define GL_GEOMETRY_TEXTURE 0x829E
+#define GL_FRAGMENT_TEXTURE 0x829F
+#define GL_COMPUTE_TEXTURE 0x82A0
+#define GL_TEXTURE_SHADOW 0x82A1
+#define GL_TEXTURE_GATHER 0x82A2
+#define GL_TEXTURE_GATHER_SHADOW 0x82A3
+#define GL_SHADER_IMAGE_LOAD 0x82A4
+#define GL_SHADER_IMAGE_STORE 0x82A5
+#define GL_SHADER_IMAGE_ATOMIC 0x82A6
+#define GL_IMAGE_TEXEL_SIZE 0x82A7
+#define GL_IMAGE_COMPATIBILITY_CLASS 0x82A8
+#define GL_IMAGE_PIXEL_FORMAT 0x82A9
+#define GL_IMAGE_PIXEL_TYPE 0x82AA
+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_TEST 0x82AC
+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_TEST 0x82AD
+#define GL_SIMULTANEOUS_TEXTURE_AND_DEPTH_WRITE 0x82AE
+#define GL_SIMULTANEOUS_TEXTURE_AND_STENCIL_WRITE 0x82AF
+#define GL_TEXTURE_COMPRESSED_BLOCK_WIDTH 0x82B1
+#define GL_TEXTURE_COMPRESSED_BLOCK_HEIGHT 0x82B2
+#define GL_TEXTURE_COMPRESSED_BLOCK_SIZE 0x82B3
+#define GL_CLEAR_BUFFER 0x82B4
+#define GL_TEXTURE_VIEW 0x82B5
+#define GL_VIEW_COMPATIBILITY_CLASS 0x82B6
+#define GL_FULL_SUPPORT 0x82B7
+#define GL_CAVEAT_SUPPORT 0x82B8
+#define GL_IMAGE_CLASS_4_X_32 0x82B9
+#define GL_IMAGE_CLASS_2_X_32 0x82BA
+#define GL_IMAGE_CLASS_1_X_32 0x82BB
+#define GL_IMAGE_CLASS_4_X_16 0x82BC
+#define GL_IMAGE_CLASS_2_X_16 0x82BD
+#define GL_IMAGE_CLASS_1_X_16 0x82BE
+#define GL_IMAGE_CLASS_4_X_8 0x82BF
+#define GL_IMAGE_CLASS_2_X_8 0x82C0
+#define GL_IMAGE_CLASS_1_X_8 0x82C1
+#define GL_IMAGE_CLASS_11_11_10 0x82C2
+#define GL_IMAGE_CLASS_10_10_10_2 0x82C3
+#define GL_VIEW_CLASS_128_BITS 0x82C4
+#define GL_VIEW_CLASS_96_BITS 0x82C5
+#define GL_VIEW_CLASS_64_BITS 0x82C6
+#define GL_VIEW_CLASS_48_BITS 0x82C7
+#define GL_VIEW_CLASS_32_BITS 0x82C8
+#define GL_VIEW_CLASS_24_BITS 0x82C9
+#define GL_VIEW_CLASS_16_BITS 0x82CA
+#define GL_VIEW_CLASS_8_BITS 0x82CB
+#define GL_VIEW_CLASS_S3TC_DXT1_RGB 0x82CC
+#define GL_VIEW_CLASS_S3TC_DXT1_RGBA 0x82CD
+#define GL_VIEW_CLASS_S3TC_DXT3_RGBA 0x82CE
+#define GL_VIEW_CLASS_S3TC_DXT5_RGBA 0x82CF
+#define GL_VIEW_CLASS_RGTC1_RED 0x82D0
+#define GL_VIEW_CLASS_RGTC2_RG 0x82D1
+#define GL_VIEW_CLASS_BPTC_UNORM 0x82D2
+#define GL_VIEW_CLASS_BPTC_FLOAT 0x82D3
+#endif
+
+#ifndef GL_ARB_invalidate_subdata
+#endif
+
+#ifndef GL_ARB_multi_draw_indirect
+#endif
+
+#ifndef GL_ARB_program_interface_query
+#define GL_UNIFORM 0x92E1
+#define GL_UNIFORM_BLOCK 0x92E2
+#define GL_PROGRAM_INPUT 0x92E3
+#define GL_PROGRAM_OUTPUT 0x92E4
+#define GL_BUFFER_VARIABLE 0x92E5
+#define GL_SHADER_STORAGE_BLOCK 0x92E6
+/* reuse GL_ATOMIC_COUNTER_BUFFER */
+#define GL_VERTEX_SUBROUTINE 0x92E8
+#define GL_TESS_CONTROL_SUBROUTINE 0x92E9
+#define GL_TESS_EVALUATION_SUBROUTINE 0x92EA
+#define GL_GEOMETRY_SUBROUTINE 0x92EB
+#define GL_FRAGMENT_SUBROUTINE 0x92EC
+#define GL_COMPUTE_SUBROUTINE 0x92ED
+#define GL_VERTEX_SUBROUTINE_UNIFORM 0x92EE
+#define GL_TESS_CONTROL_SUBROUTINE_UNIFORM 0x92EF
+#define GL_TESS_EVALUATION_SUBROUTINE_UNIFORM 0x92F0
+#define GL_GEOMETRY_SUBROUTINE_UNIFORM 0x92F1
+#define GL_FRAGMENT_SUBROUTINE_UNIFORM 0x92F2
+#define GL_COMPUTE_SUBROUTINE_UNIFORM 0x92F3
+#define GL_TRANSFORM_FEEDBACK_VARYING 0x92F4
+#define GL_ACTIVE_RESOURCES 0x92F5
+#define GL_MAX_NAME_LENGTH 0x92F6
+#define GL_MAX_NUM_ACTIVE_VARIABLES 0x92F7
+#define GL_MAX_NUM_COMPATIBLE_SUBROUTINES 0x92F8
+#define GL_NAME_LENGTH 0x92F9
+#define GL_TYPE 0x92FA
+#define GL_ARRAY_SIZE 0x92FB
+#define GL_OFFSET 0x92FC
+#define GL_BLOCK_INDEX 0x92FD
+#define GL_ARRAY_STRIDE 0x92FE
+#define GL_MATRIX_STRIDE 0x92FF
+#define GL_IS_ROW_MAJOR 0x9300
+#define GL_ATOMIC_COUNTER_BUFFER_INDEX 0x9301
+#define GL_BUFFER_BINDING 0x9302
+#define GL_BUFFER_DATA_SIZE 0x9303
+#define GL_NUM_ACTIVE_VARIABLES 0x9304
+#define GL_ACTIVE_VARIABLES 0x9305
+#define GL_REFERENCED_BY_VERTEX_SHADER 0x9306
+#define GL_REFERENCED_BY_TESS_CONTROL_SHADER 0x9307
+#define GL_REFERENCED_BY_TESS_EVALUATION_SHADER 0x9308
+#define GL_REFERENCED_BY_GEOMETRY_SHADER 0x9309
+#define GL_REFERENCED_BY_FRAGMENT_SHADER 0x930A
+#define GL_REFERENCED_BY_COMPUTE_SHADER 0x930B
+#define GL_TOP_LEVEL_ARRAY_SIZE 0x930C
+#define GL_TOP_LEVEL_ARRAY_STRIDE 0x930D
+#define GL_LOCATION 0x930E
+#define GL_LOCATION_INDEX 0x930F
+#define GL_IS_PER_PATCH 0x92E7
+/* reuse GL_NUM_COMPATIBLE_SUBROUTINES */
+/* reuse GL_COMPATIBLE_SUBROUTINES */
+#endif
+
+#ifndef GL_ARB_robust_buffer_access_behavior
+#endif
+
+#ifndef GL_ARB_shader_image_size
+#endif
+
+#ifndef GL_ARB_shader_storage_buffer_object
+#define GL_SHADER_STORAGE_BUFFER 0x90D2
+#define GL_SHADER_STORAGE_BUFFER_BINDING 0x90D3
+#define GL_SHADER_STORAGE_BUFFER_START 0x90D4
+#define GL_SHADER_STORAGE_BUFFER_SIZE 0x90D5
+#define GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS 0x90D6
+#define GL_MAX_GEOMETRY_SHADER_STORAGE_BLOCKS 0x90D7
+#define GL_MAX_TESS_CONTROL_SHADER_STORAGE_BLOCKS 0x90D8
+#define GL_MAX_TESS_EVALUATION_SHADER_STORAGE_BLOCKS 0x90D9
+#define GL_MAX_FRAGMENT_SHADER_STORAGE_BLOCKS 0x90DA
+#define GL_MAX_COMPUTE_SHADER_STORAGE_BLOCKS 0x90DB
+#define GL_MAX_COMBINED_SHADER_STORAGE_BLOCKS 0x90DC
+#define GL_MAX_SHADER_STORAGE_BUFFER_BINDINGS 0x90DD
+#define GL_MAX_SHADER_STORAGE_BLOCK_SIZE 0x90DE
+#define GL_SHADER_STORAGE_BUFFER_OFFSET_ALIGNMENT 0x90DF
+#define GL_SHADER_STORAGE_BARRIER_BIT 0x2000
+#define GL_MAX_COMBINED_SHADER_OUTPUT_RESOURCES GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS
+/* reuse GL_MAX_COMBINED_IMAGE_UNITS_AND_FRAGMENT_OUTPUTS */
+#endif
+
+#ifndef GL_ARB_stencil_texturing
+#define GL_DEPTH_STENCIL_TEXTURE_MODE 0x90EA
+#endif
+
+#ifndef GL_ARB_texture_buffer_range
+#define GL_TEXTURE_BUFFER_OFFSET 0x919D
+#define GL_TEXTURE_BUFFER_SIZE 0x919E
+#define GL_TEXTURE_BUFFER_OFFSET_ALIGNMENT 0x919F
+#endif
+
+#ifndef GL_ARB_texture_query_levels
+#endif
+
+#ifndef GL_ARB_texture_storage_multisample
+#endif
+
+
+/*************************************************************/
+
+#include
+#ifndef GL_VERSION_2_0
+/* GL type for program/shader text */
+typedef char GLchar;
+#endif
+
+#ifndef GL_VERSION_1_5
+/* GL types for handling large vertex buffer objects */
+typedef ptrdiff_t GLintptr;
+typedef ptrdiff_t GLsizeiptr;
+#endif
+
+#ifndef GL_ARB_vertex_buffer_object
+/* GL types for handling large vertex buffer objects */
+typedef ptrdiff_t GLintptrARB;
+typedef ptrdiff_t GLsizeiptrARB;
+#endif
+
+#ifndef GL_ARB_shader_objects
+/* GL types for program/shader text and shader object handles */
+typedef char GLcharARB;
+typedef unsigned int GLhandleARB;
+#endif
+
+/* GL type for "half" precision (s10e5) float data in host memory */
+#ifndef GL_ARB_half_float_pixel
+typedef unsigned short GLhalfARB;
+#endif
+
+#ifndef GL_NV_half_float
+typedef unsigned short GLhalfNV;
+#endif
+
+#ifndef GLEXT_64_TYPES_DEFINED
+/* This code block is duplicated in glxext.h, so must be protected */
+#define GLEXT_64_TYPES_DEFINED
+/* Define int32_t, int64_t, and uint64_t types for UST/MSC */
+/* (as used in the GL_EXT_timer_query extension). */
+#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
+#include
+#elif defined(__sun__) || defined(__digital__)
+#include
+#if defined(__STDC__)
+#if defined(__arch64__) || defined(_LP64)
+typedef long int int64_t;
+typedef unsigned long int uint64_t;
+#else
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#endif /* __arch64__ */
+#endif /* __STDC__ */
+#elif defined( __VMS ) || defined(__sgi)
+#include
+#elif defined(__SCO__) || defined(__USLC__)
+#include
+#elif defined(__UNIXOS2__) || defined(__SOL64__)
+typedef long int int32_t;
+typedef long long int int64_t;
+typedef unsigned long long int uint64_t;
+#elif defined(_WIN32) && defined(__GNUC__)
+#include
+#elif defined(_WIN32)
+typedef __int32 int32_t;
+typedef __int64 int64_t;
+typedef unsigned __int64 uint64_t;
+#else
+/* Fallback if nothing above works */
+#include
+#endif
+#endif
+
+#ifndef GL_EXT_timer_query
+typedef int64_t GLint64EXT;
+typedef uint64_t GLuint64EXT;
+#endif
+
+#ifndef GL_ARB_sync
+typedef int64_t GLint64;
+typedef uint64_t GLuint64;
+typedef struct __GLsync *GLsync;
+#endif
+
+#ifndef GL_ARB_cl_event
+/* These incomplete types let us declare types compatible with OpenCL's cl_context and cl_event */
+struct _cl_context;
+struct _cl_event;
+#endif
+
+#ifndef GL_ARB_debug_output
+typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+#endif
+
+#ifndef GL_AMD_debug_output
+typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+#endif
+
+#ifndef GL_KHR_debug
+typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
+#endif
+
+#ifndef GL_NV_vdpau_interop
+typedef GLintptr GLvdpauSurfaceNV;
+#endif
+
+#ifndef GL_VERSION_1_0
+#define GL_VERSION_1_0 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glCullFace (GLenum mode);
+GLAPI void APIENTRY glFrontFace (GLenum mode);
+GLAPI void APIENTRY glHint (GLenum target, GLenum mode);
+GLAPI void APIENTRY glLineWidth (GLfloat width);
+GLAPI void APIENTRY glPointSize (GLfloat size);
+GLAPI void APIENTRY glPolygonMode (GLenum face, GLenum mode);
+GLAPI void APIENTRY glScissor (GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glTexParameterf (GLenum target, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glTexParameterfv (GLenum target, GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glDrawBuffer (GLenum mode);
+GLAPI void APIENTRY glClear (GLbitfield mask);
+GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GLAPI void APIENTRY glClearStencil (GLint s);
+GLAPI void APIENTRY glClearDepth (GLdouble depth);
+GLAPI void APIENTRY glStencilMask (GLuint mask);
+GLAPI void APIENTRY glColorMask (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+GLAPI void APIENTRY glDepthMask (GLboolean flag);
+GLAPI void APIENTRY glDisable (GLenum cap);
+GLAPI void APIENTRY glEnable (GLenum cap);
+GLAPI void APIENTRY glFinish (void);
+GLAPI void APIENTRY glFlush (void);
+GLAPI void APIENTRY glBlendFunc (GLenum sfactor, GLenum dfactor);
+GLAPI void APIENTRY glLogicOp (GLenum opcode);
+GLAPI void APIENTRY glStencilFunc (GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
+GLAPI void APIENTRY glDepthFunc (GLenum func);
+GLAPI void APIENTRY glPixelStoref (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
+GLAPI void APIENTRY glReadBuffer (GLenum mode);
+GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *params);
+GLAPI void APIENTRY glGetDoublev (GLenum pname, GLdouble *params);
+GLAPI GLenum APIENTRY glGetError (void);
+GLAPI void APIENTRY glGetFloatv (GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetIntegerv (GLenum pname, GLint *params);
+GLAPI const GLubyte * APIENTRY glGetString (GLenum name);
+GLAPI void APIENTRY glGetTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+GLAPI void APIENTRY glGetTexParameterfv (GLenum target, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTexParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTexLevelParameterfv (GLenum target, GLint level, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetTexLevelParameteriv (GLenum target, GLint level, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsEnabled (GLenum cap);
+GLAPI void APIENTRY glDepthRange (GLdouble near, GLdouble far);
+GLAPI void APIENTRY glViewport (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCULLFACEPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLFRONTFACEPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLHINTPROC) (GLenum target, GLenum mode);
+typedef void (APIENTRYP PFNGLLINEWIDTHPROC) (GLfloat width);
+typedef void (APIENTRYP PFNGLPOINTSIZEPROC) (GLfloat size);
+typedef void (APIENTRYP PFNGLPOLYGONMODEPROC) (GLenum face, GLenum mode);
+typedef void (APIENTRYP PFNGLSCISSORPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLTEXPARAMETERFPROC) (GLenum target, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLTEXPARAMETERFVPROC) (GLenum target, GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
+typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
+typedef void (APIENTRYP PFNGLCLEARDEPTHPROC) (GLdouble depth);
+typedef void (APIENTRYP PFNGLSTENCILMASKPROC) (GLuint mask);
+typedef void (APIENTRYP PFNGLCOLORMASKPROC) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha);
+typedef void (APIENTRYP PFNGLDEPTHMASKPROC) (GLboolean flag);
+typedef void (APIENTRYP PFNGLDISABLEPROC) (GLenum cap);
+typedef void (APIENTRYP PFNGLENABLEPROC) (GLenum cap);
+typedef void (APIENTRYP PFNGLFINISHPROC) (void);
+typedef void (APIENTRYP PFNGLFLUSHPROC) (void);
+typedef void (APIENTRYP PFNGLBLENDFUNCPROC) (GLenum sfactor, GLenum dfactor);
+typedef void (APIENTRYP PFNGLLOGICOPPROC) (GLenum opcode);
+typedef void (APIENTRYP PFNGLSTENCILFUNCPROC) (GLenum func, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum zpass);
+typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
+typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLREADBUFFERPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels);
+typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *params);
+typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) (GLenum pname, GLdouble *params);
+typedef GLenum (APIENTRYP PFNGLGETERRORPROC) (void);
+typedef void (APIENTRYP PFNGLGETFLOATVPROC) (GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETINTEGERVPROC) (GLenum pname, GLint *params);
+typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGPROC) (GLenum name);
+typedef void (APIENTRYP PFNGLGETTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERFVPROC) (GLenum target, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERFVPROC) (GLenum target, GLint level, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETTEXLEVELPARAMETERIVPROC) (GLenum target, GLint level, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISENABLEDPROC) (GLenum cap);
+typedef void (APIENTRYP PFNGLDEPTHRANGEPROC) (GLdouble near, GLdouble far);
+typedef void (APIENTRYP PFNGLVIEWPORTPROC) (GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_VERSION_1_1
+#define GL_VERSION_1_1 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawArrays (GLenum mode, GLint first, GLsizei count);
+GLAPI void APIENTRY glDrawElements (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY glGetPointerv (GLenum pname, GLvoid* *params);
+GLAPI void APIENTRY glPolygonOffset (GLfloat factor, GLfloat units);
+GLAPI void APIENTRY glCopyTexImage1D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+GLAPI void APIENTRY glCopyTexImage2D (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+GLAPI void APIENTRY glCopyTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+GLAPI void APIENTRY glCopyTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glBindTexture (GLenum target, GLuint texture);
+GLAPI void APIENTRY glDeleteTextures (GLsizei n, const GLuint *textures);
+GLAPI void APIENTRY glGenTextures (GLsizei n, GLuint *textures);
+GLAPI GLboolean APIENTRY glIsTexture (GLuint texture);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSPROC) (GLenum mode, GLint first, GLsizei count);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLGETPOINTERVPROC) (GLenum pname, GLvoid* *params);
+typedef void (APIENTRYP PFNGLPOLYGONOFFSETPROC) (GLfloat factor, GLfloat units);
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLBINDTEXTUREPROC) (GLenum target, GLuint texture);
+typedef void (APIENTRYP PFNGLDELETETEXTURESPROC) (GLsizei n, const GLuint *textures);
+typedef void (APIENTRYP PFNGLGENTEXTURESPROC) (GLsizei n, GLuint *textures);
+typedef GLboolean (APIENTRYP PFNGLISTEXTUREPROC) (GLuint texture);
+#endif
+
+#ifndef GL_VERSION_1_2
+#define GL_VERSION_1_2 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBlendColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+GLAPI void APIENTRY glBlendEquation (GLenum mode);
+GLAPI void APIENTRY glDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+GLAPI void APIENTRY glTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+GLAPI void APIENTRY glCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONPROC) (GLenum mode);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels);
+typedef void (APIENTRYP PFNGLCOPYTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_VERSION_1_3
+#define GL_VERSION_1_3 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glActiveTexture (GLenum texture);
+GLAPI void APIENTRY glSampleCoverage (GLfloat value, GLboolean invert);
+GLAPI void APIENTRY glCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+GLAPI void APIENTRY glGetCompressedTexImage (GLenum target, GLint level, GLvoid *img);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLACTIVETEXTUREPROC) (GLenum texture);
+typedef void (APIENTRYP PFNGLSAMPLECOVERAGEPROC) (GLfloat value, GLboolean invert);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE3DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE2DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXIMAGE1DPROC) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE3DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE2DPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLCOMPRESSEDTEXSUBIMAGE1DPROC) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint level, GLvoid *img);
+#endif
+
+#ifndef GL_VERSION_1_4
+#define GL_VERSION_1_4 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+GLAPI void APIENTRY glMultiDrawArrays (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+GLAPI void APIENTRY glMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount);
+GLAPI void APIENTRY glPointParameterf (GLenum pname, GLfloat param);
+GLAPI void APIENTRY glPointParameterfv (GLenum pname, const GLfloat *params);
+GLAPI void APIENTRY glPointParameteri (GLenum pname, GLint param);
+GLAPI void APIENTRY glPointParameteriv (GLenum pname, const GLint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEPROC) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha);
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSPROC) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei drawcount);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFPROC) (GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERFVPROC) (GLenum pname, const GLfloat *params);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIPROC) (GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLPOINTPARAMETERIVPROC) (GLenum pname, const GLint *params);
+#endif
+
+#ifndef GL_VERSION_1_5
+#define GL_VERSION_1_5 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGenQueries (GLsizei n, GLuint *ids);
+GLAPI void APIENTRY glDeleteQueries (GLsizei n, const GLuint *ids);
+GLAPI GLboolean APIENTRY glIsQuery (GLuint id);
+GLAPI void APIENTRY glBeginQuery (GLenum target, GLuint id);
+GLAPI void APIENTRY glEndQuery (GLenum target);
+GLAPI void APIENTRY glGetQueryiv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetQueryObjectiv (GLuint id, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glBindBuffer (GLenum target, GLuint buffer);
+GLAPI void APIENTRY glDeleteBuffers (GLsizei n, const GLuint *buffers);
+GLAPI void APIENTRY glGenBuffers (GLsizei n, GLuint *buffers);
+GLAPI GLboolean APIENTRY glIsBuffer (GLuint buffer);
+GLAPI void APIENTRY glBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+GLAPI void APIENTRY glBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+GLAPI void APIENTRY glGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+GLAPI GLvoid* APIENTRY glMapBuffer (GLenum target, GLenum access);
+GLAPI GLboolean APIENTRY glUnmapBuffer (GLenum target);
+GLAPI void APIENTRY glGetBufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENQUERIESPROC) (GLsizei n, GLuint *ids);
+typedef void (APIENTRYP PFNGLDELETEQUERIESPROC) (GLsizei n, const GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISQUERYPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLBEGINQUERYPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTIVPROC) (GLuint id, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUIVPROC) (GLuint id, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDBUFFERPROC) (GLenum target, GLuint buffer);
+typedef void (APIENTRYP PFNGLDELETEBUFFERSPROC) (GLsizei n, const GLuint *buffers);
+typedef void (APIENTRYP PFNGLGENBUFFERSPROC) (GLsizei n, GLuint *buffers);
+typedef GLboolean (APIENTRYP PFNGLISBUFFERPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLBUFFERDATAPROC) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage);
+typedef void (APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data);
+typedef void (APIENTRYP PFNGLGETBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data);
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERPROC) (GLenum target, GLenum access);
+typedef GLboolean (APIENTRYP PFNGLUNMAPBUFFERPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETBUFFERPOINTERVPROC) (GLenum target, GLenum pname, GLvoid* *params);
+#endif
+
+#ifndef GL_VERSION_2_0
+#define GL_VERSION_2_0 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationSeparate (GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY glDrawBuffers (GLsizei n, const GLenum *bufs);
+GLAPI void APIENTRY glStencilOpSeparate (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+GLAPI void APIENTRY glStencilFuncSeparate (GLenum face, GLenum func, GLint ref, GLuint mask);
+GLAPI void APIENTRY glStencilMaskSeparate (GLenum face, GLuint mask);
+GLAPI void APIENTRY glAttachShader (GLuint program, GLuint shader);
+GLAPI void APIENTRY glBindAttribLocation (GLuint program, GLuint index, const GLchar *name);
+GLAPI void APIENTRY glCompileShader (GLuint shader);
+GLAPI GLuint APIENTRY glCreateProgram (void);
+GLAPI GLuint APIENTRY glCreateShader (GLenum type);
+GLAPI void APIENTRY glDeleteProgram (GLuint program);
+GLAPI void APIENTRY glDeleteShader (GLuint shader);
+GLAPI void APIENTRY glDetachShader (GLuint program, GLuint shader);
+GLAPI void APIENTRY glDisableVertexAttribArray (GLuint index);
+GLAPI void APIENTRY glEnableVertexAttribArray (GLuint index);
+GLAPI void APIENTRY glGetActiveAttrib (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glGetActiveUniform (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glGetAttachedShaders (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+GLAPI GLint APIENTRY glGetAttribLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glGetProgramiv (GLuint program, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetProgramInfoLog (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY glGetShaderiv (GLuint shader, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetShaderInfoLog (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+GLAPI void APIENTRY glGetShaderSource (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+GLAPI GLint APIENTRY glGetUniformLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glGetUniformfv (GLuint program, GLint location, GLfloat *params);
+GLAPI void APIENTRY glGetUniformiv (GLuint program, GLint location, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribdv (GLuint index, GLenum pname, GLdouble *params);
+GLAPI void APIENTRY glGetVertexAttribfv (GLuint index, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetVertexAttribiv (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribPointerv (GLuint index, GLenum pname, GLvoid* *pointer);
+GLAPI GLboolean APIENTRY glIsProgram (GLuint program);
+GLAPI GLboolean APIENTRY glIsShader (GLuint shader);
+GLAPI void APIENTRY glLinkProgram (GLuint program);
+GLAPI void APIENTRY glShaderSource (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
+GLAPI void APIENTRY glUseProgram (GLuint program);
+GLAPI void APIENTRY glUniform1f (GLint location, GLfloat v0);
+GLAPI void APIENTRY glUniform2f (GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glUniform3f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glUniform4f (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glUniform1i (GLint location, GLint v0);
+GLAPI void APIENTRY glUniform2i (GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glUniform3i (GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glUniform4i (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glUniform1fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform2fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform3fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform4fv (GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glUniform1iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform2iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform3iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniform4iv (GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glUniformMatrix2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glValidateProgram (GLuint program);
+GLAPI void APIENTRY glVertexAttrib1d (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttrib1dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib1f (GLuint index, GLfloat x);
+GLAPI void APIENTRY glVertexAttrib1fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib1s (GLuint index, GLshort x);
+GLAPI void APIENTRY glVertexAttrib1sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib2d (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttrib2dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib2f (GLuint index, GLfloat x, GLfloat y);
+GLAPI void APIENTRY glVertexAttrib2fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib2s (GLuint index, GLshort x, GLshort y);
+GLAPI void APIENTRY glVertexAttrib2sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttrib3dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib3f (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+GLAPI void APIENTRY glVertexAttrib3fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib3s (GLuint index, GLshort x, GLshort y, GLshort z);
+GLAPI void APIENTRY glVertexAttrib3sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4Nbv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttrib4Niv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttrib4Nsv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4Nub (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+GLAPI void APIENTRY glVertexAttrib4Nubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttrib4Nuiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttrib4Nusv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttrib4bv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttrib4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttrib4dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttrib4f (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+GLAPI void APIENTRY glVertexAttrib4fv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glVertexAttrib4iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttrib4s (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+GLAPI void APIENTRY glVertexAttrib4sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttrib4ubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttrib4uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttrib4usv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glVertexAttribPointer (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEPROC) (GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLDRAWBUFFERSPROC) (GLsizei n, const GLenum *bufs);
+typedef void (APIENTRYP PFNGLSTENCILOPSEPARATEPROC) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass);
+typedef void (APIENTRYP PFNGLSTENCILFUNCSEPARATEPROC) (GLenum face, GLenum func, GLint ref, GLuint mask);
+typedef void (APIENTRYP PFNGLSTENCILMASKSEPARATEPROC) (GLenum face, GLuint mask);
+typedef void (APIENTRYP PFNGLATTACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLBINDATTRIBLOCATIONPROC) (GLuint program, GLuint index, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERPROC) (GLuint shader);
+typedef GLuint (APIENTRYP PFNGLCREATEPROGRAMPROC) (void);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROC) (GLenum type);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLDELETESHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLDETACHSHADERPROC) (GLuint program, GLuint shader);
+typedef void (APIENTRYP PFNGLDISABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLENABLEVERTEXATTRIBARRAYPROC) (GLuint index);
+typedef void (APIENTRYP PFNGLGETACTIVEATTRIBPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLint *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLGETATTACHEDSHADERSPROC) (GLuint program, GLsizei maxCount, GLsizei *count, GLuint *obj);
+typedef GLint (APIENTRYP PFNGLGETATTRIBLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMIVPROC) (GLuint program, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMINFOLOGPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERIVPROC) (GLuint shader, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSHADERINFOLOGPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+typedef void (APIENTRYP PFNGLGETSHADERSOURCEPROC) (GLuint shader, GLsizei bufSize, GLsizei *length, GLchar *source);
+typedef GLint (APIENTRYP PFNGLGETUNIFORMLOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETUNIFORMFVPROC) (GLuint program, GLint location, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETUNIFORMIVPROC) (GLuint program, GLint location, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBFVPROC) (GLuint index, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBPOINTERVPROC) (GLuint index, GLenum pname, GLvoid* *pointer);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPROC) (GLuint program);
+typedef GLboolean (APIENTRYP PFNGLISSHADERPROC) (GLuint shader);
+typedef void (APIENTRYP PFNGLLINKPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLSHADERSOURCEPROC) (GLuint shader, GLsizei count, const GLchar* const *string, const GLint *length);
+typedef void (APIENTRYP PFNGLUSEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLUNIFORM1FPROC) (GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLUNIFORM2FPROC) (GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLUNIFORM3FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLUNIFORM4FPROC) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLUNIFORM1IPROC) (GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2IPROC) (GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3IPROC) (GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4IPROC) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM2FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM3FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM4FVPROC) (GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORM1IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4IVPROC) (GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPROC) (GLuint program);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FPROC) (GLuint index, GLfloat x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SPROC) (GLuint index, GLshort x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB1SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FPROC) (GLuint index, GLfloat x, GLfloat y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SPROC) (GLuint index, GLshort x, GLshort y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB2SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SPROC) (GLuint index, GLshort x, GLshort y, GLshort z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB3SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NBVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NIVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NSVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBPROC) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4NUSVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4FVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SPROC) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIB4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBPOINTERPROC) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer);
+#endif
+
+#ifndef GL_VERSION_2_1
+#define GL_VERSION_2_1 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glUniformMatrix2x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix2x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4x2fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix3x4fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glUniformMatrix4x3fv (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3FVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+#endif
+
+#ifndef GL_VERSION_3_0
+#define GL_VERSION_3_0 1
+/* OpenGL 3.0 also reuses entry points from these extensions: */
+/* ARB_framebuffer_object */
+/* ARB_map_buffer_range */
+/* ARB_vertex_array_object */
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glColorMaski (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+GLAPI void APIENTRY glGetBooleani_v (GLenum target, GLuint index, GLboolean *data);
+GLAPI void APIENTRY glGetIntegeri_v (GLenum target, GLuint index, GLint *data);
+GLAPI void APIENTRY glEnablei (GLenum target, GLuint index);
+GLAPI void APIENTRY glDisablei (GLenum target, GLuint index);
+GLAPI GLboolean APIENTRY glIsEnabledi (GLenum target, GLuint index);
+GLAPI void APIENTRY glBeginTransformFeedback (GLenum primitiveMode);
+GLAPI void APIENTRY glEndTransformFeedback (void);
+GLAPI void APIENTRY glBindBufferRange (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY glBindBufferBase (GLenum target, GLuint index, GLuint buffer);
+GLAPI void APIENTRY glTransformFeedbackVaryings (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
+GLAPI void APIENTRY glGetTransformFeedbackVarying (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+GLAPI void APIENTRY glClampColor (GLenum target, GLenum clamp);
+GLAPI void APIENTRY glBeginConditionalRender (GLuint id, GLenum mode);
+GLAPI void APIENTRY glEndConditionalRender (void);
+GLAPI void APIENTRY glVertexAttribIPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glGetVertexAttribIiv (GLuint index, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetVertexAttribIuiv (GLuint index, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glVertexAttribI1i (GLuint index, GLint x);
+GLAPI void APIENTRY glVertexAttribI2i (GLuint index, GLint x, GLint y);
+GLAPI void APIENTRY glVertexAttribI3i (GLuint index, GLint x, GLint y, GLint z);
+GLAPI void APIENTRY glVertexAttribI4i (GLuint index, GLint x, GLint y, GLint z, GLint w);
+GLAPI void APIENTRY glVertexAttribI1ui (GLuint index, GLuint x);
+GLAPI void APIENTRY glVertexAttribI2ui (GLuint index, GLuint x, GLuint y);
+GLAPI void APIENTRY glVertexAttribI3ui (GLuint index, GLuint x, GLuint y, GLuint z);
+GLAPI void APIENTRY glVertexAttribI4ui (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+GLAPI void APIENTRY glVertexAttribI1iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI2iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI3iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI4iv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glVertexAttribI1uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI2uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI3uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI4uiv (GLuint index, const GLuint *v);
+GLAPI void APIENTRY glVertexAttribI4bv (GLuint index, const GLbyte *v);
+GLAPI void APIENTRY glVertexAttribI4sv (GLuint index, const GLshort *v);
+GLAPI void APIENTRY glVertexAttribI4ubv (GLuint index, const GLubyte *v);
+GLAPI void APIENTRY glVertexAttribI4usv (GLuint index, const GLushort *v);
+GLAPI void APIENTRY glGetUniformuiv (GLuint program, GLint location, GLuint *params);
+GLAPI void APIENTRY glBindFragDataLocation (GLuint program, GLuint color, const GLchar *name);
+GLAPI GLint APIENTRY glGetFragDataLocation (GLuint program, const GLchar *name);
+GLAPI void APIENTRY glUniform1ui (GLint location, GLuint v0);
+GLAPI void APIENTRY glUniform2ui (GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY glUniform3ui (GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY glUniform4ui (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY glUniform1uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform2uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform3uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glUniform4uiv (GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glTexParameterIiv (GLenum target, GLenum pname, const GLint *params);
+GLAPI void APIENTRY glTexParameterIuiv (GLenum target, GLenum pname, const GLuint *params);
+GLAPI void APIENTRY glGetTexParameterIiv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetTexParameterIuiv (GLenum target, GLenum pname, GLuint *params);
+GLAPI void APIENTRY glClearBufferiv (GLenum buffer, GLint drawbuffer, const GLint *value);
+GLAPI void APIENTRY glClearBufferuiv (GLenum buffer, GLint drawbuffer, const GLuint *value);
+GLAPI void APIENTRY glClearBufferfv (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+GLAPI void APIENTRY glClearBufferfi (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+GLAPI const GLubyte * APIENTRY glGetStringi (GLenum name, GLuint index);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOLORMASKIPROC) (GLuint index, GLboolean r, GLboolean g, GLboolean b, GLboolean a);
+typedef void (APIENTRYP PFNGLGETBOOLEANI_VPROC) (GLenum target, GLuint index, GLboolean *data);
+typedef void (APIENTRYP PFNGLGETINTEGERI_VPROC) (GLenum target, GLuint index, GLint *data);
+typedef void (APIENTRYP PFNGLENABLEIPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLDISABLEIPROC) (GLenum target, GLuint index);
+typedef GLboolean (APIENTRYP PFNGLISENABLEDIPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLBEGINTRANSFORMFEEDBACKPROC) (GLenum primitiveMode);
+typedef void (APIENTRYP PFNGLENDTRANSFORMFEEDBACKPROC) (void);
+typedef void (APIENTRYP PFNGLBINDBUFFERRANGEPROC) (GLenum target, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLBINDBUFFERBASEPROC) (GLenum target, GLuint index, GLuint buffer);
+typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKVARYINGSPROC) (GLuint program, GLsizei count, const GLchar* const *varyings, GLenum bufferMode);
+typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKVARYINGPROC) (GLuint program, GLuint index, GLsizei bufSize, GLsizei *length, GLsizei *size, GLenum *type, GLchar *name);
+typedef void (APIENTRYP PFNGLCLAMPCOLORPROC) (GLenum target, GLenum clamp);
+typedef void (APIENTRYP PFNGLBEGINCONDITIONALRENDERPROC) (GLuint id, GLenum mode);
+typedef void (APIENTRYP PFNGLENDCONDITIONALRENDERPROC) (void);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBIPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIIVPROC) (GLuint index, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBIUIVPROC) (GLuint index, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IPROC) (GLuint index, GLint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IPROC) (GLuint index, GLint x, GLint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IPROC) (GLuint index, GLint x, GLint y, GLint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IPROC) (GLuint index, GLint x, GLint y, GLint z, GLint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIPROC) (GLuint index, GLuint x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIPROC) (GLuint index, GLuint x, GLuint y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIPROC) (GLuint index, GLuint x, GLuint y, GLuint z, GLuint w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4IVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI1UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI2UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI3UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UIVPROC) (GLuint index, const GLuint *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4BVPROC) (GLuint index, const GLbyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4SVPROC) (GLuint index, const GLshort *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4UBVPROC) (GLuint index, const GLubyte *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBI4USVPROC) (GLuint index, const GLushort *v);
+typedef void (APIENTRYP PFNGLGETUNIFORMUIVPROC) (GLuint program, GLint location, GLuint *params);
+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONPROC) (GLuint program, GLuint color, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETFRAGDATALOCATIONPROC) (GLuint program, const GLchar *name);
+typedef void (APIENTRYP PFNGLUNIFORM1UIPROC) (GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLUNIFORM2UIPROC) (GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLUNIFORM3UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLUNIFORM4UIPROC) (GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLUNIFORM1UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM2UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM3UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLUNIFORM4UIVPROC) (GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, const GLint *params);
+typedef void (APIENTRYP PFNGLTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, const GLuint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETTEXPARAMETERIUIVPROC) (GLenum target, GLenum pname, GLuint *params);
+typedef void (APIENTRYP PFNGLCLEARBUFFERIVPROC) (GLenum buffer, GLint drawbuffer, const GLint *value);
+typedef void (APIENTRYP PFNGLCLEARBUFFERUIVPROC) (GLenum buffer, GLint drawbuffer, const GLuint *value);
+typedef void (APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
+typedef void (APIENTRYP PFNGLCLEARBUFFERFIPROC) (GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
+typedef const GLubyte * (APIENTRYP PFNGLGETSTRINGIPROC) (GLenum name, GLuint index);
+#endif
+
+#ifndef GL_VERSION_3_1
+#define GL_VERSION_3_1 1
+/* OpenGL 3.1 also reuses entry points from these extensions: */
+/* ARB_copy_buffer */
+/* ARB_uniform_buffer_object */
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstanced (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+GLAPI void APIENTRY glDrawElementsInstanced (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount);
+GLAPI void APIENTRY glTexBuffer (GLenum target, GLenum internalformat, GLuint buffer);
+GLAPI void APIENTRY glPrimitiveRestartIndex (GLuint index);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount);
+typedef void (APIENTRYP PFNGLTEXBUFFERPROC) (GLenum target, GLenum internalformat, GLuint buffer);
+typedef void (APIENTRYP PFNGLPRIMITIVERESTARTINDEXPROC) (GLuint index);
+#endif
+
+#ifndef GL_VERSION_3_2
+#define GL_VERSION_3_2 1
+/* OpenGL 3.2 also reuses entry points from these extensions: */
+/* ARB_draw_elements_base_vertex */
+/* ARB_provoking_vertex */
+/* ARB_sync */
+/* ARB_texture_multisample */
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetInteger64i_v (GLenum target, GLuint index, GLint64 *data);
+GLAPI void APIENTRY glGetBufferParameteri64v (GLenum target, GLenum pname, GLint64 *params);
+GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLuint texture, GLint level);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETINTEGER64I_VPROC) (GLenum target, GLuint index, GLint64 *data);
+typedef void (APIENTRYP PFNGLGETBUFFERPARAMETERI64VPROC) (GLenum target, GLenum pname, GLint64 *params);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level);
+#endif
+
+#ifndef GL_VERSION_3_3
+#define GL_VERSION_3_3 1
+/* OpenGL 3.3 also reuses entry points from these extensions: */
+/* ARB_blend_func_extended */
+/* ARB_sampler_objects */
+/* ARB_explicit_attrib_location, but it has none */
+/* ARB_occlusion_query2 (no entry points) */
+/* ARB_shader_bit_encoding (no entry points) */
+/* ARB_texture_rgb10_a2ui (no entry points) */
+/* ARB_texture_swizzle (no entry points) */
+/* ARB_timer_query */
+/* ARB_vertex_type_2_10_10_10_rev */
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribDivisor (GLuint index, GLuint divisor);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBDIVISORPROC) (GLuint index, GLuint divisor);
+#endif
+
+#ifndef GL_VERSION_4_0
+#define GL_VERSION_4_0 1
+/* OpenGL 4.0 also reuses entry points from these extensions: */
+/* ARB_texture_query_lod (no entry points) */
+/* ARB_draw_indirect */
+/* ARB_gpu_shader5 (no entry points) */
+/* ARB_gpu_shader_fp64 */
+/* ARB_shader_subroutine */
+/* ARB_tessellation_shader */
+/* ARB_texture_buffer_object_rgb32 (no entry points) */
+/* ARB_texture_cube_map_array (no entry points) */
+/* ARB_texture_gather (no entry points) */
+/* ARB_transform_feedback2 */
+/* ARB_transform_feedback3 */
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glMinSampleShading (GLfloat value);
+GLAPI void APIENTRY glBlendEquationi (GLuint buf, GLenum mode);
+GLAPI void APIENTRY glBlendEquationSeparatei (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY glBlendFunci (GLuint buf, GLenum src, GLenum dst);
+GLAPI void APIENTRY glBlendFuncSeparatei (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGPROC) (GLfloat value);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONIPROC) (GLuint buf, GLenum mode);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLBLENDFUNCIPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+
+#ifndef GL_VERSION_4_1
+#define GL_VERSION_4_1 1
+/* OpenGL 4.1 reuses entry points from these extensions: */
+/* ARB_ES2_compatibility */
+/* ARB_get_program_binary */
+/* ARB_separate_shader_objects */
+/* ARB_shader_precision (no entry points) */
+/* ARB_vertex_attrib_64bit */
+/* ARB_viewport_array */
+#endif
+
+#ifndef GL_VERSION_4_2
+#define GL_VERSION_4_2 1
+/* OpenGL 4.2 reuses entry points from these extensions: */
+/* ARB_base_instance */
+/* ARB_shading_language_420pack (no entry points) */
+/* ARB_transform_feedback_instanced */
+/* ARB_compressed_texture_pixel_storage (no entry points) */
+/* ARB_conservative_depth (no entry points) */
+/* ARB_internalformat_query */
+/* ARB_map_buffer_alignment (no entry points) */
+/* ARB_shader_atomic_counters */
+/* ARB_shader_image_load_store */
+/* ARB_shading_language_packing (no entry points) */
+/* ARB_texture_storage */
+#endif
+
+#ifndef GL_VERSION_4_3
+#define GL_VERSION_4_3 1
+/* OpenGL 4.3 reuses entry points from these extensions: */
+/* ARB_arrays_of_arrays (no entry points, GLSL only) */
+/* ARB_fragment_layer_viewport (no entry points, GLSL only) */
+/* ARB_shader_image_size (no entry points, GLSL only) */
+/* ARB_ES3_compatibility (no entry points) */
+/* ARB_clear_buffer_object */
+/* ARB_compute_shader */
+/* ARB_copy_image */
+/* KHR_debug (includes ARB_debug_output commands promoted to KHR without suffixes) */
+/* ARB_explicit_uniform_location (no entry points) */
+/* ARB_framebuffer_no_attachments */
+/* ARB_internalformat_query2 */
+/* ARB_invalidate_subdata */
+/* ARB_multi_draw_indirect */
+/* ARB_program_interface_query */
+/* ARB_robust_buffer_access_behavior (no entry points) */
+/* ARB_shader_storage_buffer_object */
+/* ARB_stencil_texturing (no entry points) */
+/* ARB_texture_buffer_range */
+/* ARB_texture_query_levels (no entry points) */
+/* ARB_texture_storage_multisample */
+/* ARB_texture_view */
+/* ARB_vertex_attrib_binding */
+#endif
+
+#ifndef GL_ARB_depth_buffer_float
+#define GL_ARB_depth_buffer_float 1
+#endif
+
+#ifndef GL_ARB_framebuffer_object
+#define GL_ARB_framebuffer_object 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI GLboolean APIENTRY glIsRenderbuffer (GLuint renderbuffer);
+GLAPI void APIENTRY glBindRenderbuffer (GLenum target, GLuint renderbuffer);
+GLAPI void APIENTRY glDeleteRenderbuffers (GLsizei n, const GLuint *renderbuffers);
+GLAPI void APIENTRY glGenRenderbuffers (GLsizei n, GLuint *renderbuffers);
+GLAPI void APIENTRY glRenderbufferStorage (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glGetRenderbufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI GLboolean APIENTRY glIsFramebuffer (GLuint framebuffer);
+GLAPI void APIENTRY glBindFramebuffer (GLenum target, GLuint framebuffer);
+GLAPI void APIENTRY glDeleteFramebuffers (GLsizei n, const GLuint *framebuffers);
+GLAPI void APIENTRY glGenFramebuffers (GLsizei n, GLuint *framebuffers);
+GLAPI GLenum APIENTRY glCheckFramebufferStatus (GLenum target);
+GLAPI void APIENTRY glFramebufferTexture1D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture2D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+GLAPI void APIENTRY glFramebufferTexture3D (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+GLAPI void APIENTRY glFramebufferRenderbuffer (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+GLAPI void APIENTRY glGetFramebufferAttachmentParameteriv (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGenerateMipmap (GLenum target);
+GLAPI void APIENTRY glBlitFramebuffer (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+GLAPI void APIENTRY glRenderbufferStorageMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glFramebufferTextureLayer (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef GLboolean (APIENTRYP PFNGLISRENDERBUFFERPROC) (GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLBINDRENDERBUFFERPROC) (GLenum target, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLDELETERENDERBUFFERSPROC) (GLsizei n, const GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLGENRENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEPROC) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLGETRENDERBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef GLboolean (APIENTRYP PFNGLISFRAMEBUFFERPROC) (GLuint framebuffer);
+typedef void (APIENTRYP PFNGLBINDFRAMEBUFFERPROC) (GLenum target, GLuint framebuffer);
+typedef void (APIENTRYP PFNGLDELETEFRAMEBUFFERSPROC) (GLsizei n, const GLuint *framebuffers);
+typedef void (APIENTRYP PFNGLGENFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
+typedef GLenum (APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE1DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE2DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURE3DPROC) (GLenum target, GLenum attachment, GLenum textarget, GLuint texture, GLint level, GLint zoffset);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERRENDERBUFFERPROC) (GLenum target, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLenum target, GLenum attachment, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGENERATEMIPMAPPROC) (GLenum target);
+typedef void (APIENTRYP PFNGLBLITFRAMEBUFFERPROC) (GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
+typedef void (APIENTRYP PFNGLRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTURELAYERPROC) (GLenum target, GLenum attachment, GLuint texture, GLint level, GLint layer);
+#endif
+
+#ifndef GL_ARB_framebuffer_sRGB
+#define GL_ARB_framebuffer_sRGB 1
+#endif
+
+#ifndef GL_ARB_half_float_vertex
+#define GL_ARB_half_float_vertex 1
+#endif
+
+#ifndef GL_ARB_map_buffer_range
+#define GL_ARB_map_buffer_range 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI GLvoid* APIENTRY glMapBufferRange (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+GLAPI void APIENTRY glFlushMappedBufferRange (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef GLvoid* (APIENTRYP PFNGLMAPBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length, GLbitfield access);
+typedef void (APIENTRYP PFNGLFLUSHMAPPEDBUFFERRANGEPROC) (GLenum target, GLintptr offset, GLsizeiptr length);
+#endif
+
+#ifndef GL_ARB_texture_compression_rgtc
+#define GL_ARB_texture_compression_rgtc 1
+#endif
+
+#ifndef GL_ARB_texture_rg
+#define GL_ARB_texture_rg 1
+#endif
+
+#ifndef GL_ARB_vertex_array_object
+#define GL_ARB_vertex_array_object 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBindVertexArray (GLuint array);
+GLAPI void APIENTRY glDeleteVertexArrays (GLsizei n, const GLuint *arrays);
+GLAPI void APIENTRY glGenVertexArrays (GLsizei n, GLuint *arrays);
+GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDVERTEXARRAYPROC) (GLuint array);
+typedef void (APIENTRYP PFNGLDELETEVERTEXARRAYSPROC) (GLsizei n, const GLuint *arrays);
+typedef void (APIENTRYP PFNGLGENVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
+typedef GLboolean (APIENTRYP PFNGLISVERTEXARRAYPROC) (GLuint array);
+#endif
+
+#ifndef GL_ARB_uniform_buffer_object
+#define GL_ARB_uniform_buffer_object 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetUniformIndices (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices);
+GLAPI void APIENTRY glGetActiveUniformsiv (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetActiveUniformName (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+GLAPI GLuint APIENTRY glGetUniformBlockIndex (GLuint program, const GLchar *uniformBlockName);
+GLAPI void APIENTRY glGetActiveUniformBlockiv (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetActiveUniformBlockName (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+GLAPI void APIENTRY glUniformBlockBinding (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETUNIFORMINDICESPROC) (GLuint program, GLsizei uniformCount, const GLchar* const *uniformNames, GLuint *uniformIndices);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMSIVPROC) (GLuint program, GLsizei uniformCount, const GLuint *uniformIndices, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMNAMEPROC) (GLuint program, GLuint uniformIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformName);
+typedef GLuint (APIENTRYP PFNGLGETUNIFORMBLOCKINDEXPROC) (GLuint program, const GLchar *uniformBlockName);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKIVPROC) (GLuint program, GLuint uniformBlockIndex, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETACTIVEUNIFORMBLOCKNAMEPROC) (GLuint program, GLuint uniformBlockIndex, GLsizei bufSize, GLsizei *length, GLchar *uniformBlockName);
+typedef void (APIENTRYP PFNGLUNIFORMBLOCKBINDINGPROC) (GLuint program, GLuint uniformBlockIndex, GLuint uniformBlockBinding);
+#endif
+
+#ifndef GL_ARB_copy_buffer
+#define GL_ARB_copy_buffer 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glCopyBufferSubData (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYBUFFERSUBDATAPROC) (GLenum readTarget, GLenum writeTarget, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
+#endif
+
+#ifndef GL_ARB_depth_clamp
+#define GL_ARB_depth_clamp 1
+#endif
+
+#ifndef GL_ARB_draw_elements_base_vertex
+#define GL_ARB_draw_elements_base_vertex 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+GLAPI void APIENTRY glDrawElementsInstancedBaseVertex (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex);
+GLAPI void APIENTRY glMultiDrawElementsBaseVertex (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+typedef void (APIENTRYP PFNGLDRAWRANGEELEMENTSBASEVERTEXPROC) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices, GLint basevertex);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXPROC) (GLenum mode, GLsizei count, GLenum type, const GLvoid *indices, GLsizei instancecount, GLint basevertex);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSBASEVERTEXPROC) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei drawcount, const GLint *basevertex);
+#endif
+
+#ifndef GL_ARB_fragment_coord_conventions
+#define GL_ARB_fragment_coord_conventions 1
+#endif
+
+#ifndef GL_ARB_provoking_vertex
+#define GL_ARB_provoking_vertex 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glProvokingVertex (GLenum mode);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPROVOKINGVERTEXPROC) (GLenum mode);
+#endif
+
+#ifndef GL_ARB_seamless_cube_map
+#define GL_ARB_seamless_cube_map 1
+#endif
+
+#ifndef GL_ARB_sync
+#define GL_ARB_sync 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI GLsync APIENTRY glFenceSync (GLenum condition, GLbitfield flags);
+GLAPI GLboolean APIENTRY glIsSync (GLsync sync);
+GLAPI void APIENTRY glDeleteSync (GLsync sync);
+GLAPI GLenum APIENTRY glClientWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GLAPI void APIENTRY glWaitSync (GLsync sync, GLbitfield flags, GLuint64 timeout);
+GLAPI void APIENTRY glGetInteger64v (GLenum pname, GLint64 *params);
+GLAPI void APIENTRY glGetSynciv (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef GLsync (APIENTRYP PFNGLFENCESYNCPROC) (GLenum condition, GLbitfield flags);
+typedef GLboolean (APIENTRYP PFNGLISSYNCPROC) (GLsync sync);
+typedef void (APIENTRYP PFNGLDELETESYNCPROC) (GLsync sync);
+typedef GLenum (APIENTRYP PFNGLCLIENTWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (APIENTRYP PFNGLWAITSYNCPROC) (GLsync sync, GLbitfield flags, GLuint64 timeout);
+typedef void (APIENTRYP PFNGLGETINTEGER64VPROC) (GLenum pname, GLint64 *params);
+typedef void (APIENTRYP PFNGLGETSYNCIVPROC) (GLsync sync, GLenum pname, GLsizei bufSize, GLsizei *length, GLint *values);
+#endif
+
+#ifndef GL_ARB_texture_multisample
+#define GL_ARB_texture_multisample 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
+GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
+typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask);
+#endif
+
+#ifndef GL_ARB_vertex_array_bgra
+#define GL_ARB_vertex_array_bgra 1
+#endif
+
+#ifndef GL_ARB_draw_buffers_blend
+#define GL_ARB_draw_buffers_blend 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBlendEquationiARB (GLuint buf, GLenum mode);
+GLAPI void APIENTRY glBlendEquationSeparateiARB (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+GLAPI void APIENTRY glBlendFunciARB (GLuint buf, GLenum src, GLenum dst);
+GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
+typedef void (APIENTRYP PFNGLBLENDEQUATIONSEPARATEIARBPROC) (GLuint buf, GLenum modeRGB, GLenum modeAlpha);
+typedef void (APIENTRYP PFNGLBLENDFUNCIARBPROC) (GLuint buf, GLenum src, GLenum dst);
+typedef void (APIENTRYP PFNGLBLENDFUNCSEPARATEIARBPROC) (GLuint buf, GLenum srcRGB, GLenum dstRGB, GLenum srcAlpha, GLenum dstAlpha);
+#endif
+
+#ifndef GL_ARB_sample_shading
+#define GL_ARB_sample_shading 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMINSAMPLESHADINGARBPROC) (GLfloat value);
+#endif
+
+#ifndef GL_ARB_texture_cube_map_array
+#define GL_ARB_texture_cube_map_array 1
+#endif
+
+#ifndef GL_ARB_texture_gather
+#define GL_ARB_texture_gather 1
+#endif
+
+#ifndef GL_ARB_texture_query_lod
+#define GL_ARB_texture_query_lod 1
+#endif
+
+#ifndef GL_ARB_shading_language_include
+#define GL_ARB_shading_language_include 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glNamedStringARB (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
+GLAPI void APIENTRY glDeleteNamedStringARB (GLint namelen, const GLchar *name);
+GLAPI void APIENTRY glCompileShaderIncludeARB (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length);
+GLAPI GLboolean APIENTRY glIsNamedStringARB (GLint namelen, const GLchar *name);
+GLAPI void APIENTRY glGetNamedStringARB (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
+GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLNAMEDSTRINGARBPROC) (GLenum type, GLint namelen, const GLchar *name, GLint stringlen, const GLchar *string);
+typedef void (APIENTRYP PFNGLDELETENAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
+typedef void (APIENTRYP PFNGLCOMPILESHADERINCLUDEARBPROC) (GLuint shader, GLsizei count, const GLchar* *path, const GLint *length);
+typedef GLboolean (APIENTRYP PFNGLISNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGARBPROC) (GLint namelen, const GLchar *name, GLsizei bufSize, GLint *stringlen, GLchar *string);
+typedef void (APIENTRYP PFNGLGETNAMEDSTRINGIVARBPROC) (GLint namelen, const GLchar *name, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_ARB_texture_compression_bptc
+#define GL_ARB_texture_compression_bptc 1
+#endif
+
+#ifndef GL_ARB_blend_func_extended
+#define GL_ARB_blend_func_extended 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBindFragDataLocationIndexed (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+GLAPI GLint APIENTRY glGetFragDataIndex (GLuint program, const GLchar *name);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDFRAGDATALOCATIONINDEXEDPROC) (GLuint program, GLuint colorNumber, GLuint index, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETFRAGDATAINDEXPROC) (GLuint program, const GLchar *name);
+#endif
+
+#ifndef GL_ARB_explicit_attrib_location
+#define GL_ARB_explicit_attrib_location 1
+#endif
+
+#ifndef GL_ARB_occlusion_query2
+#define GL_ARB_occlusion_query2 1
+#endif
+
+#ifndef GL_ARB_sampler_objects
+#define GL_ARB_sampler_objects 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGenSamplers (GLsizei count, GLuint *samplers);
+GLAPI void APIENTRY glDeleteSamplers (GLsizei count, const GLuint *samplers);
+GLAPI GLboolean APIENTRY glIsSampler (GLuint sampler);
+GLAPI void APIENTRY glBindSampler (GLuint unit, GLuint sampler);
+GLAPI void APIENTRY glSamplerParameteri (GLuint sampler, GLenum pname, GLint param);
+GLAPI void APIENTRY glSamplerParameteriv (GLuint sampler, GLenum pname, const GLint *param);
+GLAPI void APIENTRY glSamplerParameterf (GLuint sampler, GLenum pname, GLfloat param);
+GLAPI void APIENTRY glSamplerParameterfv (GLuint sampler, GLenum pname, const GLfloat *param);
+GLAPI void APIENTRY glSamplerParameterIiv (GLuint sampler, GLenum pname, const GLint *param);
+GLAPI void APIENTRY glSamplerParameterIuiv (GLuint sampler, GLenum pname, const GLuint *param);
+GLAPI void APIENTRY glGetSamplerParameteriv (GLuint sampler, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetSamplerParameterIiv (GLuint sampler, GLenum pname, GLint *params);
+GLAPI void APIENTRY glGetSamplerParameterfv (GLuint sampler, GLenum pname, GLfloat *params);
+GLAPI void APIENTRY glGetSamplerParameterIuiv (GLuint sampler, GLenum pname, GLuint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGENSAMPLERSPROC) (GLsizei count, GLuint *samplers);
+typedef void (APIENTRYP PFNGLDELETESAMPLERSPROC) (GLsizei count, const GLuint *samplers);
+typedef GLboolean (APIENTRYP PFNGLISSAMPLERPROC) (GLuint sampler);
+typedef void (APIENTRYP PFNGLBINDSAMPLERPROC) (GLuint unit, GLuint sampler);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIPROC) (GLuint sampler, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFPROC) (GLuint sampler, GLenum pname, GLfloat param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, const GLfloat *param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, const GLint *param);
+typedef void (APIENTRYP PFNGLSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, const GLuint *param);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIVPROC) (GLuint sampler, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIIVPROC) (GLuint sampler, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERFVPROC) (GLuint sampler, GLenum pname, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETSAMPLERPARAMETERIUIVPROC) (GLuint sampler, GLenum pname, GLuint *params);
+#endif
+
+#ifndef GL_ARB_shader_bit_encoding
+#define GL_ARB_shader_bit_encoding 1
+#endif
+
+#ifndef GL_ARB_texture_rgb10_a2ui
+#define GL_ARB_texture_rgb10_a2ui 1
+#endif
+
+#ifndef GL_ARB_texture_swizzle
+#define GL_ARB_texture_swizzle 1
+#endif
+
+#ifndef GL_ARB_timer_query
+#define GL_ARB_timer_query 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glQueryCounter (GLuint id, GLenum target);
+GLAPI void APIENTRY glGetQueryObjecti64v (GLuint id, GLenum pname, GLint64 *params);
+GLAPI void APIENTRY glGetQueryObjectui64v (GLuint id, GLenum pname, GLuint64 *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname, GLint64 *params);
+typedef void (APIENTRYP PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64 *params);
+#endif
+
+#ifndef GL_ARB_vertex_type_2_10_10_10_rev
+#define GL_ARB_vertex_type_2_10_10_10_rev 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glVertexP2ui (GLenum type, GLuint value);
+GLAPI void APIENTRY glVertexP2uiv (GLenum type, const GLuint *value);
+GLAPI void APIENTRY glVertexP3ui (GLenum type, GLuint value);
+GLAPI void APIENTRY glVertexP3uiv (GLenum type, const GLuint *value);
+GLAPI void APIENTRY glVertexP4ui (GLenum type, GLuint value);
+GLAPI void APIENTRY glVertexP4uiv (GLenum type, const GLuint *value);
+GLAPI void APIENTRY glTexCoordP1ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP1uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glTexCoordP2ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP2uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glTexCoordP3ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP3uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glTexCoordP4ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glTexCoordP4uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP1ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP1uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP2ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP2uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP3ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP3uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glMultiTexCoordP4ui (GLenum texture, GLenum type, GLuint coords);
+GLAPI void APIENTRY glMultiTexCoordP4uiv (GLenum texture, GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glNormalP3ui (GLenum type, GLuint coords);
+GLAPI void APIENTRY glNormalP3uiv (GLenum type, const GLuint *coords);
+GLAPI void APIENTRY glColorP3ui (GLenum type, GLuint color);
+GLAPI void APIENTRY glColorP3uiv (GLenum type, const GLuint *color);
+GLAPI void APIENTRY glColorP4ui (GLenum type, GLuint color);
+GLAPI void APIENTRY glColorP4uiv (GLenum type, const GLuint *color);
+GLAPI void APIENTRY glSecondaryColorP3ui (GLenum type, GLuint color);
+GLAPI void APIENTRY glSecondaryColorP3uiv (GLenum type, const GLuint *color);
+GLAPI void APIENTRY glVertexAttribP1ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP1uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+GLAPI void APIENTRY glVertexAttribP2ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP2uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+GLAPI void APIENTRY glVertexAttribP3ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP3uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+GLAPI void APIENTRY glVertexAttribP4ui (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+GLAPI void APIENTRY glVertexAttribP4uiv (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXP2UIPROC) (GLenum type, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXP2UIVPROC) (GLenum type, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXP3UIPROC) (GLenum type, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXP3UIVPROC) (GLenum type, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXP4UIPROC) (GLenum type, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXP4UIVPROC) (GLenum type, const GLuint *value);
+typedef void (APIENTRYP PFNGLTEXCOORDP1UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP1UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP2UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP2UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP3UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP3UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP4UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLTEXCOORDP4UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP1UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP2UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP3UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIPROC) (GLenum texture, GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLMULTITEXCOORDP4UIVPROC) (GLenum texture, GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLNORMALP3UIPROC) (GLenum type, GLuint coords);
+typedef void (APIENTRYP PFNGLNORMALP3UIVPROC) (GLenum type, const GLuint *coords);
+typedef void (APIENTRYP PFNGLCOLORP3UIPROC) (GLenum type, GLuint color);
+typedef void (APIENTRYP PFNGLCOLORP3UIVPROC) (GLenum type, const GLuint *color);
+typedef void (APIENTRYP PFNGLCOLORP4UIPROC) (GLenum type, GLuint color);
+typedef void (APIENTRYP PFNGLCOLORP4UIVPROC) (GLenum type, const GLuint *color);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIPROC) (GLenum type, GLuint color);
+typedef void (APIENTRYP PFNGLSECONDARYCOLORP3UIVPROC) (GLenum type, const GLuint *color);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP1UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP2UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP3UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIPROC) (GLuint index, GLenum type, GLboolean normalized, GLuint value);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBP4UIVPROC) (GLuint index, GLenum type, GLboolean normalized, const GLuint *value);
+#endif
+
+#ifndef GL_ARB_draw_indirect
+#define GL_ARB_draw_indirect 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysIndirect (GLenum mode, const GLvoid *indirect);
+GLAPI void APIENTRY glDrawElementsIndirect (GLenum mode, GLenum type, const GLvoid *indirect);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINDIRECTPROC) (GLenum mode, const GLvoid *indirect);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const GLvoid *indirect);
+#endif
+
+#ifndef GL_ARB_gpu_shader5
+#define GL_ARB_gpu_shader5 1
+#endif
+
+#ifndef GL_ARB_gpu_shader_fp64
+#define GL_ARB_gpu_shader_fp64 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glUniform1d (GLint location, GLdouble x);
+GLAPI void APIENTRY glUniform2d (GLint location, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glUniform3d (GLint location, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glUniform4d (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glUniform1dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniform2dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniform3dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniform4dv (GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix2x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix2x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix3x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix3x4dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix4x2dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glUniformMatrix4x3dv (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glGetUniformdv (GLuint program, GLint location, GLdouble *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUNIFORM1DPROC) (GLint location, GLdouble x);
+typedef void (APIENTRYP PFNGLUNIFORM2DPROC) (GLint location, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLUNIFORM3DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLUNIFORM4DPROC) (GLint location, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLUNIFORM1DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORM2DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORM3DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORM4DVPROC) (GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX2X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX3X4DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X2DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLUNIFORMMATRIX4X3DVPROC) (GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLGETUNIFORMDVPROC) (GLuint program, GLint location, GLdouble *params);
+#endif
+
+#ifndef GL_ARB_shader_subroutine
+#define GL_ARB_shader_subroutine 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI GLint APIENTRY glGetSubroutineUniformLocation (GLuint program, GLenum shadertype, const GLchar *name);
+GLAPI GLuint APIENTRY glGetSubroutineIndex (GLuint program, GLenum shadertype, const GLchar *name);
+GLAPI void APIENTRY glGetActiveSubroutineUniformiv (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+GLAPI void APIENTRY glGetActiveSubroutineUniformName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+GLAPI void APIENTRY glGetActiveSubroutineName (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+GLAPI void APIENTRY glUniformSubroutinesuiv (GLenum shadertype, GLsizei count, const GLuint *indices);
+GLAPI void APIENTRY glGetUniformSubroutineuiv (GLenum shadertype, GLint location, GLuint *params);
+GLAPI void APIENTRY glGetProgramStageiv (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef GLint (APIENTRYP PFNGLGETSUBROUTINEUNIFORMLOCATIONPROC) (GLuint program, GLenum shadertype, const GLchar *name);
+typedef GLuint (APIENTRYP PFNGLGETSUBROUTINEINDEXPROC) (GLuint program, GLenum shadertype, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMIVPROC) (GLuint program, GLenum shadertype, GLuint index, GLenum pname, GLint *values);
+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINEUNIFORMNAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+typedef void (APIENTRYP PFNGLGETACTIVESUBROUTINENAMEPROC) (GLuint program, GLenum shadertype, GLuint index, GLsizei bufsize, GLsizei *length, GLchar *name);
+typedef void (APIENTRYP PFNGLUNIFORMSUBROUTINESUIVPROC) (GLenum shadertype, GLsizei count, const GLuint *indices);
+typedef void (APIENTRYP PFNGLGETUNIFORMSUBROUTINEUIVPROC) (GLenum shadertype, GLint location, GLuint *params);
+typedef void (APIENTRYP PFNGLGETPROGRAMSTAGEIVPROC) (GLuint program, GLenum shadertype, GLenum pname, GLint *values);
+#endif
+
+#ifndef GL_ARB_tessellation_shader
+#define GL_ARB_tessellation_shader 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glPatchParameteri (GLenum pname, GLint value);
+GLAPI void APIENTRY glPatchParameterfv (GLenum pname, const GLfloat *values);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLPATCHPARAMETERIPROC) (GLenum pname, GLint value);
+typedef void (APIENTRYP PFNGLPATCHPARAMETERFVPROC) (GLenum pname, const GLfloat *values);
+#endif
+
+#ifndef GL_ARB_texture_buffer_object_rgb32
+#define GL_ARB_texture_buffer_object_rgb32 1
+#endif
+
+#ifndef GL_ARB_transform_feedback2
+#define GL_ARB_transform_feedback2 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBindTransformFeedback (GLenum target, GLuint id);
+GLAPI void APIENTRY glDeleteTransformFeedbacks (GLsizei n, const GLuint *ids);
+GLAPI void APIENTRY glGenTransformFeedbacks (GLsizei n, GLuint *ids);
+GLAPI GLboolean APIENTRY glIsTransformFeedback (GLuint id);
+GLAPI void APIENTRY glPauseTransformFeedback (void);
+GLAPI void APIENTRY glResumeTransformFeedback (void);
+GLAPI void APIENTRY glDrawTransformFeedback (GLenum mode, GLuint id);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDTRANSFORMFEEDBACKPROC) (GLenum target, GLuint id);
+typedef void (APIENTRYP PFNGLDELETETRANSFORMFEEDBACKSPROC) (GLsizei n, const GLuint *ids);
+typedef void (APIENTRYP PFNGLGENTRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
+typedef GLboolean (APIENTRYP PFNGLISTRANSFORMFEEDBACKPROC) (GLuint id);
+typedef void (APIENTRYP PFNGLPAUSETRANSFORMFEEDBACKPROC) (void);
+typedef void (APIENTRYP PFNGLRESUMETRANSFORMFEEDBACKPROC) (void);
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKPROC) (GLenum mode, GLuint id);
+#endif
+
+#ifndef GL_ARB_transform_feedback3
+#define GL_ARB_transform_feedback3 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawTransformFeedbackStream (GLenum mode, GLuint id, GLuint stream);
+GLAPI void APIENTRY glBeginQueryIndexed (GLenum target, GLuint index, GLuint id);
+GLAPI void APIENTRY glEndQueryIndexed (GLenum target, GLuint index);
+GLAPI void APIENTRY glGetQueryIndexediv (GLenum target, GLuint index, GLenum pname, GLint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMPROC) (GLenum mode, GLuint id, GLuint stream);
+typedef void (APIENTRYP PFNGLBEGINQUERYINDEXEDPROC) (GLenum target, GLuint index, GLuint id);
+typedef void (APIENTRYP PFNGLENDQUERYINDEXEDPROC) (GLenum target, GLuint index);
+typedef void (APIENTRYP PFNGLGETQUERYINDEXEDIVPROC) (GLenum target, GLuint index, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_ARB_ES2_compatibility
+#define GL_ARB_ES2_compatibility 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glReleaseShaderCompiler (void);
+GLAPI void APIENTRY glShaderBinary (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+GLAPI void APIENTRY glGetShaderPrecisionFormat (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+GLAPI void APIENTRY glDepthRangef (GLfloat n, GLfloat f);
+GLAPI void APIENTRY glClearDepthf (GLfloat d);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLRELEASESHADERCOMPILERPROC) (void);
+typedef void (APIENTRYP PFNGLSHADERBINARYPROC) (GLsizei count, const GLuint *shaders, GLenum binaryformat, const GLvoid *binary, GLsizei length);
+typedef void (APIENTRYP PFNGLGETSHADERPRECISIONFORMATPROC) (GLenum shadertype, GLenum precisiontype, GLint *range, GLint *precision);
+typedef void (APIENTRYP PFNGLDEPTHRANGEFPROC) (GLfloat n, GLfloat f);
+typedef void (APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
+#endif
+
+#ifndef GL_ARB_get_program_binary
+#define GL_ARB_get_program_binary 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetProgramBinary (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+GLAPI void APIENTRY glProgramBinary (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+GLAPI void APIENTRY glProgramParameteri (GLuint program, GLenum pname, GLint value);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETPROGRAMBINARYPROC) (GLuint program, GLsizei bufSize, GLsizei *length, GLenum *binaryFormat, GLvoid *binary);
+typedef void (APIENTRYP PFNGLPROGRAMBINARYPROC) (GLuint program, GLenum binaryFormat, const GLvoid *binary, GLsizei length);
+typedef void (APIENTRYP PFNGLPROGRAMPARAMETERIPROC) (GLuint program, GLenum pname, GLint value);
+#endif
+
+#ifndef GL_ARB_separate_shader_objects
+#define GL_ARB_separate_shader_objects 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glUseProgramStages (GLuint pipeline, GLbitfield stages, GLuint program);
+GLAPI void APIENTRY glActiveShaderProgram (GLuint pipeline, GLuint program);
+GLAPI GLuint APIENTRY glCreateShaderProgramv (GLenum type, GLsizei count, const GLchar* const *strings);
+GLAPI void APIENTRY glBindProgramPipeline (GLuint pipeline);
+GLAPI void APIENTRY glDeleteProgramPipelines (GLsizei n, const GLuint *pipelines);
+GLAPI void APIENTRY glGenProgramPipelines (GLsizei n, GLuint *pipelines);
+GLAPI GLboolean APIENTRY glIsProgramPipeline (GLuint pipeline);
+GLAPI void APIENTRY glGetProgramPipelineiv (GLuint pipeline, GLenum pname, GLint *params);
+GLAPI void APIENTRY glProgramUniform1i (GLuint program, GLint location, GLint v0);
+GLAPI void APIENTRY glProgramUniform1iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform1f (GLuint program, GLint location, GLfloat v0);
+GLAPI void APIENTRY glProgramUniform1fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform1d (GLuint program, GLint location, GLdouble v0);
+GLAPI void APIENTRY glProgramUniform1dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform1ui (GLuint program, GLint location, GLuint v0);
+GLAPI void APIENTRY glProgramUniform1uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform2i (GLuint program, GLint location, GLint v0, GLint v1);
+GLAPI void APIENTRY glProgramUniform2iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform2f (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+GLAPI void APIENTRY glProgramUniform2fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform2d (GLuint program, GLint location, GLdouble v0, GLdouble v1);
+GLAPI void APIENTRY glProgramUniform2dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform2ui (GLuint program, GLint location, GLuint v0, GLuint v1);
+GLAPI void APIENTRY glProgramUniform2uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform3i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+GLAPI void APIENTRY glProgramUniform3iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform3f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+GLAPI void APIENTRY glProgramUniform3fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform3d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+GLAPI void APIENTRY glProgramUniform3dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform3ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+GLAPI void APIENTRY glProgramUniform3uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniform4i (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+GLAPI void APIENTRY glProgramUniform4iv (GLuint program, GLint location, GLsizei count, const GLint *value);
+GLAPI void APIENTRY glProgramUniform4f (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+GLAPI void APIENTRY glProgramUniform4fv (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniform4d (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+GLAPI void APIENTRY glProgramUniform4dv (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniform4ui (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+GLAPI void APIENTRY glProgramUniform4uiv (GLuint program, GLint location, GLsizei count, const GLuint *value);
+GLAPI void APIENTRY glProgramUniformMatrix2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x2fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x4fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x3fv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix2x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x2dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix3x4dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glProgramUniformMatrix4x3dv (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+GLAPI void APIENTRY glValidateProgramPipeline (GLuint pipeline);
+GLAPI void APIENTRY glGetProgramPipelineInfoLog (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLUSEPROGRAMSTAGESPROC) (GLuint pipeline, GLbitfield stages, GLuint program);
+typedef void (APIENTRYP PFNGLACTIVESHADERPROGRAMPROC) (GLuint pipeline, GLuint program);
+typedef GLuint (APIENTRYP PFNGLCREATESHADERPROGRAMVPROC) (GLenum type, GLsizei count, const GLchar* const *strings);
+typedef void (APIENTRYP PFNGLBINDPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (APIENTRYP PFNGLDELETEPROGRAMPIPELINESPROC) (GLsizei n, const GLuint *pipelines);
+typedef void (APIENTRYP PFNGLGENPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
+typedef GLboolean (APIENTRYP PFNGLISPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEIVPROC) (GLuint pipeline, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IPROC) (GLuint program, GLint location, GLint v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FPROC) (GLuint program, GLint location, GLfloat v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DPROC) (GLuint program, GLint location, GLdouble v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIPROC) (GLuint program, GLint location, GLuint v0);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM1UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IPROC) (GLuint program, GLint location, GLint v0, GLint v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM2UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM3UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IPROC) (GLuint program, GLint location, GLint v0, GLint v1, GLint v2, GLint v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4IVPROC) (GLuint program, GLint location, GLsizei count, const GLint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FPROC) (GLuint program, GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4FVPROC) (GLuint program, GLint location, GLsizei count, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DPROC) (GLuint program, GLint location, GLdouble v0, GLdouble v1, GLdouble v2, GLdouble v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4DVPROC) (GLuint program, GLint location, GLsizei count, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIPROC) (GLuint program, GLint location, GLuint v0, GLuint v1, GLuint v2, GLuint v3);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORM4UIVPROC) (GLuint program, GLint location, GLsizei count, const GLuint *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3FVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLfloat *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX2X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X2DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX3X4DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLPROGRAMUNIFORMMATRIX4X3DVPROC) (GLuint program, GLint location, GLsizei count, GLboolean transpose, const GLdouble *value);
+typedef void (APIENTRYP PFNGLVALIDATEPROGRAMPIPELINEPROC) (GLuint pipeline);
+typedef void (APIENTRYP PFNGLGETPROGRAMPIPELINEINFOLOGPROC) (GLuint pipeline, GLsizei bufSize, GLsizei *length, GLchar *infoLog);
+#endif
+
+#ifndef GL_ARB_vertex_attrib_64bit
+#define GL_ARB_vertex_attrib_64bit 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glVertexAttribL1d (GLuint index, GLdouble x);
+GLAPI void APIENTRY glVertexAttribL2d (GLuint index, GLdouble x, GLdouble y);
+GLAPI void APIENTRY glVertexAttribL3d (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+GLAPI void APIENTRY glVertexAttribL4d (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+GLAPI void APIENTRY glVertexAttribL1dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL2dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL3dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribL4dv (GLuint index, const GLdouble *v);
+GLAPI void APIENTRY glVertexAttribLPointer (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+GLAPI void APIENTRY glGetVertexAttribLdv (GLuint index, GLenum pname, GLdouble *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DPROC) (GLuint index, GLdouble x);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DPROC) (GLuint index, GLdouble x, GLdouble y);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DPROC) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL1DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL2DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL3DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBL4DVPROC) (GLuint index, const GLdouble *v);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBLPOINTERPROC) (GLuint index, GLint size, GLenum type, GLsizei stride, const GLvoid *pointer);
+typedef void (APIENTRYP PFNGLGETVERTEXATTRIBLDVPROC) (GLuint index, GLenum pname, GLdouble *params);
+#endif
+
+#ifndef GL_ARB_viewport_array
+#define GL_ARB_viewport_array 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glViewportArrayv (GLuint first, GLsizei count, const GLfloat *v);
+GLAPI void APIENTRY glViewportIndexedf (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+GLAPI void APIENTRY glViewportIndexedfv (GLuint index, const GLfloat *v);
+GLAPI void APIENTRY glScissorArrayv (GLuint first, GLsizei count, const GLint *v);
+GLAPI void APIENTRY glScissorIndexed (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glScissorIndexedv (GLuint index, const GLint *v);
+GLAPI void APIENTRY glDepthRangeArrayv (GLuint first, GLsizei count, const GLdouble *v);
+GLAPI void APIENTRY glDepthRangeIndexed (GLuint index, GLdouble n, GLdouble f);
+GLAPI void APIENTRY glGetFloati_v (GLenum target, GLuint index, GLfloat *data);
+GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLVIEWPORTARRAYVPROC) (GLuint first, GLsizei count, const GLfloat *v);
+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFPROC) (GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h);
+typedef void (APIENTRYP PFNGLVIEWPORTINDEXEDFVPROC) (GLuint index, const GLfloat *v);
+typedef void (APIENTRYP PFNGLSCISSORARRAYVPROC) (GLuint first, GLsizei count, const GLint *v);
+typedef void (APIENTRYP PFNGLSCISSORINDEXEDPROC) (GLuint index, GLint left, GLint bottom, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLSCISSORINDEXEDVPROC) (GLuint index, const GLint *v);
+typedef void (APIENTRYP PFNGLDEPTHRANGEARRAYVPROC) (GLuint first, GLsizei count, const GLdouble *v);
+typedef void (APIENTRYP PFNGLDEPTHRANGEINDEXEDPROC) (GLuint index, GLdouble n, GLdouble f);
+typedef void (APIENTRYP PFNGLGETFLOATI_VPROC) (GLenum target, GLuint index, GLfloat *data);
+typedef void (APIENTRYP PFNGLGETDOUBLEI_VPROC) (GLenum target, GLuint index, GLdouble *data);
+#endif
+
+#ifndef GL_ARB_cl_event
+#define GL_ARB_cl_event 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context * context, struct _cl_event * event, GLbitfield flags);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef GLsync (APIENTRYP PFNGLCREATESYNCFROMCLEVENTARBPROC) (struct _cl_context * context, struct _cl_event * event, GLbitfield flags);
+#endif
+
+#ifndef GL_ARB_debug_output
+#define GL_ARB_debug_output 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDebugMessageControlARB (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GLAPI void APIENTRY glDebugMessageInsertARB (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GLAPI void APIENTRY glDebugMessageCallbackARB (GLDEBUGPROCARB callback, const GLvoid *userParam);
+GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLARBPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTARBPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKARBPROC) (GLDEBUGPROCARB callback, const GLvoid *userParam);
+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGARBPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+#endif
+
+#ifndef GL_ARB_robustness
+#define GL_ARB_robustness 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI GLenum APIENTRY glGetGraphicsResetStatusARB (void);
+GLAPI void APIENTRY glGetnTexImageARB (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img);
+GLAPI void APIENTRY glReadnPixelsARB (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+GLAPI void APIENTRY glGetnCompressedTexImageARB (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img);
+GLAPI void APIENTRY glGetnUniformfvARB (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+GLAPI void APIENTRY glGetnUniformivARB (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+GLAPI void APIENTRY glGetnUniformuivARB (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+GLAPI void APIENTRY glGetnUniformdvARB (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSARBPROC) (void);
+typedef void (APIENTRYP PFNGLGETNTEXIMAGEARBPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, GLvoid *img);
+typedef void (APIENTRYP PFNGLREADNPIXELSARBPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, GLvoid *data);
+typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEARBPROC) (GLenum target, GLint lod, GLsizei bufSize, GLvoid *img);
+typedef void (APIENTRYP PFNGLGETNUNIFORMFVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
+typedef void (APIENTRYP PFNGLGETNUNIFORMIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
+typedef void (APIENTRYP PFNGLGETNUNIFORMUIVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
+typedef void (APIENTRYP PFNGLGETNUNIFORMDVARBPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
+#endif
+
+#ifndef GL_ARB_shader_stencil_export
+#define GL_ARB_shader_stencil_export 1
+#endif
+
+#ifndef GL_ARB_base_instance
+#define GL_ARB_base_instance 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawArraysInstancedBaseInstance (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
+GLAPI void APIENTRY glDrawElementsInstancedBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
+GLAPI void APIENTRY glDrawElementsInstancedBaseVertexBaseInstance (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
+typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEVERTEXBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLint basevertex, GLuint baseinstance);
+#endif
+
+#ifndef GL_ARB_shading_language_420pack
+#define GL_ARB_shading_language_420pack 1
+#endif
+
+#ifndef GL_ARB_transform_feedback_instanced
+#define GL_ARB_transform_feedback_instanced 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDrawTransformFeedbackInstanced (GLenum mode, GLuint id, GLsizei instancecount);
+GLAPI void APIENTRY glDrawTransformFeedbackStreamInstanced (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKINSTANCEDPROC) (GLenum mode, GLuint id, GLsizei instancecount);
+typedef void (APIENTRYP PFNGLDRAWTRANSFORMFEEDBACKSTREAMINSTANCEDPROC) (GLenum mode, GLuint id, GLuint stream, GLsizei instancecount);
+#endif
+
+#ifndef GL_ARB_compressed_texture_pixel_storage
+#define GL_ARB_compressed_texture_pixel_storage 1
+#endif
+
+#ifndef GL_ARB_conservative_depth
+#define GL_ARB_conservative_depth 1
+#endif
+
+#ifndef GL_ARB_internalformat_query
+#define GL_ARB_internalformat_query 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetInternalformativ (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETINTERNALFORMATIVPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint *params);
+#endif
+
+#ifndef GL_ARB_map_buffer_alignment
+#define GL_ARB_map_buffer_alignment 1
+#endif
+
+#ifndef GL_ARB_shader_atomic_counters
+#define GL_ARB_shader_atomic_counters 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetActiveAtomicCounterBufferiv (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETACTIVEATOMICCOUNTERBUFFERIVPROC) (GLuint program, GLuint bufferIndex, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_ARB_shader_image_load_store
+#define GL_ARB_shader_image_load_store 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBindImageTexture (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+GLAPI void APIENTRY glMemoryBarrier (GLbitfield barriers);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDIMAGETEXTUREPROC) (GLuint unit, GLuint texture, GLint level, GLboolean layered, GLint layer, GLenum access, GLenum format);
+typedef void (APIENTRYP PFNGLMEMORYBARRIERPROC) (GLbitfield barriers);
+#endif
+
+#ifndef GL_ARB_shading_language_packing
+#define GL_ARB_shading_language_packing 1
+#endif
+
+#ifndef GL_ARB_texture_storage
+#define GL_ARB_texture_storage 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glTexStorage1D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GLAPI void APIENTRY glTexStorage2D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glTexStorage3D (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+GLAPI void APIENTRY glTextureStorage1DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+GLAPI void APIENTRY glTextureStorage2DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+GLAPI void APIENTRY glTextureStorage3DEXT (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXSTORAGE1DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (APIENTRYP PFNGLTEXSTORAGE2DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLTEXSTORAGE3DPROC) (GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width);
+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DEXTPROC) (GLuint texture, GLenum target, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
+#endif
+
+#ifndef GL_KHR_texture_compression_astc_ldr
+#define GL_KHR_texture_compression_astc_ldr 1
+#endif
+
+#ifndef GL_KHR_debug
+#define GL_KHR_debug 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDebugMessageControl (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+GLAPI void APIENTRY glDebugMessageInsert (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+GLAPI void APIENTRY glDebugMessageCallback (GLDEBUGPROC callback, const void *userParam);
+GLAPI GLuint APIENTRY glGetDebugMessageLog (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+GLAPI void APIENTRY glPushDebugGroup (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+GLAPI void APIENTRY glPopDebugGroup (void);
+GLAPI void APIENTRY glObjectLabel (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+GLAPI void APIENTRY glGetObjectLabel (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+GLAPI void APIENTRY glObjectPtrLabel (const void *ptr, GLsizei length, const GLchar *label);
+GLAPI void APIENTRY glGetObjectPtrLabel (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECONTROLPROC) (GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGEINSERTPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *buf);
+typedef void (APIENTRYP PFNGLDEBUGMESSAGECALLBACKPROC) (GLDEBUGPROC callback, const void *userParam);
+typedef GLuint (APIENTRYP PFNGLGETDEBUGMESSAGELOGPROC) (GLuint count, GLsizei bufsize, GLenum *sources, GLenum *types, GLuint *ids, GLenum *severities, GLsizei *lengths, GLchar *messageLog);
+typedef void (APIENTRYP PFNGLPUSHDEBUGGROUPPROC) (GLenum source, GLuint id, GLsizei length, const GLchar *message);
+typedef void (APIENTRYP PFNGLPOPDEBUGGROUPPROC) (void);
+typedef void (APIENTRYP PFNGLOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei length, const GLchar *label);
+typedef void (APIENTRYP PFNGLGETOBJECTLABELPROC) (GLenum identifier, GLuint name, GLsizei bufSize, GLsizei *length, GLchar *label);
+typedef void (APIENTRYP PFNGLOBJECTPTRLABELPROC) (const void *ptr, GLsizei length, const GLchar *label);
+typedef void (APIENTRYP PFNGLGETOBJECTPTRLABELPROC) (const void *ptr, GLsizei bufSize, GLsizei *length, GLchar *label);
+#endif
+
+#ifndef GL_ARB_arrays_of_arrays
+#define GL_ARB_arrays_of_arrays 1
+#endif
+
+#ifndef GL_ARB_clear_buffer_object
+#define GL_ARB_clear_buffer_object 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glClearBufferData (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+GLAPI void APIENTRY glClearBufferSubData (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+GLAPI void APIENTRY glClearNamedBufferDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+GLAPI void APIENTRY glClearNamedBufferSubDataEXT (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
+typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
+typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAEXTPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, GLsizeiptr offset, GLsizeiptr size, const void *data);
+#endif
+
+#ifndef GL_ARB_compute_shader
+#define GL_ARB_compute_shader 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glDispatchCompute (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+GLAPI void APIENTRY glDispatchComputeIndirect (GLintptr indirect);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
+typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEINDIRECTPROC) (GLintptr indirect);
+#endif
+
+#ifndef GL_ARB_copy_image
+#define GL_ARB_copy_image 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glCopyImageSubData (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLCOPYIMAGESUBDATAPROC) (GLuint srcName, GLenum srcTarget, GLint srcLevel, GLint srcX, GLint srcY, GLint srcZ, GLuint dstName, GLenum dstTarget, GLint dstLevel, GLint dstX, GLint dstY, GLint dstZ, GLsizei srcWidth, GLsizei srcHeight, GLsizei srcDepth);
+#endif
+
+#ifndef GL_ARB_texture_view
+#define GL_ARB_texture_view 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glTextureView (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXTUREVIEWPROC) (GLuint texture, GLenum target, GLuint origtexture, GLenum internalformat, GLuint minlevel, GLuint numlevels, GLuint minlayer, GLuint numlayers);
+#endif
+
+#ifndef GL_ARB_vertex_attrib_binding
+#define GL_ARB_vertex_attrib_binding 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glBindVertexBuffer (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+GLAPI void APIENTRY glVertexAttribFormat (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+GLAPI void APIENTRY glVertexAttribIFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+GLAPI void APIENTRY glVertexAttribLFormat (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+GLAPI void APIENTRY glVertexAttribBinding (GLuint attribindex, GLuint bindingindex);
+GLAPI void APIENTRY glVertexBindingDivisor (GLuint bindingindex, GLuint divisor);
+GLAPI void APIENTRY glVertexArrayBindVertexBufferEXT (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+GLAPI void APIENTRY glVertexArrayVertexAttribFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+GLAPI void APIENTRY glVertexArrayVertexAttribIFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+GLAPI void APIENTRY glVertexArrayVertexAttribLFormatEXT (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+GLAPI void APIENTRY glVertexArrayVertexAttribBindingEXT (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+GLAPI void APIENTRY glVertexArrayVertexBindingDivisorEXT (GLuint vaobj, GLuint bindingindex, GLuint divisor);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLBINDVERTEXBUFFERPROC) (GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBIFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBLFORMATPROC) (GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (APIENTRYP PFNGLVERTEXATTRIBBINDINGPROC) (GLuint attribindex, GLuint bindingindex);
+typedef void (APIENTRYP PFNGLVERTEXBINDINGDIVISORPROC) (GLuint bindingindex, GLuint divisor);
+typedef void (APIENTRYP PFNGLVERTEXARRAYBINDVERTEXBUFFEREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBIFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBLFORMATEXTPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXATTRIBBINDINGEXTPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
+typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBINDINGDIVISOREXTPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
+#endif
+
+#ifndef GL_ARB_robustness_isolation
+#define GL_ARB_robustness_isolation 1
+#endif
+
+#ifndef GL_ARB_ES3_compatibility
+#define GL_ARB_ES3_compatibility 1
+#endif
+
+#ifndef GL_ARB_explicit_uniform_location
+#define GL_ARB_explicit_uniform_location 1
+#endif
+
+#ifndef GL_ARB_fragment_layer_viewport
+#define GL_ARB_fragment_layer_viewport 1
+#endif
+
+#ifndef GL_ARB_framebuffer_no_attachments
+#define GL_ARB_framebuffer_no_attachments 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glFramebufferParameteri (GLenum target, GLenum pname, GLint param);
+GLAPI void APIENTRY glGetFramebufferParameteriv (GLenum target, GLenum pname, GLint *params);
+GLAPI void APIENTRY glNamedFramebufferParameteriEXT (GLuint framebuffer, GLenum pname, GLint param);
+GLAPI void APIENTRY glGetNamedFramebufferParameterivEXT (GLuint framebuffer, GLenum pname, GLint *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLFRAMEBUFFERPARAMETERIPROC) (GLenum target, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLGETFRAMEBUFFERPARAMETERIVPROC) (GLenum target, GLenum pname, GLint *params);
+typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIEXTPROC) (GLuint framebuffer, GLenum pname, GLint param);
+typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVEXTPROC) (GLuint framebuffer, GLenum pname, GLint *params);
+#endif
+
+#ifndef GL_ARB_internalformat_query2
+#define GL_ARB_internalformat_query2 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetInternalformati64v (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETINTERNALFORMATI64VPROC) (GLenum target, GLenum internalformat, GLenum pname, GLsizei bufSize, GLint64 *params);
+#endif
+
+#ifndef GL_ARB_invalidate_subdata
+#define GL_ARB_invalidate_subdata 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glInvalidateTexSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+GLAPI void APIENTRY glInvalidateTexImage (GLuint texture, GLint level);
+GLAPI void APIENTRY glInvalidateBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr length);
+GLAPI void APIENTRY glInvalidateBufferData (GLuint buffer);
+GLAPI void APIENTRY glInvalidateFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+GLAPI void APIENTRY glInvalidateSubFramebuffer (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLINVALIDATETEXSUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth);
+typedef void (APIENTRYP PFNGLINVALIDATETEXIMAGEPROC) (GLuint texture, GLint level);
+typedef void (APIENTRYP PFNGLINVALIDATEBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
+typedef void (APIENTRYP PFNGLINVALIDATEBUFFERDATAPROC) (GLuint buffer);
+typedef void (APIENTRYP PFNGLINVALIDATEFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments);
+typedef void (APIENTRYP PFNGLINVALIDATESUBFRAMEBUFFERPROC) (GLenum target, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
+#endif
+
+#ifndef GL_ARB_multi_draw_indirect
+#define GL_ARB_multi_draw_indirect 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glMultiDrawArraysIndirect (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
+GLAPI void APIENTRY glMultiDrawElementsIndirect (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLMULTIDRAWARRAYSINDIRECTPROC) (GLenum mode, const void *indirect, GLsizei drawcount, GLsizei stride);
+typedef void (APIENTRYP PFNGLMULTIDRAWELEMENTSINDIRECTPROC) (GLenum mode, GLenum type, const void *indirect, GLsizei drawcount, GLsizei stride);
+#endif
+
+#ifndef GL_ARB_program_interface_query
+#define GL_ARB_program_interface_query 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glGetProgramInterfaceiv (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+GLAPI GLuint APIENTRY glGetProgramResourceIndex (GLuint program, GLenum programInterface, const GLchar *name);
+GLAPI void APIENTRY glGetProgramResourceName (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+GLAPI void APIENTRY glGetProgramResourceiv (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+GLAPI GLint APIENTRY glGetProgramResourceLocation (GLuint program, GLenum programInterface, const GLchar *name);
+GLAPI GLint APIENTRY glGetProgramResourceLocationIndex (GLuint program, GLenum programInterface, const GLchar *name);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLGETPROGRAMINTERFACEIVPROC) (GLuint program, GLenum programInterface, GLenum pname, GLint *params);
+typedef GLuint (APIENTRYP PFNGLGETPROGRAMRESOURCEINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCENAMEPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei bufSize, GLsizei *length, GLchar *name);
+typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEIVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLint *params);
+typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONPROC) (GLuint program, GLenum programInterface, const GLchar *name);
+typedef GLint (APIENTRYP PFNGLGETPROGRAMRESOURCELOCATIONINDEXPROC) (GLuint program, GLenum programInterface, const GLchar *name);
+#endif
+
+#ifndef GL_ARB_robust_buffer_access_behavior
+#define GL_ARB_robust_buffer_access_behavior 1
+#endif
+
+#ifndef GL_ARB_shader_image_size
+#define GL_ARB_shader_image_size 1
+#endif
+
+#ifndef GL_ARB_shader_storage_buffer_object
+#define GL_ARB_shader_storage_buffer_object 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glShaderStorageBlockBinding (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLSHADERSTORAGEBLOCKBINDINGPROC) (GLuint program, GLuint storageBlockIndex, GLuint storageBlockBinding);
+#endif
+
+#ifndef GL_ARB_stencil_texturing
+#define GL_ARB_stencil_texturing 1
+#endif
+
+#ifndef GL_ARB_texture_buffer_range
+#define GL_ARB_texture_buffer_range 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glTexBufferRange (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+GLAPI void APIENTRY glTextureBufferRangeEXT (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXBUFFERRANGEPROC) (GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEEXTPROC) (GLuint texture, GLenum target, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
+#endif
+
+#ifndef GL_ARB_texture_query_levels
+#define GL_ARB_texture_query_levels 1
+#endif
+
+#ifndef GL_ARB_texture_storage_multisample
+#define GL_ARB_texture_storage_multisample 1
+#ifdef GLCOREARB_PROTOTYPES
+GLAPI void APIENTRY glTexStorage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glTexStorage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glTextureStorage2DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+GLAPI void APIENTRY glTextureStorage3DMultisampleEXT (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+#endif /* GLCOREARB_PROTOTYPES */
+typedef void (APIENTRYP PFNGLTEXSTORAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLTEXSTORAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
+typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEEXTPROC) (GLuint texture, GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/3rdparty/imgui/examples/libs/glfw/COPYING.txt b/3rdparty/imgui/examples/libs/glfw/COPYING.txt
new file mode 100644
index 00000000..b30c7015
--- /dev/null
+++ b/3rdparty/imgui/examples/libs/glfw/COPYING.txt
@@ -0,0 +1,22 @@
+Copyright (c) 2002-2006 Marcus Geelnard
+Copyright (c) 2006-2010 Camilla Berglund
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+ claim that you wrote the original software. If you use this software
+ in a product, an acknowledgment in the product documentation would
+ be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not
+ be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+ distribution.
+
diff --git a/3rdparty/imgui/examples/libs/glfw/include/GLFW/glfw3.h b/3rdparty/imgui/examples/libs/glfw/include/GLFW/glfw3.h
new file mode 100644
index 00000000..f8ca3d61
--- /dev/null
+++ b/3rdparty/imgui/examples/libs/glfw/include/GLFW/glfw3.h
@@ -0,0 +1,4227 @@
+/*************************************************************************
+ * GLFW 3.2 - www.glfw.org
+ * A library for OpenGL, window and input
+ *------------------------------------------------------------------------
+ * Copyright (c) 2002-2006 Marcus Geelnard
+ * Copyright (c) 2006-2010 Camilla Berglund
+ *
+ * This software is provided 'as-is', without any express or implied
+ * warranty. In no event will the authors be held liable for any damages
+ * arising from the use of this software.
+ *
+ * Permission is granted to anyone to use this software for any purpose,
+ * including commercial applications, and to alter it and redistribute it
+ * freely, subject to the following restrictions:
+ *
+ * 1. The origin of this software must not be misrepresented; you must not
+ * claim that you wrote the original software. If you use this software
+ * in a product, an acknowledgment in the product documentation would
+ * be appreciated but is not required.
+ *
+ * 2. Altered source versions must be plainly marked as such, and must not
+ * be misrepresented as being the original software.
+ *
+ * 3. This notice may not be removed or altered from any source
+ * distribution.
+ *
+ *************************************************************************/
+
+#ifndef _glfw3_h_
+#define _glfw3_h_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*************************************************************************
+ * Doxygen documentation
+ *************************************************************************/
+
+/*! @file glfw3.h
+ * @brief The header of the GLFW 3 API.
+ *
+ * This is the header file of the GLFW 3 API. It defines all its types and
+ * declares all its functions.
+ *
+ * For more information about how to use this file, see @ref build_include.
+ */
+/*! @defgroup context Context reference
+ *
+ * This is the reference documentation for OpenGL and OpenGL ES context related
+ * functions. For more task-oriented information, see the @ref context_guide.
+ */
+/*! @defgroup vulkan Vulkan reference
+ *
+ * This is the reference documentation for Vulkan related functions and types.
+ * For more task-oriented information, see the @ref vulkan_guide.
+ */
+/*! @defgroup init Initialization, version and error reference
+ *
+ * This is the reference documentation for initialization and termination of
+ * the library, version management and error handling. For more task-oriented
+ * information, see the @ref intro_guide.
+ */
+/*! @defgroup input Input reference
+ *
+ * This is the reference documentation for input related functions and types.
+ * For more task-oriented information, see the @ref input_guide.
+ */
+/*! @defgroup monitor Monitor reference
+ *
+ * This is the reference documentation for monitor related functions and types.
+ * For more task-oriented information, see the @ref monitor_guide.
+ */
+/*! @defgroup window Window reference
+ *
+ * This is the reference documentation for window related functions and types,
+ * including creation, deletion and event polling. For more task-oriented
+ * information, see the @ref window_guide.
+ */
+
+
+/*************************************************************************
+ * Compiler- and platform-specific preprocessor work
+ *************************************************************************/
+
+/* If we are we on Windows, we want a single define for it.
+ */
+#if !defined(_WIN32) && (defined(__WIN32__) || defined(WIN32) || defined(__MINGW32__))
+ #define _WIN32
+#endif /* _WIN32 */
+
+/* It is customary to use APIENTRY for OpenGL function pointer declarations on
+ * all platforms. Additionally, the Windows OpenGL header needs APIENTRY.
+ */
+#ifndef APIENTRY
+ #ifdef _WIN32
+ #define APIENTRY __stdcall
+ #else
+ #define APIENTRY
+ #endif
+#endif /* APIENTRY */
+
+/* Some Windows OpenGL headers need this.
+ */
+#if !defined(WINGDIAPI) && defined(_WIN32)
+ #define WINGDIAPI __declspec(dllimport)
+ #define GLFW_WINGDIAPI_DEFINED
+#endif /* WINGDIAPI */
+
+/* Some Windows GLU headers need this.
+ */
+#if !defined(CALLBACK) && defined(_WIN32)
+ #define CALLBACK __stdcall
+ #define GLFW_CALLBACK_DEFINED
+#endif /* CALLBACK */
+
+/* Most Windows GLU headers need wchar_t.
+ * The OS X OpenGL header blocks the definition of ptrdiff_t by glext.h.
+ * Include it unconditionally to avoid surprising side-effects.
+ */
+#include
+#include
+
+/* Include the chosen client API headers.
+ */
+#if defined(__APPLE__)
+ #if defined(GLFW_INCLUDE_GLCOREARB)
+ #include
+ #if defined(GLFW_INCLUDE_GLEXT)
+ #include
+ #endif
+ #elif !defined(GLFW_INCLUDE_NONE)
+ #if !defined(GLFW_INCLUDE_GLEXT)
+ #define GL_GLEXT_LEGACY
+ #endif
+ #include