diff: make the context menu more intuitive
[git-cola.git] / qtpy / QtOpenGL.py
blob345853a1005c6c6eeab05d0785bec2ef61011cb5
1 # -----------------------------------------------------------------------------
2 # Copyright © 2009- The Spyder Development Team
4 # Licensed under the terms of the MIT License
5 # (see LICENSE.txt for details)
6 # -----------------------------------------------------------------------------
8 """Provides QtOpenGL classes and functions."""
10 from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6
12 if PYQT5:
13 from PyQt5.QtOpenGL import *
14 from PyQt5.QtGui import (
15 QOpenGLBuffer,
16 QOpenGLFramebufferObject,
17 QOpenGLFramebufferObjectFormat,
18 QOpenGLShader,
19 QOpenGLShaderProgram,
20 QOpenGLContext,
21 QOpenGLContextGroup,
22 QOpenGLDebugLogger,
23 QOpenGLDebugMessage,
24 QOpenGLPixelTransferOptions,
25 QOpenGLTexture,
26 QOpenGLTextureBlitter,
27 QOpenGLVersionProfile,
28 QOpenGLVertexArrayObject,
29 QOpenGLWindow,
32 # These are not present on some architectures such as armhf
33 try:
34 from PyQt5.QtGui import QOpenGLTimeMonitor, QOpenGLTimerQuery
35 except ImportError:
36 pass
37 elif PYQT6:
38 from PyQt6.QtOpenGL import *
39 from PyQt6.QtGui import QOpenGLContext, QOpenGLContextGroup
40 elif PYSIDE6:
41 from PySide6.QtOpenGL import *
42 from PySide6.QtGui import QOpenGLContext, QOpenGLContextGroup
43 elif PYSIDE2:
44 from PySide2.QtOpenGL import *
45 from PySide2.QtGui import (
46 QOpenGLBuffer,
47 QOpenGLFramebufferObject,
48 QOpenGLFramebufferObjectFormat,
49 QOpenGLShader,
50 QOpenGLShaderProgram,
51 QOpenGLContext,
52 QOpenGLContextGroup,
53 QOpenGLDebugLogger,
54 QOpenGLDebugMessage,
55 QOpenGLPixelTransferOptions,
56 QOpenGLTexture,
57 QOpenGLTextureBlitter,
58 QOpenGLVersionProfile,
59 QOpenGLVertexArrayObject,
60 QOpenGLWindow,
63 # These are not present on some architectures such as armhf
64 try:
65 from PySide2.QtGui import QOpenGLTimeMonitor, QOpenGLTimerQuery
66 except ImportError:
67 pass