PDA

View Full Version : Webpage and Opengl



Soumyadipta
05-09-2007, 11:28 PM
I have created an opengl application using visual c++ which simply draws an arrow between two points.

I have created an window using window class.Currently my application window background is black and i am able to draw an arrow over it.

I want to view any web page in my application background and then render an arrow.

Please give a proper idea

Korval
05-09-2007, 11:56 PM
I want to view any web page in my application background and then render an arrow.

Please give a proper ideaOK, step 1: Write a web-browser. One that renders through OpenGL.

When you get done with that (it'll take a while), I can tell you about step 2.

Kumar K
05-09-2007, 11:58 PM
Can you elobrate your question little more clearly.

If you want to render just an arrow why you want to use OpenGL at all, why cant u use simple GDI?

Are you using MFC window and with an browser control on it ?

However OpenGL doesnt allow uses to load webpage as background, you can only set colours to clear.
If you insist to use OpenGL inyour application one of the many possible answers would be load the url in a hidden window and capture the screen as image and load it as texture in GL and set it to background polygon... ( :) this is a crazy idea)

Thanks
Kumar.k

dorbie
05-10-2007, 12:42 AM
You could probably get an html renderer out of the mozilly/firefox project (I think you'd be looking for Gecko there) or similar but it's a significant task. Then you'd render to a buffer load to texture and use that in your OpenGL app.

If that's what you want to do......

Here's a review of html renderers in a java context. There's also JOGL and you may want to use that if you have a heavy web focus.

http://today.java.net/pub/a/today/2004/05/24/html-pt1.html

Here's some info on Gecko:

http://developer.mozilla.org/en/docs/Gecko_FAQ

V-man
05-10-2007, 08:29 AM
The answer was posted here recently
http://www.gamedev.net/community/forums/topic.asp?topic_id=447037