简体   繁体   English

如何优化远程桌面/角度的 OpenGL 纹理?

[英]How do I optimize my OpenGL textures for Remote Desktop/ANGLE?

I display a 2D texture in OpenGL using Qt.我使用 Qt 在 OpenGL 中显示 2D 纹理。 Unfortunately I have found out that I need to support running my application via Remote Desktop to a Windows 7 PC.不幸的是,我发现我需要支持通过远程桌面将我的应用程序运行到 Windows 7 PC。 In this case I need to use OpenGL ES 2.0 API (ANGLE).在这种情况下,我需要使用 OpenGL ES 2.0 API(角度)。 Due to low bandwidth my 2D visualization seems to be lagging.由于带宽低,我的 2D 可视化似乎滞后。

My texture may have higher resolution than the screen so that it needs to be minified.我的纹理可能具有比屏幕更高的分辨率,因此需要对其进行缩小。 When not using remote desktop my approach have been to specify a very detailed texture and let the graphics card do the minification.当不使用远程桌面时,我的方法是指定非常详细的纹理并让显卡进行缩小。

However now I am thinking that the OpenGL calls are executed in software locally and not on the remote machine?但是现在我在想 OpenGL 调用是在本地软件中执行的,而不是在远程机器上执行的? In which case the textures have to be transmitted via TCP/IP?在哪种情况下必须通过 TCP/IP 传输纹理?

Does this mean that I should do minification myself before using the textures?这是否意味着我应该在使用纹理之前自己进行缩小? As an example instead of using a 2048x2048 texture I may bin 2x2 pixels in C++ and upload a 1024x1024 texture.作为示例,而不是使用 2048x2048 纹理,我可以在 C++ 中合并 2x2 像素并上传 1024x1024 纹理。

Alternatively I could use glGenerateMipmap ?或者我可以使用glGenerateMipmap吗?

I feel multiple terms are confused here: RDP just transfers the entire remote desktop for you whatever is on it, so no "OpenGL calls are executed in software locally".我觉得这里有多个术语感到困惑:RDP 只是为您传输整个远程桌面上的任何内容,因此没有“OpenGL 调用在本地软件中执行”。 Hence, unfortunately it will not help if you reduce the texture size in your app, even if you remove it entirely (try it).因此,不幸的是,如果您减小应用程序中的纹理大小,即使您完全删除它(尝试一下),它也无济于事。 RDP is not really suitable for real time animation. RDP 并不真正适合实时 animation。

Your app better be running locally on the user machine, so better to think how to distribute your OGL app to users.您的应用程序最好在用户机器上本地运行,因此最好考虑如何将您的 OGL 应用程序分发给用户。 If you cannot install your app on users machine, or give them installation kit, then maybe turning your app to a browser app is a better option.如果您无法在用户机器上安装您的应用程序,或者给他们安装工具包,那么将您的应用程序转换为浏览器应用程序可能是一个更好的选择。

WebGL there for exactly this kind of applications, and is a standard too: https://www.khronos.org/webgl/ WebGL 正是针对这类应用程序,也是一个标准: https://www.khronos.org/webgl/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM