View.initializeGL

View.initializeGL()[source]

Initialize the OpenGL canvas.

This implements the virtual funtion of the OpenGL widget. See the PySide2 docs [1] for more info. It sets the clear color of the view, and enables culling, depth testing, blending, point smoothing, and line smoothing.

To extend the behaviour of this function, you can implement init().

References

1

https://doc.qt.io/qtforpython-5.12/PySide2/QtWidgets/QOpenGLWidget.html#PySide2.QtWidgets.PySide2.QtWidgets.QOpenGLWidget.initializeGL