#include <gltexture.h>
|
| GLTexture (GLenum target) |
|
bool | create () |
|
virtual | ~GLTexture () |
|
bool | isNull () const |
|
QSize | size () const |
|
void | setSize (const QSize &size) |
|
int | width () const |
|
int | height () const |
|
void | setContentTransform (OutputTransform transform) |
|
OutputTransform | contentTransform () const |
|
void | setSwizzle (GLenum red, GLenum green, GLenum blue, GLenum alpha) |
|
QMatrix4x4 | matrix (TextureCoordinateType type) const |
|
void | update (const QImage &image, const QPoint &offset=QPoint(0, 0), const QRect &src=QRect()) |
|
void | bind () |
|
void | unbind () |
|
void | render (const QSizeF &size) |
|
void | render (const QRegion ®ion, const QSizeF &size, bool hardwareClipping=false) |
|
void | render (const QRectF &source, const QRegion ®ion, const QSizeF &targetSize, bool hardwareClipping=false) |
|
GLuint | texture () const |
|
GLenum | target () const |
|
GLenum | filter () const |
|
GLenum | internalFormat () const |
|
QImage | toImage () |
|
void | clear () |
| Make the texture fully transparent.
|
|
void | setDirty () |
|
bool | isDirty () const |
|
void | setFilter (GLenum filter) |
|
void | setWrapMode (GLenum mode) |
|
void | generateMipmaps () |
|
Definition at line 39 of file gltexture.h.
◆ GLTexture() [1/2]
KWin::GLTexture::GLTexture |
( |
GLenum | target | ) |
|
|
explicit |
◆ ~GLTexture()
KWin::GLTexture::~GLTexture |
( |
| ) |
|
|
virtual |
◆ GLTexture() [2/2]
KWin::GLTexture::GLTexture |
( |
GLenum | target, |
|
|
GLuint | textureId, |
|
|
GLenum | internalFormat, |
|
|
const QSize & | size, |
|
|
int | levels, |
|
|
bool | owning, |
|
|
OutputTransform | transform ) |
|
explicitprotected |
◆ allocate()
std::unique_ptr< GLTexture > KWin::GLTexture::allocate |
( |
GLenum | internalFormat, |
|
|
const QSize & | size, |
|
|
int | levels = 1 ) |
|
static |
◆ bind()
void KWin::GLTexture::bind |
( |
| ) |
|
◆ clear()
void KWin::GLTexture::clear |
( |
| ) |
|
Make the texture fully transparent.
Definition at line 423 of file gltexture.cpp.
◆ contentTransform()
- Returns
- the transform between the content and the buffer
Definition at line 523 of file gltexture.cpp.
◆ create()
bool KWin::GLTexture::create |
( |
| ) |
|
Creates the underlying texture object. Returns true
if the texture has been created successfully; otherwise returns false
. Note that this does not allocate any storage for the texture.
Definition at line 111 of file gltexture.cpp.
◆ createNonOwningWrapper()
std::unique_ptr< GLTexture > KWin::GLTexture::createNonOwningWrapper |
( |
GLuint | textureId, |
|
|
GLenum | internalFormat, |
|
|
const QSize & | size ) |
|
static |
◆ filter()
GLenum KWin::GLTexture::filter |
( |
| ) |
const |
◆ framebufferObjectSupported()
bool KWin::GLTexture::framebufferObjectSupported |
( |
| ) |
|
|
static |
◆ generateMipmaps()
void KWin::GLTexture::generateMipmaps |
( |
| ) |
|
◆ height()
int KWin::GLTexture::height |
( |
| ) |
const |
◆ internalFormat()
GLenum KWin::GLTexture::internalFormat |
( |
| ) |
const |
◆ isDirty()
bool KWin::GLTexture::isDirty |
( |
| ) |
const |
◆ isNull()
bool KWin::GLTexture::isNull |
( |
| ) |
const |
◆ matrix()
Returns a matrix that transforms texture coordinates of the given type, taking the texture target and the y-inversion flag into account.
- Since
- 4.11
Definition at line 551 of file gltexture.cpp.
◆ onDamage()
void KWin::GLTexture::onDamage |
( |
| ) |
|
|
protectedvirtual |
◆ render() [1/3]
void KWin::GLTexture::render |
( |
const QRectF & | source, |
|
|
const QRegion & | region, |
|
|
const QSizeF & | targetSize, |
|
|
bool | hardwareClipping = false ) |
◆ render() [2/3]
void KWin::GLTexture::render |
( |
const QRegion & | region, |
|
|
const QSizeF & | size, |
|
|
bool | hardwareClipping = false ) |
◆ render() [3/3]
void KWin::GLTexture::render |
( |
const QSizeF & | size | ) |
|
◆ setContentTransform()
sets the transform between the content and the buffer
Definition at line 515 of file gltexture.cpp.
◆ setDirty()
void KWin::GLTexture::setDirty |
( |
| ) |
|
◆ setFilter()
void KWin::GLTexture::setFilter |
( |
GLenum | filter | ) |
|
◆ setSize()
void KWin::GLTexture::setSize |
( |
const QSize & | size | ) |
|
◆ setSwizzle()
void KWin::GLTexture::setSwizzle |
( |
GLenum | red, |
|
|
GLenum | green, |
|
|
GLenum | blue, |
|
|
GLenum | alpha ) |
Specifies which component of a texel is placed in each respective component of the vector returned to the shader.
Valid values are GL_RED, GL_GREEN, GL_BLUE, GL_ALPHA, GL_ONE and GL_ZERO.
- See also
- swizzleSupported()
- Since
- 5.2
Definition at line 528 of file gltexture.cpp.
◆ setWrapMode()
void KWin::GLTexture::setWrapMode |
( |
GLenum | mode | ) |
|
◆ size()
QSize KWin::GLTexture::size |
( |
| ) |
const |
◆ supportsFormatRG()
bool KWin::GLTexture::supportsFormatRG |
( |
| ) |
|
|
static |
Returns true
if texture formats R* are supported, and false
otherwise.
This requires OpenGL 3.0, GL_ARB_texture_rg or OpenGL ES 3.0 or GL_EXT_texture_rg.
- Since
- 5.2.1
Definition at line 566 of file gltexture.cpp.
◆ supportsSwizzle()
bool KWin::GLTexture::supportsSwizzle |
( |
| ) |
|
|
static |
Returns true if texture swizzle is supported, and false otherwise
Texture swizzle requires OpenGL 3.3, GL_ARB_texture_swizzle, or OpenGL ES 3.0.
- Since
- 5.2
Definition at line 561 of file gltexture.cpp.
◆ target()
GLenum KWin::GLTexture::target |
( |
| ) |
const |
◆ texture()
GLuint KWin::GLTexture::texture |
( |
| ) |
const |
◆ toImage()
QImage KWin::GLTexture::toImage |
( |
| ) |
|
◆ unbind()
void KWin::GLTexture::unbind |
( |
| ) |
|
◆ update()
void KWin::GLTexture::update |
( |
const QImage & | image, |
|
|
const QPoint & | offset = QPoint(0, 0), |
|
|
const QRect & | src = QRect() ) |
◆ upload() [1/2]
std::unique_ptr< GLTexture > KWin::GLTexture::upload |
( |
const QImage & | image | ) |
|
|
static |
◆ upload() [2/2]
std::unique_ptr< GLTexture > KWin::GLTexture::upload |
( |
const QPixmap & | pixmap | ) |
|
|
static |
◆ width()
int KWin::GLTexture::width |
( |
| ) |
const |
The documentation for this class was generated from the following files: