Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rendering html? #4257

Closed
decltypeauto opened this issue Jun 23, 2021 · 3 comments
Closed

Rendering html? #4257

decltypeauto opened this issue Jun 23, 2021 · 3 comments

Comments

@decltypeauto
Copy link

decltypeauto commented Jun 23, 2021

Hi,

I was wondering if anyone has, or if it was even possible, to render html, or preferably render a web page from a URL for example, inside of a Dear ImGui frame? Would surely be useful for a multitude of things. Thanks in advance.

@ocornut
Copy link
Owner

ocornut commented Jun 23, 2021

You can use a HTML renderer such as Chromium to render into a texture and then render that texture in Dear ImGui.

Almost all the work involved to set that up would be with the tech you are using (e.g. Chromium) which may be difficult to setup (unrelated to Dear ImGui).

See
#1902 (comment)
#1140
#1075
https://twitter.com/ocornut/status/890210588600565762

@decltypeauto
Copy link
Author

You can use a HTML renderer such as Chromium to render into a texture and then render that texture in Dear ImGui.

Almost all the work involved to set that up would be with the tech you are using (e.g. Chromium) which may be difficult to setup (unrelated to Dear ImGui).

See
#1902 (comment)
#1140
#1075
https://twitter.com/ocornut/status/890210588600565762

Thank you!

Furthermore, is it possible to render an image directly from a url? So instead of defining an image path, i can just put it as a URL instead.

@ocornut
Copy link
Owner

ocornut commented Jun 23, 2021

Furthermore, is it possible to render an image directly from a url? So instead of defining an image path, i can just put it as a URL instead.

We already have a rather extensive tutorial on loading textures because even if it is out of scope of Dear ImGui, that sorts of questions keeps on coming:
https://github.com/ocornut/imgui/wiki/Image-Loading-and-Displaying-Examples
Loading a file from the internet is more largely out of scope of this project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants