Open
Description
Hi, I'm using the latest release of pythonocc and I'm trying to test it by running the test file:
test/core_display_wx_unittest.py
When I run this script a window pops displaying the box but it closes automatically. On my terminal I get the error message:
INFO:OCC.Display.backend:backend loaded: wx
INFO:OCC.Display.SimpleGui:GUI backend set to: wx
###### 3D rendering pipe initialisation #####
Display3d class initialization starting ...
Aspect_DisplayConnection created.
Graphic_Driver created.
V3d_Viewer created.
AIS_InteractiveContext created.
V3d_View created
WNT window created.
TKOpenGl | Type: Error | ID: 0 | Severity: High | Message:
Error! OpenGL context reports version 4.5 but does not export required functions for 4.5 (glGetnCompressedTexImage)
Please report this issue to OpenGL driver vendor 'intel'
Display3d class successfully initialized.
I catch an error linked with OpenGL but I have no idea how to solve it. I tried to locate also the last call and this happens at the line 178 in OCCViewer.py: self.Init(self._window_handle)
Activity
tpaviot commentedon Jun 16, 2020
It's an issue related to your opengl driver. It may be an old graphic card, or an outdated opengl driver. Try to update the driver to its latest version.
cafhach commentedon Sep 28, 2020
We never managed to get OpenCASCADE visualization working with VNC - if that is the case for you too. What worked however was to use a VNC server which is using the X server of the host system.
waterbug commentedon Jan 3, 2021
Just to provide another data point: I got the same error message about OpenGL context when using the pythonocc-core 7.4.1 package for python 3.7 from the conda-forge channel (build py37hc019675_0). Then I checked what would happen with 7.4.0 by doing 'conda install pythonocc-core=7.4.0' from the dlr-sc channel -- which also installed freeimageplus-3.18.0 from the dlr-sc channel. Modifying the code that instantiates OCCViewer.Viewer3d to pass in a handle (using GetHandle()), as required in 7.4.0,
it works fine.
Seems strange that 7.4.1 would encounter an OpenGL driver error and 7.4.0 does not ... that seems like it would be more than a minor version difference!
Further info about the system:
The laptop I'm running the code on is an HP ENVY m7 notebook with an Intel HD Graphics 620 and NVIDIA GeForce 940MX, and when I run "update driver" on each one, Windows claims that the best driver for each is already installed.
waterbug commentedon Jan 3, 2021
The above comment also applies using the python 3.8 conda packages from the conda-forge channel: 7.4.0 work fine, 7.4.1 gives the OpenGL driver error.
waterbug commentedon Jan 4, 2021
One more comment: I am still getting the OpenGL error with the python 3.8, pythonocc-core 7.4.0 package from the conda-forge channel, but it runs fine (but 7.4.1 crashes) on Windows 10 and on Ubuntu 20 (actually on PopOS, which is derived from Ubuntu).
haifengas commentedon Jan 25, 2021
I have run it on version 7.4.1 and python3.8, but do not kown why it can.
`
`
tpaviot commentedon Apr 1, 2021
A possible fix that seems to work (at least it works on my machine). Open the file
[...]\lib\site-packages\OCC\Display\qtDisplay.py
, and change the line38
from:to
Any report is welcome
kozintsev commentedon Jun 4, 2021
I reproduce the problem on my notebook.
Notebook Dell G3 3500
GPU:
C:\Users\okozi.conda\envs\pyoccenv\python.exe C:/Users/okozi/Documents/GitHub/pythonocc-demos/examples/core_helloworld.py
qt-pyqt5 backend - Qt version 5.15.2
####### 3D rendering pipe initialisation #####
Display3d class initialization starting ...
Aspect_DisplayConnection created.
OpenGl_GraphicDriver created.
V3d_Viewer created.
AIS_InteractiveContext created.
V3d_View created
WNT window created.
TKOpenGl | Type: Error | ID: 0 | Severity: High | Message:
Error! OpenGL context reports version 4.6 but does not export required functions for 4.5 (glGetnCompressedTexImage)
Please report this issue to OpenGL driver vendor 'intel'
Display3d class successfully initialized.
#########################################
OpenGl information:
GLvendor: Intel
GLdevice: Intel(R) UHD Graphics
GLversion: 4.6.0 - Build 26.20.100.7642
GLversionOcct: 4.4
GLSLversion: 4.60 - Build 26.20.100.7642
Max texture size: 16384
Max FBO dump size: 4096x16384
Max combined texture units: 192
Max MSAA samples: 16
Viewport: 1023x767
ResolutionRatio: 1
INFO:OCC.Display.qtDisplay:key: code 16777249 not mapped to any function
Process finished with exit code 0
Possibly a problem with the GeForce Experience
Tanneguydv commentedon Sep 14, 2021
I've recently change the graphic card associate with my
python.exe
from pythonocc env, I've chosen my nvidia Quadro T2000 rather than my integrated Intel one and it works only with the modifications you have suggested, thank you.kozintsev commentedon Sep 30, 2021
This helped also the settings that @Tanneguydv wrote about
waterbug commentedon Sep 30, 2021
akhenaton2 commentedon Apr 27, 2022
Hello,
I am trying to find this file. I figure out the path by looking on internet "C:\Users\serge.conda\envs\pyoccenv\lib\site-packages\OCC\Display\qtDisplay.py". Serge has to be of course replaced by your name/name of user.
In the path "C:\Users\serge.conda" I only have a text file "environments.txt", I can not go deeper in the folder.
Any help appreciated to solve the salome problem ! thanks
EricMaoMao commentedon Jul 27, 2022
@akhenaton2
You can try to use
conda env list
command in your terminal to locate your path of environment, and try to find the file "qtDisplay.py".But the solution of tpaviot in https://github.com/tpaviot/pythonocc-core/issues/836#issuecomment-811636414 can not make out in my code, which I assume might be the problem of GL driver's compatibility. I will try to downgrade the driver.
My GL info like kozintsev is:
Error occur when use code:
with pythonocc-core-7.4.1 and occt-7.4.0.
Error message:
in
jkbgbr commentedon Dec 11, 2022
Just solved this issue I had with both the cards on my laptop: an Intel UHD 620 and an Nvidia MX250.
In both cases the solution was to do a clean install (removing the old and resetting to factory settings) of the latest driver downloaded from the vendor side, checking the driver through the OS did not yield anything.