54 void setSize(
const QSize &size);
77 void setSwizzle(GLenum red, GLenum green, GLenum blue, GLenum alpha);
87 void update(
const QImage &image,
const QPoint &offset = QPoint(0, 0),
const QRect &src = QRect());
90 void render(
const QSizeF &size);
91 void render(
const QRegion ®ion,
const QSizeF &size,
bool hardwareClipping =
false);
92 void render(
const QRectF &source,
const QRegion ®ion,
const QSizeF &targetSize,
bool hardwareClipping =
false);
94 GLuint texture()
const;
95 GLenum target()
const;
96 GLenum filter()
const;
109 bool isDirty()
const;
110 void setFilter(GLenum filter);
111 void setWrapMode(GLenum mode);
113 void generateMipmaps();
115 static bool framebufferObjectSupported();
124 static bool supportsSwizzle();
133 static bool supportsFormatRG();
135 static std::unique_ptr<GLTexture> createNonOwningWrapper(GLuint textureId, GLenum
internalFormat,
const QSize &size);
136 static std::unique_ptr<GLTexture> allocate(GLenum
internalFormat,
const QSize &size,
int levels = 1);
137 static std::unique_ptr<GLTexture> upload(
const QImage &image);
138 static std::unique_ptr<GLTexture> upload(
const QPixmap &pixmap);
143 const std::unique_ptr<GLTexturePrivate>
d;
145 virtual void onDamage();
const std::unique_ptr< GLTexturePrivate > d