Render OCCT view into a floating window#5
Open
MattiaMontanari wants to merge 1 commit intoeryar:mainfrom
Open
Conversation
eryar
reviewed
Feb 14, 2025
| $<$<CONFIG:Release>:${RELEASE_LIBS}> | ||
| ) | ||
|
|
||
| # Debug environment variables (for Windows) |
tx-code
reviewed
May 15, 2025
| Handle(Aspect_DisplayConnection) aDispConnection = | ||
| new Aspect_DisplayConnection(); | ||
| Handle(OpenGl_GraphicDriver) aDriver = | ||
| new OpenGl_GraphicDriver(aDispConnection, true); |
There was a problem hiding this comment.
Perhaps the issue lies in the fact that you have initialized a new OpenGL context here once again, which might be conflicting with the existing one.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm trying to expand the example by moving the 3D interactive scene into a floating window. My understanding is that this requires OCC to render into a buffer and then
imgui::Image(or similar functionality) to render the buffer into the GUI. However I'm getting stuck.I've imported a new class adapted from here OffScreenRenderer. I initialise it but then I get an OpenGL error when I try to render the image into the buffer with
ToPixMap.@gkv311 maybe you can help me. Do you know if the error comes from the fact that an application cannot have on-screen and off-screen renderers at the same time? Or perhaps because I'm using a general
Aspect_NeutralWindowfor the off-screen renderer?