C ++ OpenGL应用程序作为Web服务 [英] C++ OpenGL application as a web service

查看:153
本文介绍了C ++ OpenGL应用程序作为Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们已经创建了C ++ OpenGL应用程序可视化哪一些物理模拟。基本应用程序包含其用于通过一个简单的GUI DLL中。它当前运行在台式机上,但我们的想法,把它变成一个Web服务。

We have created an OpenGL application in C++ which visualizes some physical simulations. The basic application is contained within a DLL which is used by a simple GUI. It currently runs on a desktop PC, but we have the idea to turn it into a web service.

由于模拟需要专用的硬件,这个想法是,一​​个用户通过他/她的浏览器可以与我们的作为服务的应用程序进行交互,然后该服务的结果呈现给一个图像(jpg或任何适当的),那么,可以显示/更新的浏览器。

Since the simulations require dedicated hardware, the idea is that a user, through his/her browser can interact with our application as a service and this service then renders the result to an image (jpg or anything appropriate) that can then be displayed/updated in the browser.

我的问题:
我怎么能轻而易举地描述成一些服务器上运行,这样我可以在网上接近它的Web服务变成一个C ++应用程序?我应该看什么样的技术/ API的?而是否有解决类似的问题,任何现实生活中的例子?

My question: How can I "easily" turn a c++ application as described into a web-service that runs on some server so that I can approach it over the web? What kind of technologies/APIs should I look at? And are there any real-life examples that tackle a similar problem?

推荐答案

这是可能的,但你有一个主要的困难是试图使用OpenGL从web服务。你需要这个端口做100%的离屏渲染和工作,而一个窗口背景。这将是我的第一步,而且它并不总是微不足道的。

This is possible, but one major difficulty you'll have is trying to use OpenGL from a web service. You'll need to port this to do 100% offscreen rendering and work without a windowing context. That would be my first step, and it's not always a trivial one.

此外,它是很难维持和web服务正确管理你的OpenGL上下文,以及所涉及的开销可能是相当痛苦的。根据效果图的数量和种类,您可能会遇到一些问题存在。

Also, it is very difficult to maintain and manage your opengl contexts from a webservice correctly, and the overhead involved can be quite painful. Depending on the number and types of renderings, you may run into some issues there.

这篇关于C ++ OpenGL应用程序作为Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