Make QSurfaceFormat a Q_GADGET and add Q_ENUM for easier debugging
Change-Id: I2fa0bc13bd90da53858ba3e0c6351f545e792fde Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
This commit is contained in:
parent
c47d1d74a7
commit
6621e6f89a
@ -41,6 +41,7 @@
|
|||||||
|
|
||||||
#include <QtGui/qtguiglobal.h>
|
#include <QtGui/qtguiglobal.h>
|
||||||
#include <QtCore/qpair.h>
|
#include <QtCore/qpair.h>
|
||||||
|
#include <QtCore/qobjectdefs.h>
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
QT_BEGIN_NAMESPACE
|
||||||
|
|
||||||
@ -50,6 +51,7 @@ class QSurfaceFormatPrivate;
|
|||||||
|
|
||||||
class Q_GUI_EXPORT QSurfaceFormat
|
class Q_GUI_EXPORT QSurfaceFormat
|
||||||
{
|
{
|
||||||
|
Q_GADGET
|
||||||
public:
|
public:
|
||||||
enum FormatOption {
|
enum FormatOption {
|
||||||
StereoBuffers = 0x0001,
|
StereoBuffers = 0x0001,
|
||||||
@ -57,6 +59,7 @@ public:
|
|||||||
DeprecatedFunctions = 0x0004,
|
DeprecatedFunctions = 0x0004,
|
||||||
ResetNotification = 0x0008
|
ResetNotification = 0x0008
|
||||||
};
|
};
|
||||||
|
Q_ENUM(FormatOption)
|
||||||
Q_DECLARE_FLAGS(FormatOptions, FormatOption)
|
Q_DECLARE_FLAGS(FormatOptions, FormatOption)
|
||||||
|
|
||||||
enum SwapBehavior {
|
enum SwapBehavior {
|
||||||
@ -65,6 +68,7 @@ public:
|
|||||||
DoubleBuffer,
|
DoubleBuffer,
|
||||||
TripleBuffer
|
TripleBuffer
|
||||||
};
|
};
|
||||||
|
Q_ENUM(SwapBehavior)
|
||||||
|
|
||||||
enum RenderableType {
|
enum RenderableType {
|
||||||
DefaultRenderableType = 0x0,
|
DefaultRenderableType = 0x0,
|
||||||
@ -72,12 +76,14 @@ public:
|
|||||||
OpenGLES = 0x2,
|
OpenGLES = 0x2,
|
||||||
OpenVG = 0x4
|
OpenVG = 0x4
|
||||||
};
|
};
|
||||||
|
Q_ENUM(RenderableType)
|
||||||
|
|
||||||
enum OpenGLContextProfile {
|
enum OpenGLContextProfile {
|
||||||
NoProfile,
|
NoProfile,
|
||||||
CoreProfile,
|
CoreProfile,
|
||||||
CompatibilityProfile
|
CompatibilityProfile
|
||||||
};
|
};
|
||||||
|
Q_ENUM(OpenGLContextProfile)
|
||||||
|
|
||||||
QSurfaceFormat();
|
QSurfaceFormat();
|
||||||
/*implicit*/ QSurfaceFormat(FormatOptions options);
|
/*implicit*/ QSurfaceFormat(FormatOptions options);
|
||||||
|
Loading…
Reference in New Issue
Block a user