Page 1 of 1

html rendering in 3d app

Posted: Mon Jan 24, 2011 1:55 pm
by roxaz
is anyone aware of any lib or anything that would let me render html in a 3d application?

Posted: Mon Jan 24, 2011 2:27 pm
by Radikalizm
Do you mean as in being able to display webpages in your 3D application?

Posted: Mon Jan 24, 2011 2:48 pm
by Brainsaw
Hmm ... I don't know of any solution, but this would definetely be cool ... using HTML to design some textures and stuff.

Posted: Mon Jan 24, 2011 2:51 pm
by roxaz
if webpages would work that would be awesome. however now im aiming for very basic html rendering. there is opensource server software that im making client for.. and it sends NPC texts in html format.

so far i found article (http://www.codeproject.com/KB/IP/htmlimagecapture.aspx) on how to make a screenshot of page without loading it. i guess it could be rendered, but not sure how with interacting with the page.

Posted: Mon Jan 24, 2011 2:57 pm
by Radikalizm
There's a difference between rendering HTML and parsing HTML, I think what you want is a HTML parser, which I think you could find a simple library for

If you had a lot of time on your hands you could even write this yourself I suppose...

Posted: Mon Jan 24, 2011 3:02 pm
by roxaz
im not familiar with any html parser lib so tell me how they work... in crude words do they make like a list of elements with their coords to be drawn or do i have to calculate all that myself?

Posted: Mon Jan 24, 2011 3:10 pm
by Radikalizm
A HTML parser would just be a library able to read HTML-formatted data and put them into usable data structures

eg. you would create a table structure in HTML and the library would be able to extract this data from the table so you could use it

This is essentially how every simple script parser works, and I'm sure you could find a library like this somewhere (although I'm not familiar with any)

Is there any specific reason on why you want to use HTML to accomplish this, instead of for example XML?

Posted: Mon Jan 24, 2011 3:24 pm
by roxaz
well to be honest im looking for most useful and easiest way to reach the goal. in example server has admin panel that is scripted with html and sent to client. if in-game window could render that it would be very useful. what i am rly trying to avoid is calculating element positions in the window. that would take time i cant invest now.. i already have backup solution ready using xml, but it is very basic, just drawing some text in predefined text area, and binding events up to 5 buttons. but buttons and text always remain in same place, not very reusable. using this solution server admin panel goes right out through the window - got to make custom windows to handle all that..

Posted: Tue Jan 25, 2011 9:09 am
by kalvinorama
Hello,

I remember have seen a library for doing that. But i can't refind this. It is the dual of WebGL, and it has been release at the same period.

Another one, but looks a little bit less serious :
http://www.ubrowser.com/

Posted: Tue Jan 25, 2011 10:31 am
by loki1985