You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/SDL2.md
+97Lines changed: 97 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -353,3 +353,100 @@ if (device->GetDeviceInfo().IsGLDevice())
353
353
- Look at [GetSurfacePretransformMatrix()](https://github.com/DiligentGraphics/DiligentSamples/blob/9be93225a7fdf135583146c1175c232217f310b2/SampleBase/src/SampleBase.cpp#L140) for an example of handling the view matrix.
354
354
-`SDL_GetDisplayOrientation()` can be used to get the device's orientation. Alternatively, listen for the `SDL_DISPLAYEVENT_ORIENTATION` event.
355
355
-`SDL_GetDisplayMode()` can be used to determine max resolution.
356
+
357
+
## ImGui
358
+
For all ImGui features to work properly, ```ImGuiImplDiligent``` should be overridden to use the SDL backend for ImGui.
359
+
360
+
### Example Implementation
361
+
362
+
#### Header
363
+
```cpp
364
+
// ImGuiImplSDL.hpp
365
+
366
+
#include"Imgui/interface/ImGuiImplDiligent.hpp"
367
+
368
+
extern "C" struct SDL_Window;
369
+
extern "C" union SDL_Event;
370
+
371
+
namespaceDiligent
372
+
{
373
+
classImGuiImplSDL final : public ImGuiImplDiligent
0 commit comments