4#ifndef QOPENGLABSTRACTTEXTURE_H
5#define QOPENGLABSTRACTTEXTURE_H
7#include <QtOpenGL/qtopenglglobal.h>
11#include <QtGui/qopengl.h>
12#include <QtGui/qimage.h>
13#include <QtCore/QScopedPointer>
27 Target1DArray = 0x8C18,
29 Target2DArray = 0x8C1A,
31 TargetCubeMap = 0x8513,
32 TargetCubeMapArray = 0x9009,
33 Target2DMultisample = 0x9100,
34 Target2DMultisampleArray = 0x9102,
35 TargetRectangle = 0x84F5,
41 BindingTarget1D = 0x8068,
42 BindingTarget1DArray = 0x8C1C,
43 BindingTarget2D = 0x8069,
44 BindingTarget2DArray = 0x8C1D,
45 BindingTarget3D = 0x806A,
46 BindingTargetCubeMap = 0x8514,
47 BindingTargetCubeMapArray = 0x900A,
48 BindingTarget2DMultisample = 0x9104,
49 BindingTarget2DMultisampleArray = 0x9105,
50 BindingTargetRectangle = 0x84F6,
51 BindingTargetBuffer = 0x8C2C
79 RGBA16_UNorm = 0x805B,
90 RGBA16_SNorm = 0x8F9B,
158 R_ATI1N_UNorm = 0x8DBB,
159 R_ATI1N_SNorm = 0x8DBC,
160 RG_ATI2N_UNorm = 0x8DBD,
161 RG_ATI2N_SNorm = 0x8DBE,
162 RGB_BP_UNSIGNED_FLOAT = 0x8E8F,
163 RGB_BP_SIGNED_FLOAT = 0x8E8E,
164 RGB_BP_UNorm = 0x8E8C,
165 R11_EAC_UNorm = 0x9270,
166 R11_EAC_SNorm = 0x9271,
167 RG11_EAC_UNorm = 0x9272,
168 RG11_EAC_SNorm = 0x9273,
171 RGB8_PunchThrough_Alpha1_ETC2 = 0x9276,
172 SRGB8_PunchThrough_Alpha1_ETC2 = 0x9277,
173 RGBA8_ETC2_EAC = 0x9278,
174 SRGB8_Alpha8_ETC2_EAC = 0x9279,
176 RGBA_ASTC_4x4 = 0x93B0,
177 RGBA_ASTC_5x4 = 0x93B1,
178 RGBA_ASTC_5x5 = 0x93B2,
179 RGBA_ASTC_6x5 = 0x93B3,
180 RGBA_ASTC_6x6 = 0x93B4,
181 RGBA_ASTC_8x5 = 0x93B5,
182 RGBA_ASTC_8x6 = 0x93B6,
183 RGBA_ASTC_8x8 = 0x93B7,
184 RGBA_ASTC_10x5 = 0x93B8,
185 RGBA_ASTC_10x6 = 0x93B9,
186 RGBA_ASTC_10x8 = 0x93BA,
187 RGBA_ASTC_10x10 = 0x93BB,
188 RGBA_ASTC_12x10 = 0x93BC,
189 RGBA_ASTC_12x12 = 0x93BD,
190 SRGB8_Alpha8_ASTC_4x4 = 0x93D0,
191 SRGB8_Alpha8_ASTC_5x4 = 0x93D1,
192 SRGB8_Alpha8_ASTC_5x5 = 0x93D2,
193 SRGB8_Alpha8_ASTC_6x5 = 0x93D3,
194 SRGB8_Alpha8_ASTC_6x6 = 0x93D4,
195 SRGB8_Alpha8_ASTC_8x5 = 0x93D5,
196 SRGB8_Alpha8_ASTC_8x6 = 0x93D6,
197 SRGB8_Alpha8_ASTC_8x8 = 0x93D7,
198 SRGB8_Alpha8_ASTC_10x5 = 0x93D8,
199 SRGB8_Alpha8_ASTC_10x6 = 0x93D9,
200 SRGB8_Alpha8_ASTC_10x8 = 0x93DA,
201 SRGB8_Alpha8_ASTC_10x10 = 0x93DB,
202 SRGB8_Alpha8_ASTC_12x10 = 0x93DC,
203 SRGB8_Alpha8_ASTC_12x12 = 0x93DD,
207 SRGB8_Alpha8 = 0x8C43,
209 SRGB_Alpha_DXT1 = 0x8C4D,
210 SRGB_Alpha_DXT3 = 0x8C4E,
211 SRGB_Alpha_DXT5 = 0x8C4F,
212 SRGB_BP_UNorm = 0x8E8D,
215 DepthFormat = 0x1902,
216 AlphaFormat = 0x1906,
219 LuminanceFormat = 0x1909,
220 LuminanceAlphaFormat = 0x190A
251 CubeMapPositiveX = 0x8515,
252 CubeMapNegativeX = 0x8516,
253 CubeMapPositiveY = 0x8517,
254 CubeMapNegativeY = 0x8518,
255 CubeMapPositiveZ = 0x8519,
256 CubeMapNegativeZ = 0x851A
268 Red_Integer = 0x8D94,
270 RGB_Integer = 0x8D98,
271 BGR_Integer = 0x8D9A,
272 RGBA_Integer = 0x8D99,
273 BGRA_Integer = 0x8D9B,
276 DepthStencil = 0x84F9,
279 LuminanceAlpha = 0x190A
294 UInt32_RGB9_E5 = 0x8C3E,
295 UInt32_RG11B10F = 0x8C3B,
296 UInt8_RG3B2 = 0x8032,
297 UInt8_RG3B2_Rev = 0x8362,
298 UInt16_RGB5A1 = 0x8034,
299 UInt16_RGB5A1_Rev = 0x8366,
300 UInt16_R5G6B5 = 0x8363,
301 UInt16_R5G6B5_Rev = 0x8364,
302 UInt16_RGBA4 = 0x8033,
303 UInt16_RGBA4_Rev = 0x8365,
304 UInt32_RGBA8 = 0x8035,
305 UInt32_RGBA8_Rev = 0x8367,
306 UInt32_RGB10A2 = 0x8036,
307 UInt32_RGB10A2_Rev = 0x8368,
308 UInt32_D24S8 = 0x84FA,
309 Float32_D32_UInt32_S8_X24 = 0x8DAD
315 SwizzleGreen = 0x8E43,
316 SwizzleBlue = 0x8E44,
317 SwizzleAlpha = 0x8E45
335 ClampToBorder = 0x812D
344 Q_ENUM(CoordinateDirection)
348 ImmutableStorage = 0x00000001,
349 ImmutableMultisampleStorage = 0x00000002,
350 TextureRectangle = 0x00000004,
351 TextureArrays = 0x00000008,
352 Texture3D = 0x00000010,
353 TextureMultisample = 0x00000020,
354 TextureBuffer = 0x00000040,
355 TextureCubeMapArrays = 0x00000080,
356 Swizzle = 0x00000100,
357 StencilTexturing = 0x00000200,
358 AnisotropicFiltering = 0x00000400,
359 NPOTTextures = 0x00000800,
360 NPOTTextureRepeat = 0x00001000,
361 Texture1D = 0x00002000,
362 TextureComparisonOperators = 0x00004000,
363 TextureMipMapLevel = 0x00008000,
365 MaxFeatureFlag = 0x00010000
380 bool isCreated()
const;
385 void bind(
uint unit, TextureUnitReset
reset = DontResetTextureUnit);
389 bool isBound()
const;
390 bool isBound(
uint unit);
396 TextureFormat
format()
const;
401 void setMipLevels(
int levels);
402 int mipLevels()
const;
403 int maximumMipLevels()
const;
404 void setLayers(
int layers);
409 void setFixedSamplePositions(
bool fixed);
410 bool isFixedSamplePositions()
const;
411 void allocateStorage();
412 void allocateStorage(PixelFormat pixelFormat, PixelType pixelType);
413 bool isStorageAllocated()
const;
416 TextureFormat viewFormat,
417 int minimumMipmapLevel,
int maximumMipmapLevel,
418 int minimumLayer,
int maximumLayer)
const;
419 bool isTextureView()
const;
422 void setData(
int mipLevel,
int layer, CubeMapFace cubeFace,
423 PixelFormat sourceFormat, PixelType sourceType,
425 void setData(
int mipLevel,
int layer,
int layerCount, CubeMapFace cubeFace,
426 PixelFormat sourceFormat, PixelType sourceType,
429 PixelFormat sourceFormat, PixelType sourceType,
432 PixelFormat sourceFormat, PixelType sourceType,
434 void setData(PixelFormat sourceFormat, PixelType sourceType,
437 void setData(
int xOffset,
int yOffset,
int zOffset,
439 PixelFormat sourceFormat, PixelType sourceType,
441 void setData(
int xOffset,
int yOffset,
int zOffset,
443 PixelFormat sourceFormat, PixelType sourceType,
445 void setData(
int xOffset,
int yOffset,
int zOffset,
447 int mipLevel,
int layer,
448 PixelFormat sourceFormat, PixelType sourceType,
450 void setData(
int xOffset,
int yOffset,
int zOffset,
452 int mipLevel,
int layer,
453 CubeMapFace cubeFace,
454 PixelFormat sourceFormat, PixelType sourceType,
456 void setData(
int xOffset,
int yOffset,
int zOffset,
458 int mipLevel,
int layer,
459 CubeMapFace cubeFace,
int layerCount,
460 PixelFormat sourceFormat, PixelType sourceType,
464 void setCompressedData(
int mipLevel,
int layer, CubeMapFace cubeFace,
467 void setCompressedData(
int mipLevel,
int layer,
int layerCount, CubeMapFace cubeFace,
470 void setCompressedData(
int mipLevel,
int layer,
473 void setCompressedData(
int mipLevel,
int dataSize,
const void *
data,
484 void setMipBaseLevel(
int baseLevel);
485 int mipBaseLevel()
const;
486 void setMipMaxLevel(
int maxLevel);
487 int mipMaxLevel()
const;
488 void setMipLevelRange(
int baseLevel,
int maxLevel);
491 void setAutoMipMapGenerationEnabled(
bool enabled);
492 bool isAutoMipMapGenerationEnabled()
const;
494 void generateMipMaps();
495 void generateMipMaps(
int baseLevel,
bool resetBaseLevel =
true);
497 void setSwizzleMask(SwizzleComponent
component, SwizzleValue
value);
498 void setSwizzleMask(SwizzleValue
r, SwizzleValue
g,
499 SwizzleValue
b, SwizzleValue
a);
500 SwizzleValue swizzleMask(SwizzleComponent
component)
const;
508 void setDepthStencilMode(DepthStencilMode
mode);
509 DepthStencilMode depthStencilMode()
const;
512 CompareLessEqual = 0x0203,
513 CompareGreaterEqual = 0x0206,
514 CompareLess = 0x0201,
515 CompareGreater = 0x0204,
516 CompareEqual = 0x0202,
517 CompareNotEqual = 0x0205,
518 CompareAlways = 0x0207,
519 CompareNever = 0x0200,
521#if QT_DEPRECATED_SINCE(6, 1)
523 "Use CompareNotEqual instead.") = CompareNotEqual
526 Q_ENUM(ComparisonFunction)
528 void setComparisonFunction(ComparisonFunction function);
529 ComparisonFunction comparisonFunction()
const;
532 CompareRefToTexture = 0x884E,
536 void setComparisonMode(ComparisonMode
mode);
537 ComparisonMode comparisonMode()
const;
543 NearestMipMapNearest = 0x2700,
544 NearestMipMapLinear = 0x2702,
545 LinearMipMapNearest = 0x2701,
546 LinearMipMapLinear = 0x2703
550 void setMinificationFilter(Filter
filter);
551 Filter minificationFilter()
const;
552 void setMagnificationFilter(Filter
filter);
553 Filter magnificationFilter()
const;
554 void setMinMagFilters(Filter minificationFilter,
555 Filter magnificationFilter);
557 void setMaximumAnisotropy(
float anisotropy);
558 float maximumAnisotropy()
const;
560 void setWrapMode(WrapMode
mode);
561 void setWrapMode(CoordinateDirection
direction, WrapMode
mode);
562 WrapMode wrapMode(CoordinateDirection
direction)
const;
565 void setBorderColor(
float r,
float g,
float b,
float a);
566 void setBorderColor(
int r,
int g,
int b,
int a);
569 QColor borderColor()
const;
570 void borderColor(
float *
border)
const;
571 void borderColor(
int *
border)
const;
572 void borderColor(
unsigned int *
border)
const;
574 void setMinimumLevelOfDetail(
float value);
575 float minimumLevelOfDetail()
const;
576 void setMaximumLevelOfDetail(
float value);
577 float maximumLevelOfDetail()
const;
578 void setLevelOfDetailRange(
float min,
float max);
580 void setLevelofDetailBias(
float bias);
581 float levelofDetailBias()
const;
583#ifndef QT_NO_DEBUG_STREAM
595#ifndef QT_NO_DEBUG_STREAM
The QColor class provides colors based on RGB, HSV or CMYK values.
TextureFormat
This enum defines the possible texture formats.
@ FormatClass_S3TC_DXT5_RGBA
@ FormatClass_S3TC_DXT1_RGBA
@ FormatClass_S3TC_DXT1_RGB
@ FormatClass_S3TC_DXT3_RGBA
Filter
This enum defines the filtering parameters for a QOpenGLTexture object.
MipMapGeneration
This enum defines the options to control mipmap generation.
WrapMode
This enum defines the possible texture coordinate wrapping modes.
SwizzleValue
This enum defines the possible mask values for texture swizzling.
CubeMapFace
This enum defines the possible CubeMap faces.
BindingTarget
This enum defines the possible binding targets of texture units.
PixelType
This enum defines the possible pixel data types for a pixel transfer operation.
Target
This enum defines the texture target of a QOpenGLTexture object.
PixelFormat
This enum defines the possible client-side pixel formats for a pixel transfer operation.
SwizzleComponent
This enum defines the texture color components that can be assigned a swizzle mask.
Feature
This enum defines the OpenGL texture-related features that can be tested for.
TextureUnitReset
This enum defines options ot control texture unit activation.
CoordinateDirection
This enum defines the possible texture coordinate directions.
Combined button and popup list for selecting options.
#define Q_DECL_ENUMERATOR_DEPRECATED_X(x)
std::pair< T1, T2 > QPair
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
const EGLAttrib EGLOutputLayerEXT * layers
#define Q_DECLARE_FLAGS(Flags, Enum)
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
GLboolean GLboolean GLboolean b
GLint GLenum GLsizei GLsizei GLsizei depth
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLenum GLsizei GLsizei GLsizei GLint border
GLenum GLenum GLsizei const GLuint GLboolean enabled
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLint GLsizei GLsizei GLenum format
Q_OPENGL_EXPORT QDebug operator<<(QDebug debug, const QOpenGLTexture *t)
static qreal component(const QPointF &point, unsigned int i)
mimeData setData("text/csv", csvData)
socketLayer bind(QHostAddress::Any, 4000)