Qt 4.8
|
The QPlatformWindowFormat class specifies the display format of an OpenGL rendering context and if possible attributes of the corresponding QPlatformWindow. More...
#include <qplatformwindowformat_qpa.h>
Public Types | |
enum | FormatOption { DoubleBuffer = 0x0001, DepthBuffer = 0x0002, Rgba = 0x0004, AlphaChannel = 0x0008, AccumBuffer = 0x0010, StencilBuffer = 0x0020, StereoBuffers = 0x0040, DirectRendering = 0x0080, HasOverlay = 0x0100, SampleBuffers = 0x0200, DeprecatedFunctions = 0x0400, HasWindowSurface = 0x0800, SingleBuffer = DoubleBuffer << 16, NoDepthBuffer = DepthBuffer << 16, ColorIndex = Rgba << 16, NoAlphaChannel = AlphaChannel << 16, NoAccumBuffer = AccumBuffer << 16, NoStencilBuffer = StencilBuffer << 16, NoStereoBuffers = StereoBuffers << 16, IndirectRendering = DirectRendering << 16, NoOverlay = HasOverlay << 16, NoSampleBuffers = SampleBuffers << 16, NoDeprecatedFunctions = DeprecatedFunctions << 16, NoWindowSurface = HasWindowSurface << 16 } |
enum | WindowApi { Raster, OpenGL, OpenVG } |
Public Functions | |
bool | accum () const |
Returns true if the accumulation buffer is enabled; otherwise returns false. More... | |
int | accumBufferSize () const |
Returns the accumulation buffer size. More... | |
bool | alpha () const |
Returns true if the alpha buffer in the framebuffer is enabled; otherwise returns false. More... | |
int | alphaBufferSize () const |
Returns the alpha buffer size. More... | |
int | blueBufferSize () const |
Returns the blue buffer size. More... | |
bool | depth () const |
Returns true if the depth buffer is enabled; otherwise returns false. More... | |
int | depthBufferSize () const |
Returns the depth buffer size. More... | |
bool | directRendering () const |
Returns true if direct rendering is enabled; otherwise returns false. More... | |
bool | doubleBuffer () const |
Returns true if double buffering is enabled; otherwise returns false. More... | |
int | greenBufferSize () const |
Returns the green buffer size. More... | |
bool | hasWindowSurface () const |
Returns true if the corresponding widget has an instance of QWindowSurface. More... | |
QPlatformWindowFormat & | operator= (const QPlatformWindowFormat &other) |
Assigns other to this object. More... | |
QPlatformWindowFormat () | |
Constructs a QPlatformWindowFormat object with the following default settings: More... | |
QPlatformWindowFormat (FormatOptions options) | |
QPlatformWindowFormat (const QPlatformWindowFormat &other) | |
Constructs a copy of other. More... | |
int | redBufferSize () const |
Returns the red buffer size. More... | |
bool | rgba () const |
Returns true if RGBA color mode is set. More... | |
bool | sampleBuffers () const |
Returns true if multisample buffer support is enabled; otherwise returns false. More... | |
int | samples () const |
Returns the number of samples per pixel when multisampling is enabled. More... | |
void | setAccum (bool enable) |
If enable is true enables the accumulation buffer; otherwise disables the accumulation buffer. More... | |
void | setAccumBufferSize (int size) |
Set the preferred accumulation buffer size, where size is the bit depth for each RGBA component. More... | |
void | setAlpha (bool enable) |
If enable is true enables the alpha buffer; otherwise disables the alpha buffer. More... | |
void | setAlphaBufferSize (int size) |
Set the preferred alpha buffer size to size. More... | |
void | setBlueBufferSize (int size) |
Set the preferred blue buffer size to size. More... | |
void | setDepth (bool enable) |
If enable is true enables the depth buffer; otherwise disables the depth buffer. More... | |
void | setDepthBufferSize (int size) |
Set the minimum depth buffer size to size. More... | |
void | setDirectRendering (bool enable) |
If enable is true enables direct rendering; otherwise disables direct rendering. More... | |
void | setDoubleBuffer (bool enable) |
If enable is true sets double buffering; otherwise sets single buffering. More... | |
void | setGreenBufferSize (int size) |
Set the preferred green buffer size to size. More... | |
void | setOption (QPlatformWindowFormat::FormatOptions opt) |
Sets the format option to opt. More... | |
void | setRedBufferSize (int size) |
Set the preferred red buffer size to size. More... | |
void | setRgba (bool enable) |
If enable is true sets RGBA mode. More... | |
void | setSampleBuffers (bool enable) |
If enable is true, a GL context with multisample buffer support is picked; otherwise ignored. More... | |
void | setSamples (int numSamples) |
Set the preferred number of samples per pixel when multisampling is enabled to numSamples. More... | |
void | setSharedContext (QPlatformGLContext *context) |
void | setStencil (bool enable) |
If enable is true enables the stencil buffer; otherwise disables the stencil buffer. More... | |
void | setStencilBufferSize (int size) |
Set the preferred stencil buffer size to size. More... | |
void | setStereo (bool enable) |
If enable is true enables stereo buffering; otherwise disables stereo buffering. More... | |
void | setSwapInterval (int interval) |
Set the preferred swap interval. More... | |
void | setWindowApi (QPlatformWindowFormat::WindowApi api) |
void | setWindowSurface (bool enable) |
If enable is true a top level QWidget will create a QWindowSurface at creation;. More... | |
QPlatformGLContext * | sharedGLContext () const |
bool | stencil () const |
Returns true if the stencil buffer is enabled; otherwise returns false. More... | |
int | stencilBufferSize () const |
Returns the stencil buffer size. More... | |
bool | stereo () const |
Returns true if stereo buffering is enabled; otherwise returns false. More... | |
int | swapInterval () const |
Returns the currently set swap interval. More... | |
bool | testOption (QPlatformWindowFormat::FormatOptions opt) const |
Returns true if format option opt is set; otherwise returns false. More... | |
WindowApi | windowApi () const |
~QPlatformWindowFormat () | |
Destroys the QPlatformWindowFormat. More... | |
Static Public Functions | |
static QPlatformWindowFormat | defaultFormat () |
Returns the default QPlatformWindowFormat for the application. More... | |
static void | setDefaultFormat (const QPlatformWindowFormat &f) |
Sets a new default QPlatformWindowFormat for the application to f. More... | |
Private Functions | |
void | detach () |
Properties | |
QPlatformWindowFormatPrivate * | d |
Friends | |
Q_GUI_EXPORT bool | operator!= (const QPlatformWindowFormat &, const QPlatformWindowFormat &) |
Returns false if all the options of the two QPlatformWindowFormat objects a and b are equal; otherwise returns true. More... | |
Q_GUI_EXPORT QDebug | operator<< (QDebug, const QPlatformWindowFormat &) |
Q_GUI_EXPORT bool | operator== (const QPlatformWindowFormat &, const QPlatformWindowFormat &) |
Sets a new default QPlatformWindowFormat for overlay contexts to f. More... | |
The QPlatformWindowFormat class specifies the display format of an OpenGL rendering context and if possible attributes of the corresponding QPlatformWindow.
QWidget has a setter and getter function for QPlatformWindowFormat. These functions can be used by the application programmer to signal what kind of format he wants to the window and glcontext should have. However, it is not always possible to fulfill these requirements. The application programmer should therefore check the resulting QPlatformWindowFormat from QPlatformGLContext to see the format that was actually created.
A display format has several characteristics:
You can also specify preferred bit depths for the color buffer, depth buffer, alpha buffer, accumulation buffer and the stencil buffer with the functions: setRedBufferSize(), setGreenBufferSize(), setBlueBufferSize(), setDepthBufferSize(), setAlphaBufferSize(), setAccumBufferSize() and setStencilBufferSize().
Note that even if you specify that you prefer a 32 bit depth buffer (e.g. with setDepthBufferSize(32)), the format that is chosen may not have a 32 bit depth buffer, even if there is a format available with a 32 bit depth buffer. The main reason for this is how the system dependant picking algorithms work on the different platforms, and some format options may have higher precedence than others.
You create and tell a QPlatformWindowFormat object what rendering options you want from an OpenGL rendering context.
OpenGL drivers or accelerated hardware may or may not support advanced features such as alpha channel or stereographic viewing. If you request some features that the driver/hardware does not provide when you create a QGLWidget, you will get a rendering context with the nearest subset of features.
There are different ways to define the display characteristics of a rendering context. One is to create a QPlatformWindowFormat and make it the default for the entire application:
Or you can specify the desired format when creating an object of your QGLWidget subclass:
After the widget has been created, you can find out which of the requested features the system was able to provide:
OpenGL is a trademark of Silicon Graphics, Inc. in the United States and other countries.
Definition at line 54 of file qplatformwindowformat_qpa.h.
Definition at line 57 of file qplatformwindowformat_qpa.h.
QPlatformWindowFormat::QPlatformWindowFormat | ( | ) |
Constructs a QPlatformWindowFormat object with the following default settings:
Definition at line 190 of file qplatformwindowformat_qpa.cpp.
QPlatformWindowFormat::QPlatformWindowFormat | ( | FormatOptions | options | ) |
QPlatformWindowFormat::QPlatformWindowFormat | ( | const QPlatformWindowFormat & | other | ) |
QPlatformWindowFormat::~QPlatformWindowFormat | ( | ) |
|
inline |
Returns true if the accumulation buffer is enabled; otherwise returns false.
The accumulation buffer is disabled by default.
Definition at line 200 of file qplatformwindowformat_qpa.h.
Referenced by qglx_buildSpec(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::accumBufferSize | ( | ) | const |
Returns the accumulation buffer size.
Definition at line 879 of file qplatformwindowformat_qpa.cpp.
Referenced by qglx_buildSpec().
|
inline |
Returns true if the alpha buffer in the framebuffer is enabled; otherwise returns false.
The alpha buffer is disabled by default.
Definition at line 195 of file qplatformwindowformat_qpa.h.
Referenced by q_createConfigAttributesFromFormat(), qglx_buildSpec(), qglx_findConfig(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::alphaBufferSize | ( | ) | const |
Returns the alpha buffer size.
Definition at line 852 of file qplatformwindowformat_qpa.cpp.
Referenced by q_createConfigAttributesFromFormat(), QBBGLContext::QBBGLContext(), and qglx_buildSpec().
int QPlatformWindowFormat::blueBufferSize | ( | ) | const |
Returns the blue buffer size.
Definition at line 825 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::correctColorBuffers(), QBBWindow::platformWindowFormatToNativeFormat(), q_createConfigAttributesFromFormat(), QBBGLContext::QBBGLContext(), and qglx_buildSpec().
|
static |
Returns the default QPlatformWindowFormat for the application.
All QGLWidget objects that are created use this format unless another format is specified, e.g. when they are constructed.
If no special default format has been set using setDefaultFormat(), the default format is the same as that created with QPlatformWindowFormat().
Definition at line 922 of file qplatformwindowformat_qpa.cpp.
Referenced by QEglFSScreen::createAndSetPlatformContext(), QWidgetPrivate::createTLExtra(), effectiveState(), and QBBIntegration::QBBIntegration().
|
inline |
Returns true if the depth buffer is enabled; otherwise returns false.
The depth buffer is enabled by default.
Definition at line 185 of file qplatformwindowformat_qpa.h.
Referenced by q_createConfigAttributesFromFormat(), qglx_buildSpec(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::depthBufferSize | ( | ) | const |
Returns the depth buffer size.
Definition at line 720 of file qplatformwindowformat_qpa.cpp.
Referenced by q_createConfigAttributesFromFormat(), and qglx_buildSpec().
|
private |
Definition at line 227 of file qplatformwindowformat_qpa.cpp.
|
inline |
Returns true if direct rendering is enabled; otherwise returns false.
Direct rendering is enabled by default.
Definition at line 215 of file qplatformwindowformat_qpa.h.
|
inline |
Returns true if double buffering is enabled; otherwise returns false.
Double buffering is enabled by default.
Definition at line 180 of file qplatformwindowformat_qpa.h.
Referenced by qglx_buildSpec(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::greenBufferSize | ( | ) | const |
Returns the green buffer size.
Definition at line 790 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::correctColorBuffers(), QBBWindow::platformWindowFormatToNativeFormat(), q_createConfigAttributesFromFormat(), QBBGLContext::QBBGLContext(), and qglx_buildSpec().
|
inline |
Returns true if the corresponding widget has an instance of QWindowSurface.
Otherwise returns false.
WindowSurface is enabled by default.
Definition at line 220 of file qplatformwindowformat_qpa.h.
QPlatformWindowFormat & QPlatformWindowFormat::operator= | ( | const QPlatformWindowFormat & | other | ) |
int QPlatformWindowFormat::redBufferSize | ( | ) | const |
Returns the red buffer size.
Definition at line 755 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::correctColorBuffers(), QBBWindow::platformWindowFormatToNativeFormat(), q_createConfigAttributesFromFormat(), QBBGLContext::QBBGLContext(), and qglx_buildSpec().
|
inline |
Returns true if RGBA color mode is set.
Returns false if color index mode is set. The default color mode is RGBA.
Definition at line 190 of file qplatformwindowformat_qpa.h.
Referenced by qglx_buildSpec().
|
inline |
Returns true if multisample buffer support is enabled; otherwise returns false.
The multisample buffer is disabled by default.
Definition at line 225 of file qplatformwindowformat_qpa.h.
Referenced by q_createConfigAttributesFromFormat(), qglx_buildSpec(), qglx_platformWindowFromGLXFBConfig(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::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.
Definition at line 557 of file qplatformwindowformat_qpa.cpp.
Referenced by q_createConfigAttributesFromFormat(), and qglx_buildSpec().
void QPlatformWindowFormat::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.
Definition at line 427 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), and qglx_reducePlatformWindowFormat().
void QPlatformWindowFormat::setAccumBufferSize | ( | int | size | ) |
Set the preferred accumulation buffer size, where size is the bit depth for each RGBA component.
Definition at line 863 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::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.
Definition at line 397 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), effectiveState(), qDeleteQGLContext(), QDirectFbGLContext::QDirectFbGLContext(), and qglx_reducePlatformWindowFormat().
void QPlatformWindowFormat::setAlphaBufferSize | ( | int | size | ) |
Set the preferred alpha buffer size to size.
This function implicitly enables the alpha channel.
Definition at line 836 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), QBBGLContext::QBBGLContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::setBlueBufferSize | ( | int | size | ) |
Set the preferred blue buffer size to size.
Definition at line 805 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::correctColorBuffers(), QEglFSScreen::createAndSetPlatformContext(), EAGLPlatformContext::EAGLPlatformContext(), QBBGLContext::QBBGLContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), QOpenKODEWindow::QOpenKODEWindow(), and qt_qPlatformWindowFormatFromConfig().
|
static |
Sets a new default QPlatformWindowFormat 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:
Definition at line 936 of file qplatformwindowformat_qpa.cpp.
Referenced by QBBIntegration::QBBIntegration().
void QPlatformWindowFormat::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.
Definition at line 332 of file qplatformwindowformat_qpa.cpp.
Referenced by QEglFSScreen::createAndSetPlatformContext(), EAGLPlatformContext::EAGLPlatformContext(), and qglx_reducePlatformWindowFormat().
void QPlatformWindowFormat::setDepthBufferSize | ( | int | size | ) |
Set the minimum depth buffer size to size.
Definition at line 704 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::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.
Definition at line 520 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::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.
Definition at line 299 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), QDirectFbGLContext::QDirectFbGLContext(), and qglx_reducePlatformWindowFormat().
void QPlatformWindowFormat::setGreenBufferSize | ( | int | size | ) |
Set the preferred green buffer size to size.
Definition at line 770 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::correctColorBuffers(), QEglFSScreen::createAndSetPlatformContext(), EAGLPlatformContext::EAGLPlatformContext(), QBBGLContext::QBBGLContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), QOpenKODEWindow::QOpenKODEWindow(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::setOption | ( | QPlatformWindowFormat::FormatOptions | opt | ) |
Sets the format option to opt.
Definition at line 674 of file qplatformwindowformat_qpa.cpp.
void QPlatformWindowFormat::setRedBufferSize | ( | int | size | ) |
Set the preferred red buffer size to size.
Definition at line 735 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::correctColorBuffers(), QEglFSScreen::createAndSetPlatformContext(), EAGLPlatformContext::EAGLPlatformContext(), QBBGLContext::QBBGLContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), QOpenKODEWindow::QOpenKODEWindow(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::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.
Definition at line 366 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::setSampleBuffers | ( | bool | enable | ) |
If enable is true, a GL context with multisample buffer support is picked; otherwise ignored.
Definition at line 545 of file qplatformwindowformat_qpa.cpp.
Referenced by QEglFSScreen::createAndSetPlatformContext(), EAGLPlatformContext::EAGLPlatformContext(), qglx_platformWindowFromGLXFBConfig(), and qglx_reducePlatformWindowFormat().
void QPlatformWindowFormat::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.
Definition at line 569 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::setSharedContext | ( | QPlatformGLContext * | context | ) |
Definition at line 632 of file qplatformwindowformat_qpa.cpp.
Referenced by qDeleteQGLContext(), and QWaylandGLContext::QWaylandGLContext().
void QPlatformWindowFormat::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.
Definition at line 457 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), and qglx_reducePlatformWindowFormat().
void QPlatformWindowFormat::setStencilBufferSize | ( | int | size | ) |
Set the preferred stencil buffer size to size.
Definition at line 889 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::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.
Definition at line 487 of file qplatformwindowformat_qpa.cpp.
Referenced by EAGLPlatformContext::EAGLPlatformContext(), QDirectFbGLContext::QDirectFbGLContext(), qglx_platformWindowFromGLXFBConfig(), qglx_reducePlatformWindowFormat(), and qt_qPlatformWindowFormatFromConfig().
void QPlatformWindowFormat::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.
Definition at line 601 of file qplatformwindowformat_qpa.cpp.
void QPlatformWindowFormat::setWindowApi | ( | QPlatformWindowFormat::WindowApi | api | ) |
Definition at line 621 of file qplatformwindowformat_qpa.cpp.
Referenced by QEglFSScreen::createAndSetPlatformContext(), EAGLPlatformContext::EAGLPlatformContext(), QBBIntegration::QBBIntegration(), and qDeleteQGLContext().
void QPlatformWindowFormat::setWindowSurface | ( | bool | enable | ) |
If enable is true a top level QWidget will create a QWindowSurface at creation;.
otherwise the QWidget will only have a QPlatformWindow.
This is useful for QGLWidget where the QPlatformGLContext controls the surface.
Definition at line 663 of file qplatformwindowformat_qpa.cpp.
Referenced by qDeleteQGLContext().
QPlatformGLContext * QPlatformWindowFormat::sharedGLContext | ( | ) | const |
Definition at line 637 of file qplatformwindowformat_qpa.cpp.
Referenced by QXlibWindow::glContext(), QGLXContext::QGLXContext(), and QWaylandGLContext::QWaylandGLContext().
|
inline |
Returns true if the stencil buffer is enabled; otherwise returns false.
The stencil buffer is enabled by default.
Definition at line 205 of file qplatformwindowformat_qpa.h.
Referenced by q_createConfigAttributesFromFormat(), qglx_buildSpec(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::stencilBufferSize | ( | ) | const |
Returns the stencil buffer size.
Definition at line 905 of file qplatformwindowformat_qpa.cpp.
Referenced by q_createConfigAttributesFromFormat(), and qglx_buildSpec().
|
inline |
Returns true if stereo buffering is enabled; otherwise returns false.
Stereo buffering is disabled by default.
Definition at line 210 of file qplatformwindowformat_qpa.h.
Referenced by qglx_buildSpec(), and qglx_reducePlatformWindowFormat().
int QPlatformWindowFormat::swapInterval | ( | ) | const |
Returns the currently set swap interval.
-1 is returned if setting the swap interval isn't supported in the system GL implementation.
Definition at line 616 of file qplatformwindowformat_qpa.cpp.
bool QPlatformWindowFormat::testOption | ( | QPlatformWindowFormat::FormatOptions | opt | ) | const |
Returns true if format option opt is set; otherwise returns false.
Definition at line 691 of file qplatformwindowformat_qpa.cpp.
QPlatformWindowFormat::WindowApi QPlatformWindowFormat::windowApi | ( | ) | const |
Definition at line 627 of file qplatformwindowformat_qpa.cpp.
Referenced by QBBWindow::glContext(), q_configFromQPlatformWindowFormat(), QBBGLContext::QBBGLContext(), and QBBWindow::QBBWindow().
|
friend |
Returns false if all the options of the two QPlatformWindowFormat objects a and b are equal; otherwise returns true.
Definition at line 1036 of file qplatformwindowformat_qpa.cpp.
|
friend |
Definition at line 1042 of file qplatformwindowformat_qpa.cpp.
|
friend |
Sets a new default QPlatformWindowFormat 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:
As usual, you can find out after widget creation whether the underlying OpenGL system was able to provide the requested specification:
Returns true if all the options of the two QPlatformWindowFormat objects a and b are equal; otherwise returns false.
Definition at line 1008 of file qplatformwindowformat_qpa.cpp.
|
private |
Definition at line 160 of file qplatformwindowformat_qpa.h.
Referenced by operator<<(), operator=(), and QPlatformWindowFormat().