How to prepare OpenGL context (also working Qt python example) #214
Unanswered
JeanElsner
asked this question in
Q&A [deprecated: please use issues]
Replies: 3 comments
-
Not sure what's going on here. However, if you use QOpenGLWindow or just a QWindow and add the OpenGL surface manually, everything works out. I updated the example. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hi, sorry I haven't been replying, but that's mostly because I don't really have anything to suggest. That's still the case, but I'd encourage you to see if the OpenGL changes that we made in 2.1.4 made any difference for you. (I'd be surprised if that's the case, but worth trying anyway I think.) |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for sharing! I met with the same issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This probably isn't a MuJoCo issue. We're trying to render MuJoCo scenes within a Qt GUI using the python bindings provided by PySide6. There is an OpenGL Widget that already prepares an OpenGL context etc. Essentially this works fine, there is however an issue with shadows. Once shadows are activated other features like the skybox, haze and transparent geoms disappear from the rendered output. It seems that the render passes are still computed (runtime increases) but not displayed on the OpenGL surface. I tried to play around with some OpenGL settings to no avail. As far as I can tell the custom
mjrContext
is the same as for glfw, which has no issues.There might be an easy fix for this, if you're an OpenGL expert and/or understand how to prepare the context for MuJoCo :-)
In any case I provide a minimal working example (except for the shadow issue) which some of you may find useful.
https://gist.github.com/JeanElsner/755d0feb49864ecadab4ef00fd49a22b
Beta Was this translation helpful? Give feedback.
All reactions