Using HTML for interface?

user127817
  • Using HTML for interface? user127817

    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?

    Thanks

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

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

Tags
c++ opengl interface
Related questions and answers
  • I've been using SDL 1.2.14 for awhile without using many of the features from newer OpenGL versions. I'm now interested working only with the 3.3 API (not using the deprecated functions, etc... that's the latest my graphics card supports), but I'm having trouble getting set up. Here's some information about my development environment: Windows 7 64 bit Eclipse Helios CDT Mingw Toolchain C++ I've tried building SDL 1.3 and following this tutorial. This ended up being a pretty big pain and I gave up amid a stream of compile errors - I'd prefer to not go this route if possible. I know also

  • Is it possible to use OpenGL purely with C instead of C++? I am wanting to make sure there won't be any problems with my using C and not C++. OpenGL does not depend on any C++ libraries right?

  • and likely won't turn out to be an actual game, I'll be happy to make a nice graphics demo and learn about 3d rendering and c++ design. My intent is to use direct3d9 for rendering as I have some little... be implemented for d3d11, opengl... My question then is what level is it best to do this at? I'm thinking that an interface capable of creating and later drawing Vertex buffers and index buffers... use the interface to obtain abstract vertex buffers etc. I worry though that it's too low level to abstract out all the functionallity I need efficiently. The alternative is to do this at a higher

  • Lately I have been working on a game that i plan to make online. I have used different libraries to make this game as far as i could, but I feel that I should rethink on how Im sertting this game up, so I planned to start over. The libraries that I have used are SFML, OpenGL, and Bullet Physics, along with GLM to load the models. But the problem is that the 3D graphics arent working... better. I would also like compatability, If Theres one that fits DirectX(at least 9) and OpenGL, then that would be good) 2D Graphics(I liked SFML, so it its possible to get something that works with SFML

  • I'm looking into building a cross-platform opensource 2D RPG style game engine for ChaiScript. I want to be able to do all of the graphics with SVG and need joystick input. I also need the libraries I use to be opensource and compatible with the BSD license. I'm familiar with allegro, ClanLib, and SDL. As far as I can tell, none of these libraries have built in or obvious integration for SVG... support in a 2D C++ library while minimizing dependencies as much as possible (preferably avoiding Qt altogether)?

  • I'm working on learning network programming. I'm working on a simple card game. The basic idea is: Players enter the lobby Players see tables Players sit at an empty seat Once they sit, they do... consistently updated for each person in the lobby (eg: MSG_TABLE_FILLED, 22) Ideally I'd like to have 1 server exe for all of this and to have to deal with multithreading as little as possible. I'm going to use the enet library. I was thinking that each time a game session starts, I push a new Game and I map the client IPs to that table, then I just route messages from those clients

  • I'm trying to make a GUI library with SFML, and everything's done except for one problem: making the interface stay still even when the camera moves or zooms in and out. This would be easy to fix if zooming wasn't possible, but zooming out means having to scale the contents of the interface up so it doesn't shrink, which causes it's text/images to become blurry. Does anyone have a way to get around this issue (preferably only using SFML as I don't want to make my library OpenGL-dependent)?

  • I'm trying to get a 2 pass post-processing system going in OpenGL in a cross-platform manor using FBOs. I'm starting the dev on mac OSX (since in the past I've found it the most finicky to get working of windows/linux/osx), I have a toggle to toggle between using the FBO(post-processing) and not. The shaders are working, but it seems the FBO didn't load the texture unit bound to it. The following.... (Also I can't seem to get it glTexImage2d a image of size width and height. says invalid values, and if I try to use GL_TEXTURE_RECTANGLE it says invalid enum :-/ but that's for a different question

  • I don't get how coord (a UV vec2 in my mind) is equal to the dot product (a scalar value)? Same problem I had before with "g". What do I set the plane to be? In my opengl c++ 3.0 code, I set... Language 1.0 Several sites have mentioned that this should be "easy" to do in a GLSL vert shader. But I just can not get it to work. My hunch is that I'm not setting the planes up correctly, or I'm missing something in my understanding. I've pored over the web. But most sites are talking about projected textures, I'm just looking to create UV's based on planar projection. The models are being built

Data information