Skip to content

Commit 7bbe1ce

Browse files
Updated to latest ImGui code
2 parents b1fa8c5 + 96b5b17 commit 7bbe1ce

File tree

99 files changed

+7135
-3093
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

99 files changed

+7135
-3093
lines changed

.github/issue_template.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(Click "Preview" above ^ to turn URL into clickable links)
22

3-
1. FOR FIRST-TIME USERS ISSUES COMPILING/LINKING/RUNNING or LOADING FONTS, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions).
3+
1. FOR FIRST-TIME USERS PROBLEMS COMPILING/LINKING/RUNNING or LOADING FONTS, please use [GitHub Discussions](https://github.com/ocornut/imgui/discussions). EVERYTHING ELSE CAN BE POSTED HERE!
44

55
2. PLEASE CAREFULLY READ: [FAQ](https://github.com/ocornut/imgui/blob/master/docs/FAQ.md)
66

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,8 @@ jobs:
479479
wget -q https://github.com/emscripten-core/emsdk/archive/master.tar.gz
480480
tar -xvf master.tar.gz
481481
emsdk-master/emsdk update
482-
emsdk-master/emsdk install 3.1.37
483-
emsdk-master/emsdk activate 3.1.37
482+
emsdk-master/emsdk install latest
483+
emsdk-master/emsdk activate latest
484484
485485
- name: Build example_sdl2_opengl3 with Emscripten
486486
run: |

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ imgui.ini
88
*.o
99
*.obj
1010
*.exe
11-
examples/build/*
1211
examples/*/Debug/*
1312
examples/*/Release/*
1413
examples/*/x64/*
@@ -30,7 +29,7 @@ ipch
3029
JSON/
3130

3231
## Commonly used CMake directories
33-
/build*/
32+
build*/
3433

3534
## Xcode artifacts
3635
project.xcworkspace

backends/imgui_impl_allegro5.cpp

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@
66
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
77
// [X] Platform: Clipboard support (from Allegro 5.1.12)
88
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
9-
// Issues:
9+
// Missing features:
10+
// [ ] Renderer: Multi-viewport support (multiple windows)..
1011
// [ ] Renderer: The renderer is suboptimal as we need to convert vertices manually.
1112
// [ ] Platform: Missing gamepad support.
1213

1314
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1415
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
15-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
16-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
16+
// Learn about Dear ImGui:
17+
// - FAQ https://dearimgui.com/faq
18+
// - Getting Started https://dearimgui.com/getting-started
19+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
20+
// - Introduction, links and more at the top of imgui.cpp
1721

1822
// CHANGELOG
1923
// (minor and older changes stripped away, please see git history for details)
@@ -47,10 +51,11 @@
4751
// 2018-02-06: Misc: Removed call to ImGui::Shutdown() which is not available from 1.60 WIP, user needs to call CreateContext/DestroyContext themselves.
4852
// 2018-02-06: Inputs: Added mapping for ImGuiKey_Space.
4953

50-
#include <stdint.h> // uint64_t
51-
#include <cstring> // memcpy
5254
#include "imgui.h"
55+
#ifndef IMGUI_DISABLE
5356
#include "imgui_impl_allegro5.h"
57+
#include <stdint.h> // uint64_t
58+
#include <cstring> // memcpy
5459

5560
// Allegro
5661
#include <allegro5/allegro.h>
@@ -434,9 +439,9 @@ bool ImGui_ImplAllegro5_Init(ALLEGRO_DISPLAY* display)
434439
// 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.
435440
ALLEGRO_VERTEX_ELEMENT elems[] =
436441
{
437-
{ ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, pos) },
438-
{ ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, IM_OFFSETOF(ImDrawVertAllegro, uv) },
439-
{ ALLEGRO_PRIM_COLOR_ATTR, 0, IM_OFFSETOF(ImDrawVertAllegro, col) },
442+
{ ALLEGRO_PRIM_POSITION, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, pos) },
443+
{ ALLEGRO_PRIM_TEX_COORD, ALLEGRO_PRIM_FLOAT_2, offsetof(ImDrawVertAllegro, uv) },
444+
{ ALLEGRO_PRIM_COLOR_ATTR, 0, offsetof(ImDrawVertAllegro, col) },
440445
{ 0, 0, 0 }
441446
};
442447
bd->VertexDecl = al_create_vertex_decl(elems, sizeof(ImDrawVertAllegro));
@@ -603,3 +608,7 @@ void ImGui_ImplAllegro5_NewFrame()
603608
// Setup mouse cursor shape
604609
ImGui_ImplAllegro5_UpdateMouseCursor();
605610
}
611+
612+
//-----------------------------------------------------------------------------
613+
614+
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_allegro5.h

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,22 @@
66
// [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy ALLEGRO_KEY_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set]
77
// [X] Platform: Clipboard support (from Allegro 5.1.12)
88
// [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'.
9-
// Issues:
9+
// Missing features:
10+
// [ ] Renderer: Multi-viewport support (multiple windows)..
1011
// [ ] Renderer: The renderer is suboptimal as we need to unindex our buffers and convert vertices manually.
1112
// [ ] Platform: Missing gamepad support.
1213

