diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 664c56466..a2bb195a2 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -41,8 +41,13 @@ Other Changes: - 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. - Fixed a include build issue for Cygwin in non-POSIX (Win32) mode. (#1917, #1319, #276) + - 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: Win32, Glfw, SDL: Added support for the ImGuiMouseCursor_Hand cursor. + ----------------------------------------------------------------------- VERSION 1.62 (Released 2018-06-22) ----------------------------------------------------------------------- diff --git a/README.md b/README.md index 953d5ad6d..2abaf0315 100644 --- a/README.md +++ b/README.md @@ -125,10 +125,9 @@ Languages: (third-party bindings) - Swift [swift-imgui](https://github.com/mnmly/Swift-imgui) Frameworks: -- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, OpenGL2, OpenGL3+, Vulkan: [examples/](https://github.com/ocornut/imgui/tree/master/examples) -- Platform: GLFW, SDL, Win32, Freeglut: [examples/](https://github.com/ocornut/imgui/tree/master/examples) +- Renderers: DirectX 9, DirectX 10, DirectX 11, DirectX 12, Metal, OpenGL2, OpenGL3+, 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 Branch: OSX platform without GLFW/SDL: [#1873](https://github.com/ocornut/imgui/tree/osx) - Unmerged PR: SDL2 + OpenGLES + Emscripten: [#336](https://github.com/ocornut/imgui/pull/336) - Unmerged PR: Native Win32 and OSX: [#281](https://github.com/ocornut/imgui/pull/281) - Unmerged PR: Android: [#421](https://github.com/ocornut/imgui/pull/421) @@ -170,6 +169,7 @@ User screenshots:
[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 onward) +
[Gallery Part 6](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 diff --git a/examples/README.txt b/examples/README.txt index a7c7e222b..766729d7c 100644 --- a/examples/README.txt +++ b/examples/README.txt @@ -113,7 +113,8 @@ 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_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 (modern programmable pipeline) imgui_impl_vulkan.cpp ; Vulkan @@ -144,6 +145,7 @@ Building: - 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. @@ -208,7 +210,12 @@ example_sdl_vulkan/ This is quite long and tedious, because: Vulkan. = main.cpp + imgui_impl_sdl.cpp + imgui_impl_vulkan.cpp -example_osx_opengl2/ +example_apple_metal/ + OSX & iOS + Metal. + It is based on the cross-platform game template provided with Xcode as of Xcode 9. + = game template + imgui_impl_osx.mm + imgui_impl_metal.mm + +example_apple_opengl2/ OSX Cocoa + OpenGL2. = main.mm + imgui_impl_osx.mm + imgui_impl_opengl2.cpp diff --git a/examples/example_osx_opengl2/example_osx_opengl2.xcodeproj/project.pbxproj b/examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj similarity index 100% rename from examples/example_osx_opengl2/example_osx_opengl2.xcodeproj/project.pbxproj rename to examples/example_apple_opengl2/example_apple_opengl2.xcodeproj/project.pbxproj diff --git a/examples/example_osx_opengl2/main.mm b/examples/example_apple_opengl2/main.mm similarity index 98% rename from examples/example_osx_opengl2/main.mm rename to examples/example_apple_opengl2/main.mm index 710ffe243..a8f4d364c 100644 --- a/examples/example_osx_opengl2/main.mm +++ b/examples/example_apple_opengl2/main.mm @@ -144,12 +144,12 @@ } // 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); } --(void)keyDown:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event); } --(void)flagsChanged:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event); } --(void)mouseDown:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event); } --(void)mouseUp:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(event); } --(void)scrollWheel:(NSEvent *)event { ImGui_ImplOSX_HandleEvent(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 diff --git a/examples/imgui_impl_metal.mm b/examples/imgui_impl_metal.mm index 99fdec7b6..8ee0643f9 100644 --- a/examples/imgui_impl_metal.mm +++ b/examples/imgui_impl_metal.mm @@ -10,7 +10,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2018-07-05: Metal: Added new Metal backend implementation +// 2018-07-05: Metal: Added new Metal backend implementation. #include "imgui.h" #include "imgui_impl_metal.h" diff --git a/examples/imgui_impl_osx.h b/examples/imgui_impl_osx.h index 6ad4bc38a..1ae2cc018 100644 --- a/examples/imgui_impl_osx.h +++ b/examples/imgui_impl_osx.h @@ -1,5 +1,10 @@ // 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; diff --git a/examples/imgui_impl_osx.mm b/examples/imgui_impl_osx.mm index d0b7efd2a..cd242149a 100644 --- a/examples/imgui_impl_osx.mm +++ b/examples/imgui_impl_osx.mm @@ -1,10 +1,10 @@ // 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 are not supported (see end of https://github.com/glfw/glfw/issues/427) -// [ ] Test with another renderer back-end than OpenGL2. e.g. OpenGL3. +// [ ] 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" @@ -12,7 +12,7 @@ // CHANGELOG // (minor and older changes stripped away, please see git history for details) -// 2018-06-XX: Initial version. +// 2018-07-07: Initial version. // Data static clock_t g_Time = 0;