ultralight-ux / Ultralight

Lightweight, high-performance HTML renderer for game and app developers.
https://ultralig.ht
4.67k stars 195 forks source link

Browser inside browser as an img source #109

Open PhilAndrew opened 5 years ago

PhilAndrew commented 5 years ago

Feature request.

I want to be able to access the rendered image of one of the browser from inside the HTML of another browser by referencing it as an img tag source, in the ideal case it is a html dom image which I can reference as any normal image. I wish this to happen in real-time, so I can have a browser inside the browser, apply clipping and filtering within the browser.

The consequence of this is that it will allow me to use browser in three.js or cutting up image contents to display parts of other web-pages, this is useful for doing games where the game is written to run within the browser, the game-engine is inside the browser. I can then have a HUD display from another browser etc.

PhilAndrew commented 5 years ago

Or how about able to access a opengl texture from inside the browser in Webgl?

SupinePandora43 commented 4 years ago

ultralight at this point dont support webgl image why you just dont use <iframe>? if you need get image from another browser window: call view->bitmap()->isdirty() then if true : read image pixel by pixel from memory and draw it on canvas