PySide6.QtOpenGL.QOpenGLPixelTransferOptions

class QOpenGLPixelTransferOptions

QOpenGLPixelTransferOptions 类描述了影响纹理上传期间像素解包的像素存储模式。更多

概要

方法

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

__init__()

使用默认设置构造一个新的QOpenGLPixelTransferOptions实例。

__init__(arg__1)
Parameters:

arg__1QOpenGLPixelTransferOptions

alignment()
Return type:

整数

返回每个像素行的当前对齐要求。

另请参阅

setAlignment()

imageHeight()
Return type:

整数

返回当前设置的图像高度。

另请参阅

setImageHeight()

isLeastSignificantBitFirst()
Return type:

布尔

如果字节中的位从最低有效位到最高有效位排序,则返回 true

isSwapBytesEnabled()
Return type:

布尔

如果多字节组件的字节顺序被反转,则返回 true

rowLength()
Return type:

整数

返回当前设置的行长度。

另请参阅

setRowLength()

setAlignment(alignment)
Parameters:

alignment – int

设置每个像素行的alignment要求。对应于GL_UNPACK_ALIGNMENT。默认值为4,由OpenGL指定。

另请参阅

alignment()

setImageHeight(imageHeight)
Parameters:

imageHeight – int

将3D纹理的图像高度设置为imageHeight。对应于GL_UNPACK_IMAGE_HEIGHT。默认值为0。

另请参阅

imageHeight()

setLeastSignificantByteFirst(lsbFirst)
Parameters:

lsbFirst – 布尔值

lsbFirst 指定字节内的位是否从最低有效位到最高有效位排序。默认值为 false,意味着每个字节的第一位是最高有效位。这仅对位图数据有意义。对应于 GL_UNPACK_LSB_FIRST

setRowLength(rowLength)
Parameters:

rowLength – 整数

设置一行中的像素数为rowLength。对应于GL_UNPACK_ROW_LENGTH。默认值为0。

另请参阅

rowLength()

setSkipImages(skipImages)
Parameters:

skipImages – int

设置跳过的图像数量为skipImages。对应于GL_UNPACK_SKIP_IMAGES。相当于增加传递给setData()的指针。默认值为0。

另请参阅

skipImages()

setSkipPixels(skipPixels)
Parameters:

skipPixels – int

设置跳过的像素数为skipPixels。对应于GL_UNPACK_SKIP_PIXELS。相当于增加传递给setData()的指针。默认值为0。

另请参阅

skipPixels()

setSkipRows(skipRows)
Parameters:

skipRows – int

设置跳过的行数为skipRows。对应于GL_UNPACK_SKIP_ROWS。相当于增加传递给setData()的指针。默认值为0。

另请参阅

skipRows()

setSwapBytesEnabled(swapBytes)
Parameters:

swapBytes – 布尔值

swapBytes 指定是否反转多字节组件的字节顺序。默认值为 false。对应于 GL_UNPACK_SWAP_BYTES

另请参阅

isSwapBytesEnabled()

skipImages()
Return type:

整数

返回跳过的图像数量。

另请参阅

setSkipImages()

skipPixels()
Return type:

整数

返回跳过的像素数量。

另请参阅

setSkipPixels()

skipRows()
Return type:

整数

返回跳过的行数。

另请参阅

setSkipRows()

swap(other)
Parameters:

其他QOpenGLPixelTransferOptions