![]() |
Qt 6.x
The Qt SDK
|
\inmodule QtGui More...
#include <qshader.h>
Public Types | |
enum | Flag { GlslEs = 0x01 } |
Describes the flags that can be set. More... | |
Public Member Functions | |
QShaderVersion ()=default | |
QShaderVersion (int v, Flags f=Flags()) | |
Constructs a new QShaderVersion with version v and flags f. | |
int | version () const |
void | setVersion (int v) |
Sets the shading language version to v. | |
Flags | flags () const |
void | setFlags (Flags f) |
Sets the flags f. | |
Related Symbols | |
(Note that these are not member symbols.) | |
bool | operator== (const QShaderVersion &lhs, const QShaderVersion &rhs) noexcept |
Returns true if the two QShaderVersion objects lhs and rhs are equal. | |
bool | operator< (const QShaderVersion &lhs, const QShaderVersion &rhs) noexcept |
bool | operator!= (const QShaderVersion &lhs, const QShaderVersion &rhs) |
Returns false if the values in the two QShaderVersion objects lhs and rhs are equal; otherwise returns true . | |
\inmodule QtGui
Specifies the shading language version.
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:
\list
A default constructed QShaderVersion contains a version of 100 and no flags set.
enum QShaderVersion::Flag |
|
default |
Constructs a new QShaderVersion with version v and flags f.
Definition at line 637 of file qshader.cpp.
|
inline |
Definition at line 45 of file qshader.h.
Referenced by writeShaderKey().
Sets the flags f.
Definition at line 46 of file qshader.h.
Referenced by readShaderKey().
|
inline |
Sets the shading language version to v.
Definition at line 43 of file qshader.h.
Referenced by readShaderKey().
|
inline |
Definition at line 42 of file qshader.h.
Referenced by toMetalLanguageVersion(), and writeShaderKey().
|
related |
Returns false
if the values in the two QShaderVersion objects lhs and rhs are equal; otherwise returns true
.
|
related |
Establishes a sorting order between the two QShaderVersion lhs and rhs.
Definition at line 811 of file qshader.cpp.
|
related |
Returns true
if the two QShaderVersion objects lhs and rhs are equal.
Definition at line 792 of file qshader.cpp.