1314
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1415
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
15-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
16-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
16+
// Learn about Dear ImGui:
17+
// - FAQ https://dearimgui.com/faq
18+
// - Getting Started https://dearimgui.com/getting-started
19+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
20+
// - Introduction, links and more at the top of imgui.cpp
1721

1822
#pragma once
1923
#include "imgui.h" // IMGUI_IMPL_API
24+
#ifndef IMGUI_DISABLE
2025

2126
struct ALLEGRO_DISPLAY;
2227
union ALLEGRO_EVENT;
@@ -30,3 +35,5 @@ IMGUI_IMPL_API bool ImGui_ImplAllegro5_ProcessEvent(ALLEGRO_EVENT* event);
3035
// Use if you want to reset your rendering device without losing Dear ImGui state.
3136
IMGUI_IMPL_API bool ImGui_ImplAllegro5_CreateDeviceObjects();
3237
IMGUI_IMPL_API void ImGui_ImplAllegro5_InvalidateDeviceObjects();
38+
39+
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_android.cpp

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,19 @@
88
// [ ] Platform: Clipboard support.
99
// [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
1010
// [ ] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
11+
// [ ] Platform: Multi-viewport support (multiple windows). Not meaningful on Android.
1112
// Important:
1213
// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.
1314
// - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446)
1415
// - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446)
1516

1617
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1718
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
18-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
19-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
19+
// Learn about Dear ImGui:
20+
// - FAQ https://dearimgui.com/faq
21+
// - Getting Started https://dearimgui.com/getting-started
22+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
23+
// - Introduction, links and more at the top of imgui.cpp
2024

2125
// CHANGELOG
2226
// (minor and older changes stripped away, please see git history for details)
@@ -27,6 +31,7 @@
2731
// 2021-03-04: Initial version.
2832

2933
#include "imgui.h"
34+
#ifndef IMGUI_DISABLE
3035
#include "imgui_impl_android.h"
3136
#include <time.h>
3237
#include <android/native_window.h>
@@ -152,7 +157,7 @@ static ImGuiKey ImGui_ImplAndroid_KeyCodeToImGuiKey(int32_t key_code)
152157
}
153158
}
154159

