Web Browser on Direct3d Surface
Is there any way to get a web browser to render on a direct3d surface? I really want to have it embedded in an XNA game. Someone on another forum mentioned that I look at the Valve's Source SDK. I tried that by creating a mod and searching for the code... but I couldn't find it.
Any help or suggestions would be greatly appreciated.
-Dave
Interesting challenge - one that I'd hope will get easier with the Vista+1 generation!
I'd imagine you'd need to use some Win32/GDI black magic to create a regular Win32 application with a minimal browser embedded in it and then use GDI to grab the Window's HDC and copy this directly to an IDirect3DSurface9 as part of a texture...
In short, I've never seen these sorts of things pulled off without code that doesn't come across as a complete fudge/hack [headshake]
hth
Jack
I'd imagine you'd need to use some Win32/GDI black magic to create a regular Win32 application with a minimal browser embedded in it and then use GDI to grab the Window's HDC and copy this directly to an IDirect3DSurface9 as part of a texture...
In short, I've never seen these sorts of things pulled off without code that doesn't come across as a complete fudge/hack [headshake]
hth
Jack
Then, how are upcoming web-browser games (quake3online, battlefield online) actually made ? What kind of API do they use ?
I was looking at that earlier... not sure how nicely OpenGL and DirectX would play together...
I have not had a chance to use it but from what I can tell (I need this functionality too), LLMozLib is what actually does the web "rendering" and spits out a bitmap/image of some format.
OpenGL is used by the uBrowser to render it. In your case, you would use LLMozLib inside your program and take the image from LLMozLib and blit it on the DX texture.
I do not think LLMozLib has anything to do with either OpenGL or DX.
OpenGL is used by the uBrowser to render it. In your case, you would use LLMozLib inside your program and take the image from LLMozLib and blit it on the DX texture.
I do not think LLMozLib has anything to do with either OpenGL or DX.
Part of LLMozLib header:
You are not using uBrowser (which is OpenGL based application), you are using LLMozLib which renders the browser image in memory, it is up to you how you will display it.
Anyone used it before? Am I wrong?
// access to rendered bitmap dataconst unsigned char* grabBrowserWindow( int browserWindowIdIn ); // renders page to memory and returns pixelsconst unsigned char* getBrowserWindowPixels( int browserWindowIdIn ); // just returns pixels - no renderconst int getBrowserWidth( int browserWindowIdIn ); // current browser width (can vary slightly after page is rendered)const int getBrowserHeight( int browserWindowIdIn ); // current heightconst int getBrowserDepth( int browserWindowIdIn ); // depth in bytesconst int getBrowserRowSpan( int browserWindowIdIn ); // width in pixels * depth in bytes
You are not using uBrowser (which is OpenGL based application), you are using LLMozLib which renders the browser image in memory, it is up to you how you will display it.
Anyone used it before? Am I wrong?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement