Game Development Stack Exchange is a question and answer site for professional and independent game developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The game I've been working on uses opengl/sfml for graphics. I'm currently working on the interface and I've found determining all the proper offsets/positioning etc. to be a pain. To make it configurable, I'll likely end up parsing a making a bunch of xml files to parse that tell my program what images to use/where to position them stc. for the interface.

Since I'm going to need to do that anyways, I was curious if it's possible to embed an html renderer into an app, and have it display over graphics drawn in opengl? That way i could theoretically use html pages to design the interface

If it is possible, how difficult would it be and is it a good idea? are there any projects that do this already?


share|improve this question

closed as off-topic by Josh Petrie Apr 14 '15 at 17:45

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about "how to get started," "what to learn next," or "which technology to use" are discussion-oriented questions which involve answers that are either based on opinion, or which are all equally valid. Those kinds of questions are outside the scope of this site. Visit our help center for more information." – Josh Petrie
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 10 down vote accepted

Try looking at Awesomium - it wraps the Chromium engine in a 3D renderer and HTML UIs are one of their main selling points.

share|improve this answer
+1 : I'm using it in a game. Here is a video of an early version of Awesomium (with Navi+Ogre3d) – Klaim Jul 26 '11 at 9:35
@Klaim What are the in-game perfs like? I would think HTML5 isn't really suited for interfacing; is it easy to get the results you want? – Jonathan Connell Jul 26 '11 at 12:51
Well I'm in a specific case : first, I don't have the full game yet, it's paused for some reasons and I'll get back on it only at the end of this year; but it's suprisingly fast! There are other games using this version of Awesomium like this indie kart game I can't remember the name... check on the website, eve EVE Online replaced their own solution with this one. About getting your results: what I need in my game is kind of fake/game-specific web pages so it's always what I want...if you can master CSS! I don't use it for everything though, the HUD needs different kind of rendering. – Klaim Jul 26 '11 at 13:19
Wolfire use Awesomium for their user interface in Overgrowth. Two blog posts describing how they use it are here and here. – Martin Foot Aug 11 '11 at 6:48

Also, take a look at libRocket.

It's kind of based on HTML4 but it allows you to extend it rather easily with custom components, if you import a reset stylesheet things like h1 and hr will work, and by default it supports these elements.

there are also samples with a SFML renderer available and it's open source (MIT licence, allows you to use it in closed source projects without problems).

I've not used it with SFML yet myself, but with the Ogre3d samples it was really easy to set up.

share|improve this answer

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