本页内容

TextureImage QML Type

封装了从图像源创建 OpenGL 纹理图像所需的信息。更多...

Import Statement: import Qt3D.Render 2.12
In C++: QTextureImage
Inherits:

AbstractTextureImage

Status: Deprecated

此类型已弃用。我们强烈建议不要在新代码中使用它。

属性

详细说明

物业文件

face : enumeration

存储纹理图像的立方体贴图面。

常量描述
CubeMapPositiveX0x8515 GL_TEXTURE_CUBE_MAP_POSITIVE_X
CubeMapNegativeX0x8516 GL_TEXTURE_CUBE_MAP_NEGATIVE_X
CubeMapPositiveY0x8517 GL_TEXTURE_CUBE_MAP_POSITIVE_Y
CubeMapNegativeY0x8518 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y
CubeMapPositiveZ0x8519 GL_TEXTURE_CUBE_MAP_POSITIVE_Z
CubeMapNegativeZ0x851A GL_TEXTURE_CUBE_MAP_NEGATIVE_Z

注意: 立方体贴图的 表面仅对TargetCubeMap 和TargetCubeMapArray 具有意义。

layer : int

用于存储纹理图像的图层。

mipLevel : int

保存纹理图像的Mipmap级别。

mirrored : bool

该属性指定在加载图像时是否应将其镜像。此功能旨在避免用户需要手动调整图像以匹配渲染 API 所使用的纹理坐标原点。默认情况下,该属性设置为 true。使用 GPU 压缩纹理格式时,此属性无效。

警告: 在加载未压缩或 CPU 压缩的图像格式(如 PNG)时,此 属性会导致运行时性能开销。为避免此性能开销,建议将此属性设置为 false,并加载已预先镜像的纹理资源。

注意:OpenGL 规定纹理坐标的原点位于左下角,而 DirectX 则使用左上角作为原点。

注意: 使用立方体贴图时, 通常应禁用镜像功能,因为立方体贴图采样器采用的是方向而非常规的纹理坐标。

source : url

该属性存储了用于加载纹理图像数据的源网址。

status : enumeration [read-only]

该属性表示纹理图像的加载状态。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.