fetch: add ability to fetch into a remote tracking branch
[git-cola.git] / qtpy / QtOpenGL.py
blobaf881ed96e5f7489a3c482956938f36ffaff3ad7
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 import contextlib
12 from . import PYQT5, PYQT6, PYSIDE2, PYSIDE6
14 if PYQT5:
15 from PyQt5.QtGui import (
16 QOpenGLBuffer,
17 QOpenGLContext,
18 QOpenGLContextGroup,
19 QOpenGLDebugLogger,
20 QOpenGLDebugMessage,
21 QOpenGLFramebufferObject,
22 QOpenGLFramebufferObjectFormat,
23 QOpenGLPixelTransferOptions,
24 QOpenGLShader,
25 QOpenGLShaderProgram,
26 QOpenGLTexture,
27 QOpenGLTextureBlitter,
28 QOpenGLVersionProfile,
29 QOpenGLVertexArrayObject,
30 QOpenGLWindow,
32 from PyQt5.QtOpenGL import *
34 # These are not present on some architectures such as armhf
35 with contextlib.suppress(ImportError):
36 from PyQt5.QtGui import QOpenGLTimeMonitor, QOpenGLTimerQuery
38 elif PYQT6:
39 from PyQt6.QtGui import QOpenGLContext, QOpenGLContextGroup
40 from PyQt6.QtOpenGL import *
41 elif PYSIDE6:
42 from PySide6.QtGui import QOpenGLContext, QOpenGLContextGroup
43 from PySide6.QtOpenGL import *
44 elif PYSIDE2:
45 from PySide2.QtGui import (
46 QOpenGLBuffer,
47 QOpenGLContext,
48 QOpenGLContextGroup,
49 QOpenGLDebugLogger,
50 QOpenGLDebugMessage,
51 QOpenGLFramebufferObject,
52 QOpenGLFramebufferObjectFormat,
53 QOpenGLPixelTransferOptions,
54 QOpenGLShader,
55 QOpenGLShaderProgram,
56 QOpenGLTexture,
57 QOpenGLTextureBlitter,
58 QOpenGLVersionProfile,
59 QOpenGLVertexArrayObject,
60 QOpenGLWindow,
62 from PySide2.QtOpenGL import *
64 # These are not present on some architectures such as armhf
65 with contextlib.suppress(ImportError):
66 from PySide2.QtGui import QOpenGLTimeMonitor, QOpenGLTimerQuery