HOW CAN I SET WEBPAGE AS A BACKGROUND IN MY OPENGL APPLICATION

Started by
10 comments, last by Ravuya 16 years, 11 months ago
I have a opengl application which simply draws many geomatrical shapes,i want to use web page as background of my application so that i can draw circles or any shapes over this web pages
Advertisement
YOU MIGHT WANT TO LOOK INTO THE WEB-BROWSER CONTROL THAT ie USES TO RENDER HTML
http://www.microsoft.com/technet/archive/ie/reskit/ie4/Part2/part2c.mspx
AND THEN FIND A WAY TO COPY IT'S SURFACE TO A GL TEXTURE [/allcaps]
If you are using OpenGL you probably want to avoid relying on IE.

Gecko (used by mozilla) is probably a better option as it is opensource and is triple licenced , MPL/GPL/LGPL (choose the one that suits your project)

More info here
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Thanks for replies but can u guys give me any exact idea to how to include webpages as a background in my opengl application
Sorry, can't give you any exact info because I've never done it.
I can tell you though, that its not going to be as easy as "just call this function", or "here, use this code". It's a fairly big task, actually.

You're going to have to research and then integrate a HTML rendering engine into your project (You can use the renderer that IE uses, or the one that firefox uses, as stated above), then figure out what format that engine renders to (some kind of buffer in system memory), and then pass that buffer to an openGL texture the same way you do when you load an image.
Quote:Original post by soumya_iiitc
Thanks for replies but can u guys give me any exact idea to how to include webpages as a background in my opengl application


... It is a large task which requires many components, and the problem solving to connect them. This is known as programming. The other posts have pointed you to two options for components to use. To get more detailed, they'd basically have to do the programming for you. If you want somebody to do the programming for you, I suggest drawing up your list of requisites and making a request in the Help Wanted forums (note: there is a manditory template for posting there, I suggest you read the relevant sticky if you post there).

If you have specific questions about specific steps, you can of course post to the other forums about these. But such an overarching request as you've given isn't just asking specific questions -- it's asking us to do a large bulk of what constitutes programming, which most won't do without getting paid for it.
Hi Monkey ,

I am not looking for any kind of code , if any body give a proper direction to this it will be really help full.


I hope this forum will be ablw to give a good idea or a definite path to solve my problem.


Thanks,
Soumyadipta De
the "More Info Here" link pointed to the documentation needed for embedding gecko in another project. you really shouldn't need more.

as far as IE goes i don't really know, but i assume msdn.microsoft.com has all the info you need.
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!
Quote:Original post by soumya_iiitc
I am not looking for any kind of code , if any body give a proper direction to this it will be really help full.
I hope this forum will be ablw to give a good idea or a definite path to solve my problem.


They *did* give you a definite direction; you are going to need to learn how to do research. I'll give a little more detail to set you on the path:

1) get the rendering engine from the firefox project (google around for how to get the source code; it's an open source project so this should be easy)
2) read the documentation and study the code so that you understand how it works
3) add that engine to your openGL project
4) query a webpage and use the rendering engine to render the page to a texture
5) apply that texture to some geometry in your openGL world
6) to get the webpage to work you'll need to implement your own user input system to detect where the user is clicking/typing

Things you have to know before being able to accomplish this project:

a) network programming -> you should already be able to query a webpage and get the html in a little console app.
b) graphics programming -> you should already know how to make an openGL world (without looking at a tutorial)
c) programming in general -> you're going to need to be able to look at the firefox source code, understand the documentation and reverse engineer it enough to be able to add it to your own code

-me

[Edited by - Palidine on May 9, 2007 12:13:48 PM]
Take a look at uBrowser.
--Michael Fawcett

This topic is closed to new replies.

Advertisement