155-
int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event)
160+
int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event)
156161
{
157162
ImGuiIO& io = ImGui::GetIO();
158163
int32_t event_type = AInputEvent_getType(input_event);
@@ -217,25 +222,27 @@ int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event)
217222
{
218223
case AMOTION_EVENT_ACTION_DOWN:
219224
case AMOTION_EVENT_ACTION_UP:
225+
{
220226
// Physical mouse buttons (and probably other physical devices) also invoke the actions AMOTION_EVENT_ACTION_DOWN/_UP,
221227
// but we have to process them separately to identify the actual button pressed. This is done below via
222228
// AMOTION_EVENT_ACTION_BUTTON_PRESS/_RELEASE. Here, we only process "FINGER" input (and "UNKNOWN", as a fallback).
223-
if((AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_FINGER)
224-
|| (AMotionEvent_getToolType(input_event, event_pointer_index) == AMOTION_EVENT_TOOL_TYPE_UNKNOWN))
229+
int tool_type = AMotionEvent_getToolType(input_event, event_pointer_index);
230+
if (tool_type == AMOTION_EVENT_TOOL_TYPE_FINGER || tool_type == AMOTION_EVENT_TOOL_TYPE_UNKNOWN)
225231
{
226232
io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index));
227233
io.AddMouseButtonEvent(0, event_action == AMOTION_EVENT_ACTION_DOWN);
228234
}
229235
break;
236+
}
230237
case AMOTION_EVENT_ACTION_BUTTON_PRESS:
231238
case AMOTION_EVENT_ACTION_BUTTON_RELEASE:
232-
{
233-
int32_t button_state = AMotionEvent_getButtonState(input_event);
234-
io.AddMouseButtonEvent(0, (button_state & AMOTION_EVENT_BUTTON_PRIMARY) != 0);
235-
io.AddMouseButtonEvent(1, (button_state & AMOTION_EVENT_BUTTON_SECONDARY) != 0);
236-
io.AddMouseButtonEvent(2, (button_state & AMOTION_EVENT_BUTTON_TERTIARY) != 0);
237-
}
239+
{
240+
int32_t button_state = AMotionEvent_getButtonState(input_event);
241+
io.AddMouseButtonEvent(0, (button_state & AMOTION_EVENT_BUTTON_PRIMARY) != 0);
242+
io.AddMouseButtonEvent(1, (button_state & AMOTION_EVENT_BUTTON_SECONDARY) != 0);
243+
io.AddMouseButtonEvent(2, (button_state & AMOTION_EVENT_BUTTON_TERTIARY) != 0);
238244
break;
245+
}
239246
case AMOTION_EVENT_ACTION_HOVER_MOVE: // Hovering: Tool moves while NOT pressed (such as a physical mouse)
240247
case AMOTION_EVENT_ACTION_MOVE: // Touch pointer moves while DOWN
241248
io.AddMousePosEvent(AMotionEvent_getX(input_event, event_pointer_index), AMotionEvent_getY(input_event, event_pointer_index));
@@ -294,3 +301,7 @@ void ImGui_ImplAndroid_NewFrame()
294301
io.DeltaTime = g_Time > 0.0 ? (float)(current_time - g_Time) : (float)(1.0f / 60.0f);
295302
g_Time = current_time;
296303
}
304+
305+
//-----------------------------------------------------------------------------
306+
307+
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_android.h

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,22 +8,30 @@
88
// [ ] Platform: Clipboard support.
99
// [ ] Platform: Gamepad support. Enable with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'.
1010
// [ ] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. FIXME: Check if this is even possible with Android.
11+
// [ ] Platform: Multi-viewport support (multiple windows). Not meaningful on Android.
1112
// Important:
1213
// - Consider using SDL or GLFW backend on Android, which will be more full-featured than this.
1314
// - FIXME: On-screen keyboard currently needs to be enabled by the application (see examples/ and issue #3446)
1415
// - FIXME: Unicode character inputs needs to be passed by Dear ImGui by the application (see examples/ and issue #3446)
1516

1617
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1718
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
18-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
19-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
19+
// Learn about Dear ImGui:
20+
// - FAQ https://dearimgui.com/faq
21+
// - Getting Started https://dearimgui.com/getting-started
22+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
23+
// - Introduction, links and more at the top of imgui.cpp
2024

2125
#pragma once
26+
#include "imgui.h" // IMGUI_IMPL_API
27+
#ifndef IMGUI_DISABLE
2228

2329
struct ANativeWindow;
2430
struct AInputEvent;
2531

2632
IMGUI_IMPL_API bool ImGui_ImplAndroid_Init(ANativeWindow* window);
27-
IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(AInputEvent* input_event);
33+
IMGUI_IMPL_API int32_t ImGui_ImplAndroid_HandleInputEvent(const AInputEvent* input_event);
2834
IMGUI_IMPL_API void ImGui_ImplAndroid_Shutdown();
2935
IMGUI_IMPL_API void ImGui_ImplAndroid_NewFrame();
36+
37+
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_dx10.cpp

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88

99
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1010
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
11-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
12-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
11+
// Learn about Dear ImGui:
12+
// - FAQ https://dearimgui.com/faq
13+
// - Getting Started https://dearimgui.com/getting-started
14+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
15+
// - Introduction, links and more at the top of imgui.cpp
1316

1417
// CHANGELOG
1518
// (minor and older changes stripped away, please see git history for details)
@@ -32,6 +35,7 @@
3235
// 2016-05-07: DirectX10: Disabling depth-write.
3336

3437
#include "imgui.h"
38+
#ifndef IMGUI_DISABLE
3539
#include "imgui_impl_dx10.h"
3640

