-
-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
[Question]CEF Off-Screen-Rendering + ImGUI #1140
Comments
I have no idea what CEF is. Please clarify the question and the context.
You can use AddImage() to render anything that your imgui renderer wants to handle, and you can use render callbacks as well.
… On 13 May 2017, at 12:09, Centurius123 ***@***.***> wrote:
Hello guys,
I have a Question. Is it possible to add CEF into a ImGUI Window?
I get on the CEF onPaint Function a buffer and can I at this buffer into a ImGUI Window?
void CEFView::OnPaint(CefRefPtr<CefBrowser> browser, CefRenderHandler::PaintElementType paintType, const CefRenderHandler::RectList& dirtyRects, const void* buffer, int width, int height)
―
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Ohh sorry! I try to open a Website and draw this Website into a ImGUI Window |
So the most typical approach would be to render CEF into a texture, which may already be the case.
Then depending on how your imgui renderer loop handle ImTextureId you can pass the information of this texture to eg AddImage().
ImTextureId is basically a void* type can you use to pass texture/material information from your app code to your renderer code.
|
I try to use ImGUI::Image, but my game crashs. |
If something crash please specify exactly why and in which condition. Uploading a texture to your renderer/engine is up to you, it's generally a simple/common task. If you are using one of the stock imgui_impl_xxx.cpp examples so you can see how they upload textures. For example OpenGL uses glGenTextures+glBindTexture+glTexImage2D |
I use dx11 |
You upload it into a texture and pass this texture pointer to AddImage(). |
Do you have an example for addimage? |
Use ImTextureID = ID3D11ShaderResourceView* if you are using imgui_impl_dx11.cpp renderer. |
I was looking for it!
|
Please provide your code snippet.
Please provide info about the crash.
… On 17 May 2017, at 01:33, rafadsm20 ***@***.***> wrote:
I was looking for it!
Is it possible to use ImGui to render the buffer using DX9?
I tried using ImGui :: Image and drawlist-> addimage, but crash
―
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.
|
My code:
Visual Studio ScreenShot I also tried to store a buffer in a texture using: In Definitions In OnPaint:
In Draw Function:
OnPaint API Docs: http://magpcss.org/ceforum/apidocs/projects/(default)/CefRenderHandler.html#OnPaint(CefRefPtr,PaintElementType,constRectList&,constvoid*) |
Is Also this PS: When posting attachment, please use the github attachment system. |
Could you help me convert the buffer to an IDirect3DTexture9 texture?
|
Sorry this question has nothing to do with imgui. Try to look up the answer elsewhere. |
Try to use CreateDDSTextureFromMemory() |
Hello guys,
I have a Question. Is it possible to add CEF into a ImGUI Window?
I get on the CEF onPaint Function a buffer and can I at this buffer into a ImGUI Window?
void CEFView::OnPaint(CefRefPtr<CefBrowser> browser, CefRenderHandler::PaintElementType paintType, const CefRenderHandler::RectList& dirtyRects, const void* buffer, int width, int height)
The text was updated successfully, but these errors were encountered: