Skip to content

PythonQt.Qt.QSurfaceFormat

QSurfaceFormat

PythonQtInstanceWrapper object

Native bases: PythonQtInstanceWrapper

Supplemental documentation: Qt 5 reference:

Detailed Description

The format includes the size of the color buffers, red, green, and blue; the size of the alpha buffer; the size of the depth and stencil buffers; and number of samples per pixel for multisampling. In addition, the format contains surface configuration parameters such as OpenGL profile and version for rendering, whether or not to enable stereo buffers, and swap behaviour.

Note: When troubleshooting context or window format issues, it can be helpful to enable the logging category qt.qpa.gl. Depending on the platform, this may print useful debug information when it comes to OpenGL initialization and the native visual or framebuffer configurations which QSurfaceFormat gets mapped to.

Source: https://doc.qt.io/archives/qt-5.15/qsurfaceformat.html

Complete member index

Every captured member retains its own identity. Identical captured declaration text is linked once; this does not establish native inheritance or interchangeable objects.

Member Kind Signature Summary
CompatibilityProfile attribute Any (shared captured text)
CoreProfile attribute Any (shared captured text)
DebugContext attribute Any (shared captured text)
DefaultRenderableType attribute Any (shared captured text)
DefaultSwapBehavior attribute Any (shared captured text)
DeprecatedFunctions attribute Any (shared captured text)
DoubleBuffer attribute Any (shared captured text)
FormatOption attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
FormatOptions attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
NoProfile attribute Any (shared captured text)
OpenGL attribute Any (shared captured text)
OpenGLContextProfile attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
OpenGLES attribute Any (shared captured text)
OpenVG attribute Any (shared captured text)
RenderableType attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
ResetNotification attribute Any (shared captured text)
SingleBuffer attribute Any (shared captured text)
StereoBuffers attribute Any (shared captured text)
SwapBehavior attribute type Convert a number or string to an integer, or return 0 if no arguments are given. (shared captured text)
TripleBuffer attribute Any (shared captured text)
__init__ function (self, *args: Any, **kwargs: Any) -> None Native constructor; consult class documentation for supported overloads. (shared captured text)
alphaBufferSize function (self) -> int X.alphaBufferSize() -> int (shared captured text)
blueBufferSize function (self) -> int X.blueBufferSize() -> int (shared captured text)
className function (self, *args: Any, **kwargs: Any) -> Any Return the classname of the object (shared captured text)
defaultFormat function (self) -> Any X.defaultFormat() -> PythonQt.QtGui.QSurfaceFormat (shared captured text)
delete function (self, *args: Any, **kwargs: Any) -> Any Deletes the C++ object (at your own risk, my friend!) (shared captured text)
depthBufferSize function (self) -> int X.depthBufferSize() -> int (shared captured text)
greenBufferSize function (self) -> int X.greenBufferSize() -> int (shared captured text)
hasAlpha function (self) -> bool X.hasAlpha() -> bool (shared captured text)
help function (self, *args: Any, **kwargs: Any) -> Any Shows the help of available methods for this class (shared captured text)
inherits function (self, *args: Any, **kwargs: Any) -> Any Returns if the class inherits or is of given type name (shared captured text)
majorVersion function (self) -> int X.majorVersion() -> int (shared captured text)
minorVersion function (self) -> int X.minorVersion() -> int (shared captured text)
operator_assign function (self, other: Any) -> Any X.operator_assign(other) -> PythonQt.QtGui.QSurfaceFormat (shared captured text)
options function (self) -> Any Returns the currently set format options. (shared captured text)
profile function (self) -> Any Get the configured OpenGL context profile. (shared captured text)
redBufferSize function (self) -> int X.redBufferSize() -> int (shared captured text)
renderableType function (self) -> Any Gets the renderable type. (shared captured text)
samples function (self) -> int X.samples() -> int (shared captured text)
setAlphaBufferSize function (self, size: int) -> None Set the desired size in bits of the alpha channel of the color buffer. (shared captured text)
setBlueBufferSize function (self, size: int) -> None Set the desired size in bits of the blue channel of the color buffer. (shared captured text)
setDefaultFormat function (self, format: Any) -> None Sets the global default surface format. (shared captured text)
setDepthBufferSize function (self, size: int) -> None Set the minimum depth buffer size to size. (shared captured text)
setGreenBufferSize function (self, size: int) -> None Set the desired size in bits of the green channel of the color buffer. (shared captured text)
setMajorVersion function (self, majorVersion: int) -> None Sets the desired major OpenGL version. (shared captured text)
setMinorVersion function (self, minorVersion: int) -> None Sets the desired minor OpenGL version. (shared captured text)
setOption function (self, option: Any, on: Any) -> None X.setOption(option, on) (shared captured text)
setOptions function (self, options: Any) -> None Sets the format options to options. (shared captured text)
setProfile function (self, profile: Any) -> None Sets the desired OpenGL context profile. (shared captured text)
setRedBufferSize function (self, size: int) -> None Set the desired size in bits of the red channel of the color buffer. (shared captured text)
setRenderableType function (self, type: Any) -> None Sets the desired renderable type. (shared captured text)
setSamples function (self, numSamples: int) -> None Set the preferred number of samples per pixel when multisampling is enabled to numSamples. (shared captured text)
setStencilBufferSize function (self, size: int) -> None Set the preferred stencil buffer size to size bits. (shared captured text)
setStereo function (self, enable: bool) -> None If enable is true enables stereo buffering; otherwise disables stereo buffering. (shared captured text)
setSwapBehavior function (self, behavior: Any) -> None Set the swap behavior of the surface. (shared captured text)
setSwapInterval function (self, interval: int) -> None Sets the preferred swap interval. (shared captured text)
setVersion function (self, major: int, minor: int) -> None X.setVersion(major, minor) (shared captured text)
stencilBufferSize function (self) -> int X.stencilBufferSize() -> int (shared captured text)
stereo function (self) -> bool X.stereo() -> bool (shared captured text)
swapBehavior function (self) -> Any Returns the configured swap behaviour. (shared captured text)
swapInterval function (self) -> int X.swapInterval() -> int (shared captured text)
testOption function (self, opt: Any) -> bool X.testOption(opt) -> bool (shared captured text)
version function (self) -> Any Returns a [QPair](https://doc.qt.io/archives/qt-5.15/qpair.html)\<int, int\> representing the OpenGL version. (shared captured text)