Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QRhiTextureCopyDescription Class Reference

\inmodule QtGui More...

#include <qrhi.h>

+ Collaboration diagram for QRhiTextureCopyDescription:

Public Member Functions

 QRhiTextureCopyDescription ()=default
 Constructs an empty texture copy description.
 
QSize pixelSize () const
 
void setPixelSize (const QSize &sz)
 Sets the size of the region to copy to sz.
 
int sourceLayer () const
 
void setSourceLayer (int layer)
 Sets the source array layer.
 
int sourceLevel () const
 
void setSourceLevel (int level)
 Sets the source mip level.
 
QPoint sourceTopLeft () const
 
void setSourceTopLeft (const QPoint &p)
 Sets the source top-left position to p.
 
int destinationLayer () const
 
void setDestinationLayer (int layer)
 Sets the destination array layer.
 
int destinationLevel () const
 
void setDestinationLevel (int level)
 Sets the destination mip level.
 
QPoint destinationTopLeft () const
 
void setDestinationTopLeft (const QPoint &p)
 Sets the destination top-left position p.
 

Detailed Description

\inmodule QtGui

Since
6.6

Describes a texture-to-texture copy operation.

An empty pixelSize() indicates that the entire subresource is to be copied. A default constructed copy description therefore leads to copying the entire subresource at level 0 of layer 0.

Note
The source texture must be created with QRhiTexture::UsedAsTransferSource.
The source and destination rectangles defined by pixelSize(), sourceTopLeft(), and destinationTopLeft() must fit the source and destination textures, respectively. The behavior is undefined otherwise.

With cubemaps, 3D textures, and texture arrays one face or slice can be copied at a time. The face or slice is specified by the source and destination layer indices. With mipmapped textures one mip level can be copied at a time. The source and destination layer and mip level indices can differ, but the size and position must be carefully controlled to avoid out of bounds copies, in which case the behavior is undefined.

Note
This is a RHI API with limited compatibility guarantees, see \l QRhi for details.

Definition at line 738 of file qrhi.h.

Constructor & Destructor Documentation

◆ QRhiTextureCopyDescription()

QRhiTextureCopyDescription::QRhiTextureCopyDescription ( )
default

Constructs an empty texture copy description.

Member Function Documentation

◆ destinationLayer()

int QRhiTextureCopyDescription::destinationLayer ( ) const
inline
Returns
the destination array layer (cubemap face or array layer index). Default to 0.

Definition at line 755 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

◆ destinationLevel()

int QRhiTextureCopyDescription::destinationLevel ( ) const
inline
Returns
the destionation mip level. Defaults to 0.

Definition at line 758 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

◆ destinationTopLeft()

QPoint QRhiTextureCopyDescription::destinationTopLeft ( ) const
inline
Returns
the destionation top-left position in pixels. Defaults to (0, 0).

Definition at line 761 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

◆ pixelSize()

QSize QRhiTextureCopyDescription::pixelSize ( ) const
inline
Returns
the size of the region to copy.
Note
An empty pixelSize() indicates that the entire subresource is to be copied. A default constructed copy description therefore leads to copying the entire subresource at level 0 of layer 0.

Definition at line 743 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

◆ setDestinationLayer()

void QRhiTextureCopyDescription::setDestinationLayer ( int layer)
inline

Sets the destination array layer.

Definition at line 756 of file qrhi.h.

◆ setDestinationLevel()

void QRhiTextureCopyDescription::setDestinationLevel ( int level)
inline

Sets the destination mip level.

Definition at line 759 of file qrhi.h.

◆ setDestinationTopLeft()

void QRhiTextureCopyDescription::setDestinationTopLeft ( const QPoint & p)
inline

Sets the destination top-left position p.

Definition at line 762 of file qrhi.h.

◆ setPixelSize()

void QRhiTextureCopyDescription::setPixelSize ( const QSize & sz)
inline

Sets the size of the region to copy to sz.

Definition at line 744 of file qrhi.h.

◆ setSourceLayer()

void QRhiTextureCopyDescription::setSourceLayer ( int layer)
inline

Sets the source array layer.

Definition at line 747 of file qrhi.h.

◆ setSourceLevel()

void QRhiTextureCopyDescription::setSourceLevel ( int level)
inline

Sets the source mip level.

Definition at line 750 of file qrhi.h.

◆ setSourceTopLeft()

void QRhiTextureCopyDescription::setSourceTopLeft ( const QPoint & p)
inline

Sets the source top-left position to p.

Definition at line 753 of file qrhi.h.

◆ sourceLayer()

int QRhiTextureCopyDescription::sourceLayer ( ) const
inline
Returns
the source array layer (cubemap face or array layer index). Defaults to 0.

Definition at line 746 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

◆ sourceLevel()

int QRhiTextureCopyDescription::sourceLevel ( ) const
inline
Returns
the source mip level. Defaults to 0.

Definition at line 749 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

◆ sourceTopLeft()

QPoint QRhiTextureCopyDescription::sourceTopLeft ( ) const
inline
Returns
the source top-left position (in pixels). Defaults to (0, 0).

Definition at line 752 of file qrhi.h.

Referenced by QRhiD3D11::enqueueResourceUpdates(), QRhiGles2::enqueueResourceUpdates(), QRhiVulkan::enqueueResourceUpdates(), and QRhiNull::simulateTextureCopy().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following files: