PythonQt.QtOpenGL.QGLFormat · declarations 002
Back to PythonQt.QtOpenGL.QGLFormat
minorVersion
minorVersion() -> int
X.minorVersion() -> int
Supplemental documentation: Qt 5 reference:
int QGLFormat::minorVersion() const
Returns the OpenGL minor version.
This function was introduced in Qt 4.7.
See also setVersion() and majorVersion().
Upstream PySide2 reference signatures (binding differences may apply):
minorVersion(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#minorVersion
openGLVersionFlags
openGLVersionFlags() -> Any
X.openGLVersionFlags()
Supplemental documentation: Qt 5 reference:
[static] QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
Identifies, at runtime, which OpenGL versions that are supported by the current platform.
Note that if OpenGL version 1.5 is supported, its predecessors (i.e., version 1.4 and lower) are also supported. To identify the support of a particular feature, like multi texturing, test for the version in which the feature was first introduced (i.e., version 1.3 in the case of multi texturing) to adapt to the largest possible group of runtime platforms.
This function needs a valid current OpenGL context to work; otherwise it will return OpenGL_Version_None.
This function was introduced in Qt 4.2.
See also hasOpenGL() and hasOpenGLOverlays().
Upstream PySide2 reference signatures (binding differences may apply):
openGLVersionFlags() -> PySide2.QtOpenGL.QGLFormat.OpenGLVersionFlags
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#openGLVersionFlags
plane
plane() -> int
X.plane() -> int
Supplemental documentation: Qt 5 reference:
int QGLFormat::plane() const
Returns the plane of this format. The default for normal formats is 0, which means the normal plane. The default for overlay formats is 1, which is the first overlay plane.
See also setPlane() and defaultOverlayFormat().
Upstream PySide2 reference signatures (binding differences may apply):
plane(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#plane
profile
profile() -> Any
X.profile()
Supplemental documentation: Qt 5 reference:
QGLFormat::OpenGLContextProfile QGLFormat::profile() const
Returns the OpenGL context profile.
This function was introduced in Qt 4.7.
See also setProfile().
Upstream PySide2 reference signatures (binding differences may apply):
profile(self) -> PySide2.QtOpenGL.QGLFormat.OpenGLContextProfile
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#profile
redBufferSize
redBufferSize() -> int
X.redBufferSize() -> int
Supplemental documentation: Qt 5 reference:
int QGLFormat::redBufferSize() const
Returns the red buffer size.
This function was introduced in Qt 4.2.
See also setRedBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
redBufferSize(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#redBufferSize
rgba
rgba() -> bool
X.rgba() -> bool
Supplemental documentation: Qt 5 reference:
bool QGLFormat::rgba() const
Returns true if RGBA color mode is set. Returns false if color index mode is set.
The default color mode is RGBA.
See also setRgba().
Upstream PySide2 reference signatures (binding differences may apply):
rgba(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#rgba
sampleBuffers
sampleBuffers() -> bool
X.sampleBuffers() -> bool
Supplemental documentation: Qt 5 reference:
bool QGLFormat::sampleBuffers() const
Returns true if multisample buffer support is enabled; otherwise returns false.
The multisample buffer is disabled by default.
See also setSampleBuffers().
Upstream PySide2 reference signatures (binding differences may apply):
sampleBuffers(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#sampleBuffers
samples
samples() -> int
X.samples() -> int
Supplemental documentation: Qt 5 reference:
int QGLFormat::samples() const
Returns the number of samples per pixel when multisampling is enabled. By default, the highest number of samples that is available is used.
See also setSampleBuffers(), sampleBuffers(), and setSamples().
Upstream PySide2 reference signatures (binding differences may apply):
samples(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#samples
setAccum
setAccum(enable: bool) -> None
X.setAccum(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setAccum(bool enable)
If enable is true enables the accumulation buffer; otherwise disables the accumulation buffer.
The accumulation buffer is disabled by default.
The accumulation buffer is used to create blur effects and multiple exposures.
See also accum() and setAccumBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setAccum(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setAccum
setAccumBufferSize
setAccumBufferSize(size: int) -> None
X.setAccumBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setAccumBufferSize(int size)
Set the preferred accumulation buffer size, where size is the bit depth for each RGBA component.
See also accum(), setAccum(), and accumBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setAccumBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setAccumBufferSize
setAlpha
setAlpha(enable: bool) -> None
X.setAlpha(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setAlpha(bool enable)
If enable is true enables the alpha buffer; otherwise disables the alpha buffer.
The alpha buffer is disabled by default.
The alpha buffer is typically used for implementing transparency or translucency. The A in RGBA specifies the transparency of a pixel.
See also alpha() and setAlphaBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setAlpha(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setAlpha
setAlphaBufferSize
setAlphaBufferSize(size: int) -> None
X.setAlphaBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setAlphaBufferSize(int size)
Set the preferred alpha buffer size to size. This function implicitly enables the alpha channel.
See also setRedBufferSize(), setGreenBufferSize(), and alphaBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setAlphaBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setAlphaBufferSize
setBlueBufferSize
setBlueBufferSize(size: int) -> None
X.setBlueBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setBlueBufferSize(int size)
Set the preferred blue buffer size to size.
This function was introduced in Qt 4.2.
See also blueBufferSize(), setRedBufferSize(), setGreenBufferSize(), and setAlphaBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setBlueBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setBlueBufferSize
setDefaultFormat
setDefaultFormat(f: Any) -> None
X.setDefaultFormat(f)
Supplemental documentation: Qt 5 reference:
[static] void QGLFormat::setDefaultFormat(const QGLFormat \&f)
Sets a new default QGLFormat for the application to f. For example, to set single buffering as the default instead of double buffering, your main() might contain code like this:
QApplication a(argc, argv);
QGLFormat f;
f.setDoubleBuffer(false);
QGLFormat::setDefaultFormat(f);
See also defaultFormat().
Upstream PySide2 reference signatures (binding differences may apply):
setDefaultFormat(f: PySide2.QtOpenGL.QGLFormat) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setDefaultFormat
setDefaultOverlayFormat
setDefaultOverlayFormat(f: Any) -> None
X.setDefaultOverlayFormat(f)
Supplemental documentation: Qt 5 reference:
[static] void QGLFormat::setDefaultOverlayFormat(const QGLFormat \&f)
Sets a new default QGLFormat for overlay contexts to f. This format is used whenever a QGLWidget is created with a format that hasOverlay() enabled.
For example, to get a double buffered overlay context (if available), use code like this:
QGLFormat f = QGLFormat::defaultOverlayFormat();
f.setDoubleBuffer(true);
QGLFormat::setDefaultOverlayFormat(f);
As usual, you can find out after widget creation whether the underlying OpenGL system was able to provide the requested specification:
// ...continued from above
MyGLWidget* myWidget = new MyGLWidget(QGLFormat(QGL::HasOverlay), ...);
if (myWidget->format().hasOverlay()) {
// Yes, we got an overlay, let's check _its_ format:
QGLContext* olContext = myWidget->overlayContext();
if (olContext->format().doubleBuffer())
; // yes, we got a double buffered overlay
else
; // no, only single buffered overlays are available
}
See also defaultOverlayFormat().
Upstream PySide2 reference signatures (binding differences may apply):
setDefaultOverlayFormat(f: PySide2.QtOpenGL.QGLFormat) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setDefaultOverlayFormat
setDepth
setDepth(enable: bool) -> None
X.setDepth(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setDepth(bool enable)
If enable is true enables the depth buffer; otherwise disables the depth buffer.
The depth buffer is enabled by default.
The purpose of a depth buffer (or Z-buffering) is to remove hidden surfaces. Pixels are assigned Z values based on the distance to the viewer. A pixel with a high Z value is closer to the viewer than a pixel with a low Z value. This information is used to decide whether to draw a pixel or not.
See also depth() and setDepthBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setDepth(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setDepth
setDepthBufferSize
setDepthBufferSize(size: int) -> None
X.setDepthBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setDepthBufferSize(int size)
Set the minimum depth buffer size to size.
See also depthBufferSize(), setDepth(), and depth().
Upstream PySide2 reference signatures (binding differences may apply):
setDepthBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setDepthBufferSize
setDirectRendering
setDirectRendering(enable: bool) -> None
X.setDirectRendering(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setDirectRendering(bool enable)
If enable is true enables direct rendering; otherwise disables direct rendering.
Direct rendering is enabled by default.
Enabling this option will make OpenGL bypass the underlying window system and render directly from hardware to the screen, if this is supported by the system.
See also directRendering().
Upstream PySide2 reference signatures (binding differences may apply):
setDirectRendering(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setDirectRendering
setDoubleBuffer
setDoubleBuffer(enable: bool) -> None
X.setDoubleBuffer(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setDoubleBuffer(bool enable)
If enable is true sets double buffering; otherwise sets single buffering.
Double buffering is enabled by default.
Double buffering is a technique where graphics are rendered on an off-screen buffer and not directly to the screen. When the drawing has been completed, the program calls a swapBuffers() function to exchange the screen contents with the buffer. The result is flicker-free drawing and often better performance.
Note that single buffered contexts are currently not supported with EGL.
See also doubleBuffer(), QGLContext::swapBuffers(), and QGLWidget::swapBuffers().
Upstream PySide2 reference signatures (binding differences may apply):
setDoubleBuffer(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setDoubleBuffer
setGreenBufferSize
setGreenBufferSize(size: int) -> None
X.setGreenBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setGreenBufferSize(int size)
Set the preferred green buffer size to size.
This function was introduced in Qt 4.2.
See also greenBufferSize(), setRedBufferSize(), setBlueBufferSize(), and setAlphaBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setGreenBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setGreenBufferSize
setOption
setOption(opt: Any) -> None
X.setOption(opt)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setOption(QGL::FormatOptions opt)
Sets the format option to opt.
See also testOption().
Upstream PySide2 reference signatures (binding differences may apply):
setOption(self, opt: PySide2.QtOpenGL.QGL.FormatOptions) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setOption
setOverlay
setOverlay(enable: bool) -> None
X.setOverlay(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setOverlay(bool enable)
If enable is true enables an overlay plane; otherwise disables the overlay plane.
Enabling the overlay plane will cause QGLWidget to create an additional context in an overlay plane. See the QGLWidget documentation for further information.
See also hasOverlay().
Upstream PySide2 reference signatures (binding differences may apply):
setOverlay(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setOverlay
setPlane
setPlane(plane: int) -> None
X.setPlane(plane)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setPlane(int plane)
Sets the requested plane to plane. 0 is the normal plane, 1 is the first overlay plane, 2 is the second overlay plane, etc.; -1, -2, etc. are underlay planes.
Note that in contrast to other format specifications, the plane specifications will be matched exactly. This means that if you specify a plane that the underlying OpenGL system cannot provide, an invalid QGLWidget will be created.
See also plane().
Upstream PySide2 reference signatures (binding differences may apply):
setPlane(self, plane: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setPlane
setProfile
setProfile(profile: Any) -> None
X.setProfile(profile)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setProfile(QGLFormat::OpenGLContextProfile profile)
Set the OpenGL context profile to profile. The profile is ignored if the requested OpenGL version is less than 3.2.
This function was introduced in Qt 4.7.
See also profile().
Upstream PySide2 reference signatures (binding differences may apply):
setProfile(self, profile: PySide2.QtOpenGL.QGLFormat.OpenGLContextProfile) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setProfile
setRedBufferSize
setRedBufferSize(size: int) -> None
X.setRedBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setRedBufferSize(int size)
Set the preferred red buffer size to size.
This function was introduced in Qt 4.2.
See also redBufferSize(), setGreenBufferSize(), setBlueBufferSize(), and setAlphaBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setRedBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setRedBufferSize
setRgba
setRgba(enable: bool) -> None
X.setRgba(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setRgba(bool enable)
If enable is true sets RGBA mode. If enable is false sets color index mode.
The default color mode is RGBA.
RGBA is the preferred mode for most OpenGL applications. In RGBA color mode you specify colors as red + green + blue + alpha quadruplets.
In color index mode you specify an index into a color lookup table.
See also rgba().
Upstream PySide2 reference signatures (binding differences may apply):
setRgba(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setRgba
setSampleBuffers
setSampleBuffers(enable: bool) -> None
X.setSampleBuffers(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setSampleBuffers(bool enable)
If enable is true, a GL context with multisample buffer support is picked; otherwise ignored.
See also sampleBuffers(), setSamples(), and samples().
Upstream PySide2 reference signatures (binding differences may apply):
setSampleBuffers(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setSampleBuffers
setSamples
setSamples(numSamples: int) -> None
X.setSamples(numSamples)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setSamples(int numSamples)
Set the preferred number of samples per pixel when multisampling is enabled to numSamples. By default, the highest number of samples available is used.
See also setSampleBuffers(), sampleBuffers(), and samples().
Upstream PySide2 reference signatures (binding differences may apply):
setSamples(self, numSamples: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setSamples
setStencil
setStencil(enable: bool) -> None
X.setStencil(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setStencil(bool enable)
If enable is true enables the stencil buffer; otherwise disables the stencil buffer.
The stencil buffer is enabled by default.
The stencil buffer masks certain parts of the drawing area so that masked parts are not drawn on.
See also stencil() and setStencilBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
setStencil(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setStencil
setStencilBufferSize
setStencilBufferSize(size: int) -> None
X.setStencilBufferSize(size)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setStencilBufferSize(int size)
Set the preferred stencil buffer size to size.
See also stencilBufferSize(), setStencil(), and stencil().
Upstream PySide2 reference signatures (binding differences may apply):
setStencilBufferSize(self, size: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setStencilBufferSize
setStereo
setStereo(enable: bool) -> None
X.setStereo(enable)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setStereo(bool enable)
If enable is true enables stereo buffering; otherwise disables stereo buffering.
Stereo buffering is disabled by default.
Stereo buffering provides extra color buffers to generate left-eye and right-eye images.
See also stereo().
Upstream PySide2 reference signatures (binding differences may apply):
setStereo(self, enable: bool) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setStereo
setSwapInterval
setSwapInterval(interval: int) -> None
X.setSwapInterval(interval)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setSwapInterval(int interval)
Set the preferred swap interval. This can be used to sync the GL drawing into a system window to the vertical refresh of the screen. Setting an interval value of 0 will turn the vertical refresh syncing off, any value higher than 0 will turn the vertical syncing on.
Under Windows and under X11, where the WGL_EXT_swap_control and GLX_SGI_video_sync
extensions are used, the interval parameter can be used to set the minimum number of
video frames that are displayed before a buffer swap will occur. In effect, setting the
interval to 10, means there will be 10 vertical retraces between every buffer swap.
Under Windows the WGL_EXT_swap_control extension has to be present, and under X11 the
GLX_SGI_video_sync extension has to be present.
This function was introduced in Qt 4.2.
See also swapInterval().
Upstream PySide2 reference signatures (binding differences may apply):
setSwapInterval(self, interval: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setSwapInterval
setVersion
setVersion(major: int, minor: int) -> None
X.setVersion(major, minor)
Supplemental documentation: Qt 5 reference:
void QGLFormat::setVersion(int major, int minor)
Set the OpenGL version to the major and minor numbers. If a context compatible with the requested OpenGL version cannot be created, a context compatible with version 1.x is created instead.
This function was introduced in Qt 4.7.
See also majorVersion() and minorVersion().
Upstream PySide2 reference signatures (binding differences may apply):
setVersion(self, major: int, minor: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#setVersion
stencil
stencil() -> bool
X.stencil() -> bool
Supplemental documentation: Qt 5 reference:
bool QGLFormat::stencil() const
Returns true if the stencil buffer is enabled; otherwise returns false. The stencil
buffer is enabled by default.
See also setStencil() and setStencilBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
stencil(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#stencil
stencilBufferSize
stencilBufferSize() -> int
X.stencilBufferSize() -> int
Supplemental documentation: Qt 5 reference:
int QGLFormat::stencilBufferSize() const
Returns the stencil buffer size.
See also stencil(), setStencil(), and setStencilBufferSize().
Upstream PySide2 reference signatures (binding differences may apply):
stencilBufferSize(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#stencilBufferSize
stereo
stereo() -> bool
X.stereo() -> bool
Supplemental documentation: Qt 5 reference:
bool QGLFormat::stereo() const
Returns true if stereo buffering is enabled; otherwise returns false. Stereo buffering
is disabled by default.
See also setStereo().
Upstream PySide2 reference signatures (binding differences may apply):
stereo(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#stereo
swapInterval
swapInterval() -> int
X.swapInterval() -> int
Supplemental documentation: Qt 5 reference:
int QGLFormat::swapInterval() const
Returns the currently set swap interval. -1 is returned if setting the swap interval isn't supported in the system GL implementation.
This function was introduced in Qt 4.2.
See also setSwapInterval().
Upstream PySide2 reference signatures (binding differences may apply):
swapInterval(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#swapInterval
testOption
testOption(opt: Any) -> bool
X.testOption(opt) -> bool
Supplemental documentation: Qt 5 reference:
bool QGLFormat::testOption(QGL::FormatOptions opt) const
Returns true if format option opt is set; otherwise returns false.
See also setOption().
Upstream PySide2 reference signatures (binding differences may apply):
testOption(self, opt: PySide2.QtOpenGL.QGL.FormatOptions) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#testOption
toSurfaceFormat
toSurfaceFormat(format: Any) -> Any
X.toSurfaceFormat(format) -> PythonQt.QtGui.QSurfaceFormat
Supplemental documentation: Qt 5 reference:
[static] QSurfaceFormat QGLFormat::toSurfaceFormat(const QGLFormat \&format)
Returns a window format for the OpenGL format specified by format.
Upstream PySide2 reference signatures (binding differences may apply):
toSurfaceFormat(format: PySide2.QtOpenGL.QGLFormat) -> PySide2.QtGui.QSurfaceFormat
Source: https://doc.qt.io/archives/qt-5.15/qglformat.html#toSurfaceFormat