TextureImage QML Type
封装了从图像源创建 OpenGL 纹理图像的必要信息。更多
| Import Statement: | import Qt3D.Render 2.11 |
| In C++: | QTextureImage |
| Inherits: | |
| Status: | Deprecated |
属性
详细说明
财产文件
face : enumeration
保存纹理图像的立方体贴图面。
| 常数 | 描述 |
|---|---|
CubeMapPositiveX | 0x8515 GL_TEXTURE_CUBE_MAP_POSITIVE_X |
CubeMapNegativeX | 0x8516 GL_TEXTURE_CUBE_MAP_NEGATIVE_X |
CubeMapPositiveY | 0x8517 GL_TEXTURE_CUBE_MAP_POSITIVE_Y |
CubeMapNegativeY | 0x8518 GL_TEXTURE_CUBE_MAP_NEGATIVE_Y |
CubeMapPositiveZ | 0x8519 GL_TEXTURE_CUBE_MAP_POSITIVE_Z |
CubeMapNegativeZ | 0x851A 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
此属性用于保存从中加载纹理图像数据的源 url。
status : enumeration [read-only]
此属性用于显示纹理图像的加载状态。
- TextureImage.无
- TextureImage.正在加载
- TextureImage.就绪
- TextureImage.错误
© 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.