Offscreen & embeddable browsers comparison (for use in a game) [closed]
Asked Answered
C

3

17

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.

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.

Carpometacarpus answered 22/2, 2011 at 9:29 Comment(1)
This is clearly off-topic, as it is about recommending an off-site resource.Pintle
E
13

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

Ebullient answered 1/7, 2013 at 19:23 Comment(0)
E
11

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

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:

  • 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.)

  • 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:

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.

  • 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.

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 [email protected] and I'll see if I can't help you out. :-)

Elburt answered 7/4, 2011 at 16:56 Comment(6)
Thanks for your reply. Out of interest, have you got any direct comparison with the other library I mentioned? I have no interest in starting from scratch, I agree it's way too much work!Carpometacarpus
Sure, Berkelium's API is a bit more bare (you have to implement a little extra) but it does many of the same core things as Awesomium (no coincidence there, Berkelium was created after Awesomium). Both support Windows and Mac OSX, Berkelium also supports Linux. Awesomium has a lot extra modifications: global stylesheets (to style scrollbars, etc), JS callbacks, header re-writing, URL filtering, custom resource loading, HTML-string loading, custom cookies, pause/resume, and more. You can add all that yourself to Berkelium/Chromium source, would just take a lot longer.Elburt
Some other frameworks to look at as well: CEF (more for windowed-embedding of Chromium), QtWebKit (great if you're using Qt already), Mozilla Gecko (ugh, XPCOM), EAWebKit (pretty raw but it supports PS3 and xbox360). Hope this helps.Elburt
My main problem with both of them is neither seem to have a 64-bit version on OSX with breaks my build system... don't have time to deal with that.Vraisemblance
Any plans on 64 Bit versions? EVERYTHING on Awesomium looks promising except this ;)Spectator
Awesomium doesn't offer x86_64 builds on mac :/ I don't want to have to degrade my toolchain just to use it.Krebs
S
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

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

Sharasharai answered 14/4, 2011 at 7:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.