JordiRos/remoteimgui

语言: C

git: https://github.com/JordiRos/remoteimgui

远程ImGui for
Remote ImGui for
README.md (中文)

远程ImGui

Remote ImGui是https://github.com/ocornut/imgui(目前为1.3)的扩展,在运行HTML5 / WebGL / WebSockets(v13)应用程序的另一台设备中从目标客户端发送输出和接收输入。 您将从主机应用程序中查看所有ImGui输出,但也可以设置更大的虚拟画布并拖动窗口。在Web客户端上使用Ctrl + LeftMouse移动它。 客户端还从鼠标/键盘发送输入,允许与主机应用程序交互。

  • 似乎Firefox目前无法运行,如果其他人无法运行,请尝试使用Chrome。

设置主机

#include“../imgui_remote.h”

  • RemoteInit初始化:void ImGui :: RemoteInit(bind_address,bind_port,vcanvas_width,vcanvas_height);
  • RemoteUpdate更新以泵送网络代码:void ImGui :: RemoteUpdate();
  • RemoteDraw on render将渲染数据发送到客户端:void ImGui :: RemoteDraw(cmd_lists,cmd_lists_count);
  • RemoteShutdown终止:void ImGui :: RemoteShutdown();
  • RemoteGetInput从远程获取输入:bool ImGui :: RemoteGetInput(input);

检查应用程序/示例以获取工作示例(包括ImGui 1.3)。

  • RemoteInput可能与您的实际应用输入冲突,您必须决定哪一个是关注的,并决定向ImGui发送什么输入。

依赖

LZ4 - https://code.google.com/p/lz4/

修改过的Webby - https://github.com/deplinenoise/webby

我已经将Webby用于WebSocketServer连接。它支持Win32 + Unix,但添加其他平台应该很容易。我在回购中包含了Webby,因为我添加了一个允许在单个帧中发送WebSocket数据包的函数。

设置客户端

双击index.html,添加主机地址,然后单击“连接”。您还可以使用index.html?host = address创建autoconnect index.html书签

依赖

ThreeJS - https://github.com/mrdoob/three.js

Dat.Gui - https://github.com/dataarts/dat.gui

修改了LZ4.js - https://github.com/ukyo/lz4.js

待办事项

  • Web客户端在iOS / Android + WebGL上测试,但未处理输入
  • 在Firefox上不起作用

本文使用googletrans自动翻译,仅供参考, 原文来自github.com

en_README.md

Remote ImGui

Remote ImGui is an extension for https://github.com/ocornut/imgui (currently 1.3), sending output and receiving input from a target client in another device running an HTML5/WebGL/WebSockets(v13) application.
You will view all ImGui output from host app, but can also set a bigger virtual canvas and drag windows around. Use Ctrl+LeftMouse on web client to move around it.
Client also sends input from mouse/keyboard, allowing interaction with host app.

  • Seems Firefox is not working at the moment, try Chrome if others do not work.

Setup Host

#include "../imgui_remote.h"

  • RemoteInit to initialize: void ImGui::RemoteInit(bind_address, bind_port, vcanvas_width, vcanvas_height);
  • RemoteUpdate on update to pump network code: void ImGui::RemoteUpdate();
  • RemoteDraw on render to send render data to client: void ImGui::RemoteDraw(cmd_lists, cmd_lists_count);
  • RemoteShutdown to terminate: void ImGui::RemoteShutdown();
  • RemoteGetInput to get input from remote: bool ImGui::RemoteGetInput(input);

Check app/example for a working example (ImGui 1.3 included).

  • RemoteInput might conflict with your actual app input, you will have to decide which one is focused and decide what input send to ImGui.

Dependencies

LZ4 - https://code.google.com/p/lz4/

Modified Webby - https://github.com/deplinenoise/webby

I've used Webby for the WebSocketServer connection. It supports Win32 + Unix, but it should be easy to add other platforms. I included Webby on the repo as I added a function to allow sending WebSocket packets in a single frame.

Setup Client

Double click index.html, add your host address and click connect. You can also create an autoconnect index.html bookmark with index.html?host=address

Dependencies

ThreeJS - https://github.com/mrdoob/three.js

Dat.Gui - https://github.com/dataarts/dat.gui

Modified LZ4.js - https://github.com/ukyo/lz4.js

ToDo

  • Web client tested on iOS / Android + WebGL, but input is not handled
  • Does not work on Firefox