PySide6.QtGui.QShaderVersion¶
- class QShaderVersion¶
Specifies the shading language version.
Details
While languages like SPIR-V or the Metal Shading Language use traditional version numbers, shaders for other APIs can use slightly different versioning schemes. All those are mapped to a single version number in here, however. For HLSL, the version refers to the Shader Model version, like 5.0, 5.1, or 6.0. For GLSL an additional flag is needed to choose between GLSL and GLSL/ES.
Below is a list with the most common examples of shader versions for different graphics APIs:
A default constructed
QShaderVersioncontains a version of 100 and no flags set.Note
This is a RHI API with limited compatibility guarantees, see
QShaderfor details.Added in version 6.6.
Synopsis¶
Methods¶
def
__init__()def
flags()def
__ne__()def
__lt__()def
__eq__()def
setFlags()def
setVersion()def
version()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
- class Flag¶
(inherits
enum.Flag) Describes the flags that can be set.Constant
Description
QShaderVersion.Flag.GlslEs
Indicates that GLSL/ES is meant in combination with GlslShader
- __init__()¶
- __init__(v[, f=QShaderVersion.Flags()])
- Parameters:
v – int
f – Combination of
Flag
Constructs a new
QShaderVersionwith versionvand flagsf.Returns the flags.
See also
- __ne__(rhs)¶
- Parameters:
rhs –
QShaderVersion- Return type:
bool
- __lt__(rhs)¶
- Parameters:
rhs –
QShaderVersion- Return type:
bool
- __eq__(rhs)¶
- Parameters:
rhs –
QShaderVersion- Return type:
bool
Sets the flags
f.See also
- setVersion(v)¶
- Parameters:
v – int
Sets the shading language version to
v.See also
- version()¶
- Return type:
int
Returns the version.
See also