Provides information about the scenegraph backend and the graphics API used by Qt Quick. 更多...
import 语句: | import QtQuick 2.2 |
Since: | QtQuick 2.8 |
The GraphicsInfo attached type provides information about the scenegraph backend and the graphics API used to render the contents of the associated window.
If the item to which the properties are attached is not currently associated with any window, the properties are set to default values. When the associated window changes, the properties will update.
api : enumeration |
This property describes the graphics API that is currently in use.
可能的值包括:
majorVersion : int |
This property holds the major version of the graphics API in use.
With OpenGL the default version is
2.0
.
注意: This is applicable only to OpenGL.
另请参阅 minorVersion and profile .
minorVersion : int |
This property holds the minor version of the graphics API in use.
With OpenGL the default version is
2.0
.
注意: This is applicable only to OpenGL.
另请参阅 majorVersion and profile .
profile : enumeration |
This property holds the configured OpenGL context profile.
可能的值包括:
Reusable QML components will typically use this property in bindings in order to choose between core and non core profile compatible shader sources.
注意: This is applicable only to OpenGL.
另请参阅 majorVersion , minorVersion ,和 QSurfaceFormat .
renderableType : enumeration |
This property holds the renderable type. The value has no meaning for APIs other than OpenGL.
可能的值包括:
注意: This is applicable only to OpenGL.
另请参阅 QSurfaceFormat .
[since QtQuick 2.8] shaderCompilationType : enumeration |
This property contains a bitmask of the shader compilation approaches supported by the Qt Quick backend the application is using.
With OpenGL the value is GraphicsInfo .RuntimeCompilation, which corresponds to the traditional way of using ShaderEffect . Non-OpenGL backends are expected to focus more on GraphicsInfo .OfflineCompilation, however.
注意:
The value is only up-to-date once the item is associated with a window. Bindings relying on the value have to keep this in mind since the value may change from
0
to the actual bitmask after component initialization is complete. This is particularly relevant for
ShaderEffect
items inside
ShaderEffectSource
items set as property values.
This property was introduced in QtQuick 2.8.
另请参阅 shaderType and shaderSourceType .
[since QtQuick 2.8] shaderSourceType : enumeration |
This property contains a bitmask of the supported ways of providing shader sources.
With OpenGL the value is GraphicsInfo .ShaderSourceString, which corresponds to the traditional way of inlining GLSL source code into QML. Other, non-OpenGL Qt Quick backends may however decide not to support inlined shader sources, or even shader sources at all. In this case shaders are expected to be pre-compiled into formats like SPIR-V or D3D shader bytecode.
注意:
The value is only up-to-date once the item is associated with a window. Bindings relying on the value have to keep this in mind since the value may change from
0
to the actual bitmask after component initialization is complete. This is particularly relevant for
ShaderEffect
items inside
ShaderEffectSource
items set as property values.
This property was introduced in QtQuick 2.8.
另请参阅 shaderType and shaderCompilationType .
[since QtQuick 2.8] shaderType : enumeration |
This property contains the shading language supported by the Qt Quick backend the application is using.
注意: The value is only up-to-date once the item is associated with a window. Bindings relying on the value have to keep this in mind since the value may change from GraphicsInfo .UnknownShadingLanguage to the actual value after component initialization is complete. This is particularly relevant for ShaderEffect items inside ShaderEffectSource items set as property values.
This property was introduced in QtQuick 2.8.
另请参阅 shaderCompilationType and shaderSourceType .