aboutsummaryrefslogtreecommitdiffstats
path: root/examples/quick/scenegraph/openglunderqml/squirclerenderer.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/quick/scenegraph/openglunderqml/squirclerenderer.py')
-rw-r--r--examples/quick/scenegraph/openglunderqml/squirclerenderer.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/quick/scenegraph/openglunderqml/squirclerenderer.py b/examples/quick/scenegraph/openglunderqml/squirclerenderer.py
index f70702e2f..d99219977 100644
--- a/examples/quick/scenegraph/openglunderqml/squirclerenderer.py
+++ b/examples/quick/scenegraph/openglunderqml/squirclerenderer.py
@@ -57,11 +57,13 @@ class SquircleRenderer(QOpenGLFunctions):
def init(self):
if not self._program:
rif = self._window.rendererInterface()
- assert (rif.graphicsApi() == QSGRendererInterface.OpenGL)
+ assert (rif.graphicsApi() == QSGRendererInterface.GraphicsApi.OpenGL)
self.initializeOpenGLFunctions()
self._program = QOpenGLShaderProgram()
- self._program.addCacheableShaderFromSourceCode(QOpenGLShader.Vertex, VERTEX_SHADER)
- self._program.addCacheableShaderFromSourceCode(QOpenGLShader.Fragment, FRAGMENT_SHADER)
+ self._program.addCacheableShaderFromSourceCode(QOpenGLShader.ShaderTypeBit.Vertex,
+ VERTEX_SHADER)
+ self._program.addCacheableShaderFromSourceCode(QOpenGLShader.ShaderTypeBit.Fragment,
+ FRAGMENT_SHADER)
self._program.bindAttributeLocation("vertices", 0)
self._program.link()