summaryrefslogtreecommitdiffstats
path: root/src/gui/opengl/qopengltexture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/opengl/qopengltexture.h')
-rw-r--r--src/gui/opengl/qopengltexture.h49
1 files changed, 36 insertions, 13 deletions
diff --git a/src/gui/opengl/qopengltexture.h b/src/gui/opengl/qopengltexture.h
index ec52a192fa..8c32fcef26 100644
--- a/src/gui/opengl/qopengltexture.h
+++ b/src/gui/opengl/qopengltexture.h
@@ -1,31 +1,37 @@
/****************************************************************************
**
** Copyright (C) 2013 Klaralvdalens Datakonsult AB (KDAB).
-** Contact: http://www.qt.io/licensing/
+** Contact: https://www.qt.io/licensing/
**
** This file is part of the QtGui module of the Qt Toolkit.
**
-** $QT_BEGIN_LICENSE:LGPL21$
+** $QT_BEGIN_LICENSE:LGPL$
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 2.1 or version 3 as published by the Free
-** Software Foundation and appearing in the file LICENSE.LGPLv21 and
-** LICENSE.LGPLv3 included in the packaging of this file. Please review the
-** following information to ensure the GNU Lesser General Public License
-** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
-** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
**
-** As a special exception, The Qt Company gives you certain additional
-** rights. These rights are described in The Qt Company LGPL Exception
-** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or (at your option) the GNU General
+** Public license version 3 or any later version approved by the KDE Free
+** Qt Foundation. The licenses are as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-2.0.html and
+** https://www.gnu.org/licenses/gpl-3.0.html.
**
** $QT_END_LICENSE$
**
@@ -49,6 +55,7 @@ class QOpenGLPixelTransferOptions;
class Q_GUI_EXPORT QOpenGLTexture
{
+ Q_GADGET
public:
enum Target {
Target1D = 0x0DE0, // GL_TEXTURE_1D
@@ -63,6 +70,7 @@ public:
TargetRectangle = 0x84F5, // GL_TEXTURE_RECTANGLE
TargetBuffer = 0x8C2A // GL_TEXTURE_BUFFER
};
+ Q_ENUM(Target)
enum BindingTarget {
BindingTarget1D = 0x8068, // GL_TEXTURE_BINDING_1D
@@ -77,16 +85,19 @@ public:
BindingTargetRectangle = 0x84F6, // GL_TEXTURE_BINDING_RECTANGLE
BindingTargetBuffer = 0x8C2C // GL_TEXTURE_BINDING_BUFFER
};
+ Q_ENUM(BindingTarget)
enum MipMapGeneration {
GenerateMipMaps,
DontGenerateMipMaps
};
+ Q_ENUM(MipMapGeneration)
enum TextureUnitReset {
ResetTextureUnit,
DontResetTextureUnit
};
+ Q_ENUM(TextureUnitReset)
enum TextureFormat {
NoFormat = 0, // GL_NONE
@@ -216,6 +227,7 @@ public:
LuminanceAlphaFormat = 0x190A
};
+ Q_ENUM(TextureFormat)
// This is not used externally yet but is reserved to allow checking of
// compatibility between texture formats
@@ -250,6 +262,7 @@ public:
CubeMapPositiveZ = 0x8519, // GL_TEXTURE_CUBE_MAP_POSITIVE_Z
CubeMapNegativeZ = 0x851A // GL_TEXTURE_CUBE_MAP_NEGATIVE_Z
};
+ Q_ENUM(CubeMapFace)
enum PixelFormat {
NoSourceFormat = 0, // GL_NONE
@@ -272,6 +285,7 @@ public:
Luminance = 0x1909, // GL_LUMINANCE
LuminanceAlpha = 0x190A // GL_LUMINANCE_ALPHA
};
+ Q_ENUM(PixelFormat)
enum PixelType {
NoPixelType = 0, // GL_NONE
@@ -301,6 +315,7 @@ public:
UInt32_D24S8 = 0x84FA, // GL_UNSIGNED_INT_24_8
Float32_D32_UInt32_S8_X24 = 0x8DAD // GL_FLOAT_32_UNSIGNED_INT_24_8_REV
};
+ Q_ENUM(PixelType)
enum SwizzleComponent {
SwizzleRed = 0x8E42, // GL_TEXTURE_SWIZZLE_R
@@ -308,6 +323,7 @@ public:
SwizzleBlue = 0x8E44, // GL_TEXTURE_SWIZZLE_B
SwizzleAlpha = 0x8E45 // GL_TEXTURE_SWIZZLE_A
};
+ Q_ENUM(SwizzleComponent)
enum SwizzleValue {
RedValue = 0x1903, // GL_RED
@@ -317,6 +333,7 @@ public:
ZeroValue = 0, // GL_ZERO
OneValue = 1 // GL_ONE
};
+ Q_ENUM(SwizzleValue)
enum WrapMode {
Repeat = 0x2901, // GL_REPEAT
@@ -324,12 +341,14 @@ public:
ClampToEdge = 0x812F, // GL_CLAMP_TO_EDGE
ClampToBorder = 0x812D // GL_CLAMP_TO_BORDER
};
+ Q_ENUM(WrapMode)
enum CoordinateDirection {
DirectionS = 0x2802, // GL_TEXTURE_WRAP_S
DirectionT = 0x2803, // GL_TEXTURE_WRAP_T
DirectionR = 0x8072 // GL_TEXTURE_WRAP_R
};
+ Q_ENUM(CoordinateDirection)
// Features
enum Feature {
@@ -354,6 +373,7 @@ public:
#endif
};
Q_DECLARE_FLAGS(Features, Feature)
+ Q_ENUM(Feature)
explicit QOpenGLTexture(Target target);
explicit QOpenGLTexture(const QImage& image, MipMapGeneration genMipMaps = GenerateMipMaps);
@@ -487,6 +507,7 @@ public:
DepthMode = 0x1902, // GL_DEPTH_COMPONENT
StencilMode = 0x1901 // GL_STENCIL_INDEX
};
+ Q_ENUM(DepthStencilMode)
void setDepthStencilMode(DepthStencilMode mode);
DepthStencilMode depthStencilMode() const;
@@ -501,6 +522,7 @@ public:
CompareAlways = 0x0207, // GL_ALWAYS
CompareNever = 0x0200 // GL_NEVER
};
+ Q_ENUM(ComparisonFunction)
void setComparisonFunction(ComparisonFunction function);
ComparisonFunction comparisonFunction() const;
@@ -522,6 +544,7 @@ public:
LinearMipMapNearest = 0x2701, // GL_LINEAR_MIPMAP_NEAREST
LinearMipMapLinear = 0x2703 // GL_LINEAR_MIPMAP_LINEAR
};
+ Q_ENUM(Filter)
void setMinificationFilter(Filter filter);
Filter minificationFilter() const;