I am developing a desktop game in C++ and OpenGL. Frameworks I use are GLM and SFML. Since today I used the console window for debug messages. But I want to get rid of that and display debug information right into the render window.

Since I also want to implement a generic way to realize user interface, I decided to use web technologies for that. Note that the user interface will be only a two dimensional overlay on the rendered three dimensional scene. I consider using the webkit browser engine but that might be overkill since I do not need page loading and networking but only HTML and CSS rendering (and maybe JS execution). Because the user interface and debug messages will change every few frames, this is performance related.

How to render fullscreen webpages (with a transparent background) over my OpenGL scene? I would like a cross-platform solution.

  • 1
    \$\begingroup\$ That's one reason why WebGL is awesome. \$\endgroup\$ – Bartek Banachewicz Jan 14 '13 at 10:05
  • 2
    \$\begingroup\$ It's 100% mindblowing how there isn't a library that just works to do this. I mean representing a UI with HTML/CSS is by far the best method, yet nothing good in the game space? It makes no sense. Librocket is horrible. \$\endgroup\$ – user441521 Apr 1 '15 at 16:36

Apart from implementing it yourself, there's http://awesomium.com/, which is basically webkit wrapped in a way that makes it simpler to plug into applications.

http://librocket.com/ is apparently a completely separate html/css engine for games, but apparently hasn't been updated since 2011, so I don't know if it's alive.

| improve this answer | |
  • 3
    \$\begingroup\$ There is also berkelium.org. You can also do it in Qt using a QWebView \$\endgroup\$ – David C. Bishop Jan 14 '13 at 10:23
  • \$\begingroup\$ I will take a look at berkelium because it is BDS licenced and under active development. Hopefully is supports a transparent page background, otherwise I would need a hack. \$\endgroup\$ – danijar Jan 14 '13 at 19:30
  • 1
    \$\begingroup\$ Sadly berkelium as well as other chromium based projects are a bit of overkill providing full browser support covering cookies, ... But I will give it a try. \$\endgroup\$ – danijar Jan 14 '13 at 19:41
  • \$\begingroup\$ There is also the CEF Chromium Embedded Framework project. Its HUGE, but it seems really simple to integrate. \$\endgroup\$ – akaltar Feb 5 '16 at 23:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.