热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

屏幕外和嵌入式浏览器比较(用于游戏)-Offscreen&embeddablebrowserscomparison(foruseinagame)

WevebeenlookingataddingdecentbrowsersupporttoourC++application;thisquestionisaboutG

We've been looking at adding decent browser support to our C++ application; this question is about GUI-independent browser libraries since our project involves 3D rendering and doesn't quite fit a normal GUI.

我们一直在寻找为我们的C ++应用程序添加不错的浏览器支持;这个问题是关于GUI独立的浏览器库,因为我们的项目涉及3D渲染,并且不太适合普通的GUI。

The two I've seen so far are Berkelium and Awesomium. Both seem to work in a similar way from my quick investigation, rendering to an offscreen-buffer which you blt into your own window/game/anything. Awesomium is proprietary and costs a fair amount ($5k), Berkelium is open-source and free. Has anyone compared these (and other) such tools? Cross-platform is a benefit but not 100% essential.

到目前为止我见过的两个是Berkelium和Awesomium。从我的快速调查看,两者似乎都以类似的方式工作,渲染到你自己的窗口/游戏/任何内容的屏幕外缓冲区。 Awesomium是专有的并且花费相当多($ 5k),Berkelium是开源和免费的。有没有人比较过这些(和其他)这样的工具?跨平台是一种好处,但不是100%必不可少的。

3 个解决方案

#1


13  

Take a look at the Chromium Embedded Framework. CEF 3 supports off-screen rendering on all operating systems: Windows/Mac/Linux.

看一下Chromium Embedded Framework。 CEF 3支持所有操作系统上的屏幕外渲染:Windows / Mac / Linux。

#2


11  

Disclaimer: I created Awesomium. Nevertheless, I will practice the utmost objectivity in my response.

免责声明:我创建了Awesomium。不过,我会在回应中尽最大的客观性。

Awesomium does cost a bit of money but it is definitely the best tool for the job, I'll defend my reasons with a bulleted list:

Awesomium确实花了不少钱,但它绝对是这项工作的最佳工具,我会用项目符号列表来捍卫我的理由:

  • Simple, well-documented API; we've tried our best to keep the API as intuitive and readable as possible. That's really important when you're embedded something as large and complex as an entire browser framework. (Believe me, you don't want to embed WebKit directly-- that's like swallowing the sun.)

    简单,记录良好的API;我们尽最大努力保持API尽可能直观和可读。当你嵌入像整个浏览器框架一样大而复杂的东西时,这一点非常重要。 (相信我,你不想直接嵌入WebKit--这就像吞下太阳一样。)

  • Windowless rendering; the library was designed from the outset to be used outside of a standard "windowing framework". We make it really easy to render a WebView to a texture:

    无窗口渲染;该库从一开始就被设计为在标准“窗口框架”之外使用。我们可以很容易地将WebView渲染到纹理:

void update()
{
    if(webView->isDirty())
        webView->render()->copyTo(texture, width * bpp, bpp, false);
}
  • Solid Javascript integration; if you use Awesomium as an HTML GUI renderer for your 3D game, you'll definitely want to take advantage of our Javascript <-> C++ integration. You can call Javascript functions directly from C++ and vice-versa, set callbacks, expose global properties, and more. I wrote up a big guide on my blog here.

    扎实的Javascript集成;如果您使用Awesomium作为3D游戏的HTML GUI渲染器,您肯定希望利用我们的Javascript <- > C ++集成。您可以直接从C ++调用Javascript函数,反之亦然,设置回调,公开全局属性等。我在博客上写了一篇大指南。

  • Well-supported; we use the money we get from our top-tier commercial licenses to fund support and development of the library. If you need help, please visit http://support.awesomium.com and we'll be glad to lend a hand.

    很好的支持;我们使用从顶级商业许可证中获得的资金来资助图书馆的支持和开发。如果您需要帮助,请访问http://support.awesomium.com,我们很乐意帮助您。

The library is free for non-commercial use and very affordable for indie developers. If you'd like to use Awesomium in your next project and are worried about the price-point, please email me at adam@khrona.com and I'll see if I can't help you out. :-)

该库免费用于非商业用途,对于独立开发者来说非常实惠。如果您想在下一个项目中使用Awesomium并担心价格问题,请发送电子邮件至adam@khrona.com,我会看到我是否无法帮助您。 :-)

#3


3  

Berkelium is really painless to use. I integrated it into my game in 6 days, you can read all about it (and some other options) here: http://www.onemanmmo.com/index.php?cmd=newsitem&comment=news.1.31.0

Berkelium的使用非常轻松。我在6天内将它集成到我的游戏中,您可以在这里阅读所有相关内容(以及其他一些选项):http://www.onemanmmo.com/index.php?cmd = newsitem&comment = news.1.31.0

The only downside is no debug build and 40MB of binaries.

唯一的缺点是没有调试版本和40MB的二进制文件。


推荐阅读
author-avatar
打篮球的乔巴
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有