Examples: Apple: Readme tweaks (#575 #247)

This commit is contained in:
ocornut 2016-04-05 22:50:23 +02:00
parent b359ed7b3e
commit 71b981d05f
2 changed files with 11 additions and 10 deletions

View File

@ -63,9 +63,9 @@ directx11_example/
DirectX11 example, Windows only.
This is quite long and tedious, because: DirectX11.
ios_example/
iOS example.
Using Synergy to access keyboard/mouse data from server computer.
apple_example/
OSX & iOS example.
On iOS, Using Synergy to access keyboard/mouse data from server computer.
Synergy keyboard integration is rather hacky.
sdl_opengl_example/

View File

@ -2,19 +2,19 @@
## Introduction
This example is the default XCode "OpenGL" example code, modified to support ImGui and [Synergy](http://synergy-project.org/).
This example is the default XCode "OpenGL" example code, modified to support ImGui (and [Synergy](http://synergy-project.org/) to share mouse/keyboard with an iOS device).
It is a rather complex example because of all of the faff required to get an XCode/iOS application running. Refer to the regular OpenGL examples if you want to learn about integrating ImGui.
Synergy (remote keyboard/mouse) is not required, but it's pretty hard to use ImGui without it. Synergy includes a "uSynergy" library that allows embedding a synergy client, this is what is used here. ImGui supports "TouchPadding", and this is enabled when Synergy is not active.
## How to Use
## How to Use on iOS
0. In Synergy, go to Preferences, and uncheck "Use SSL encryption"
0. Run the example app.
0. Tap the "servername" button in the corner
0. Enter the name or the IP of your synergy host
0. If you had previously connected to a server, you may need to kill and re-start the app.
* In Synergy, go to Preferences, and uncheck "Use SSL encryption"
* Run the example app.
* Tap the "servername" button in the corner
* Enter the name or the IP of your synergy host
* If you had previously connected to a server, you may need to kill and re-start the app.
## How to Run on OSX
@ -33,6 +33,7 @@ Things that would be nice but I didn't get around to doing:
* Copy/Paste not well-supported
## C++ on iOS / OSX
ImGui is a c++ library. If you want to include it directly, rename your Obj-C file to have the ".mm" extension.
Alternatively, you can wrap your debug code in a C interface, this is what I am demonstrating here with the "debug_hud.h" interface. Either approach works, use whatever you prefer.