3741
// DirectX
@@ -416,9 +420,9 @@ bool ImGui_ImplDX10_CreateDeviceObjects()
416420
// Create the input layout
417421
D3D10_INPUT_ELEMENT_DESC local_layout[] =
418422
{
419-
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, pos), D3D10_INPUT_PER_VERTEX_DATA, 0 },
420-
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, uv), D3D10_INPUT_PER_VERTEX_DATA, 0 },
421-
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)IM_OFFSETOF(ImDrawVert, col), D3D10_INPUT_PER_VERTEX_DATA, 0 },
423+
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D10_INPUT_PER_VERTEX_DATA, 0 },
424+
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D10_INPUT_PER_VERTEX_DATA, 0 },
425+
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D10_INPUT_PER_VERTEX_DATA, 0 },
422426
};
423427
if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK)
424428
{
@@ -713,3 +717,6 @@ void ImGui_ImplDX10_ShutdownPlatformInterface()
713717
ImGui::DestroyPlatformWindows();
714718
}
715719

720+
//-----------------------------------------------------------------------------
721+
722+
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_dx10.h

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@
88

99
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1010
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
11-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
12-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
11+
// Learn about Dear ImGui:
12+
// - FAQ https://dearimgui.com/faq
13+
// - Getting Started https://dearimgui.com/getting-started
14+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
15+
// - Introduction, links and more at the top of imgui.cpp
1316

1417
#pragma once
1518
#include "imgui.h" // IMGUI_IMPL_API
19+
#ifndef IMGUI_DISABLE
1620

1721
struct ID3D10Device;
1822

@@ -24,3 +28,5 @@ IMGUI_IMPL_API void ImGui_ImplDX10_RenderDrawData(ImDrawData* draw_data);
2428
// Use if you want to reset your rendering device without losing Dear ImGui state.
2529
IMGUI_IMPL_API void ImGui_ImplDX10_InvalidateDeviceObjects();
2630
IMGUI_IMPL_API bool ImGui_ImplDX10_CreateDeviceObjects();
31+
32+
#endif // #ifndef IMGUI_DISABLE

backends/imgui_impl_dx11.cpp

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,11 @@
88

99
// You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this.
1010
// Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need.
11-
// If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp.
12-
// Read online: https://github.com/ocornut/imgui/tree/master/docs
11+
// Learn about Dear ImGui:
12+
// - FAQ https://dearimgui.com/faq
13+
// - Getting Started https://dearimgui.com/getting-started
14+
// - Documentation https://dearimgui.com/docs (same as your local docs/ folder).
15+
// - Introduction, links and more at the top of imgui.cpp
1316

1417
// CHANGELOG
1518
// (minor and older changes stripped away, please see git history for details)
@@ -33,6 +36,7 @@
3336
// 2016-05-07: DirectX11: Disabling depth-write.
3437

3538
#include "imgui.h"
39+
#ifndef IMGUI_DISABLE
3640
#include "imgui_impl_dx11.h"
3741

3842
// DirectX
@@ -428,9 +432,9 @@ bool ImGui_ImplDX11_CreateDeviceObjects()
428432
// Create the input layout
429433
D3D11_INPUT_ELEMENT_DESC local_layout[] =
430434
{
431-
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
432-
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)IM_OFFSETOF(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
433-
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)IM_OFFSETOF(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
435+
{ "POSITION", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, pos), D3D11_INPUT_PER_VERTEX_DATA, 0 },
436+
{ "TEXCOORD", 0, DXGI_FORMAT_R32G32_FLOAT, 0, (UINT)offsetof(ImDrawVert, uv), D3D11_INPUT_PER_VERTEX_DATA, 0 },
437+
{ "COLOR", 0, DXGI_FORMAT_R8G8B8A8_UNORM, 0, (UINT)offsetof(ImDrawVert, col), D3D11_INPUT_PER_VERTEX_DATA, 0 },
434438
};
435439
if (bd->pd3dDevice->CreateInputLayout(local_layout, 3, vertexShaderBlob->GetBufferPointer(), vertexShaderBlob->GetBufferSize(), &bd->pInputLayout) != S_OK)
436440
{
@@ -729,3 +733,7 @@ static void ImGui_ImplDX11_ShutdownPlatformInterface()
729733
{
730734
ImGui::DestroyPlatformWindows();
731735
}
736+
737+
//-----------------------------------------------------------------------------
738+
739+
#endif // #ifndef IMGUI_DISABLE

0 commit comments

Comments
 (0)