Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QShaderKey Class Reference

\inmodule QtGui More...

#include <qshader.h>

+ Collaboration diagram for QShaderKey:

Public Member Functions

 QShaderKey ()=default
 
 QShaderKey (QShader::Source s, const QShaderVersion &sver, QShader::Variant svar=QShader::StandardShader)
 Constructs a new QShaderKey with shader type s, version sver, and variant svar.
 
QShader::Source source () const
 
void setSource (QShader::Source s)
 Sets the shader type s.
 
QShaderVersion sourceVersion () const
 
void setSourceVersion (const QShaderVersion &sver)
 Sets the shading language version sver.
 
QShader::Variant sourceVariant () const
 
void setSourceVariant (QShader::Variant svar)
 Sets the type of variant to use to svar.
 

Related Symbols

(Note that these are not member symbols.)

bool operator== (const QShaderKey &lhs, const QShaderKey &rhs) noexcept
 Returns true if the two QShaderKey objects lhs and rhs are equal.
 
bool operator< (const QShaderKey &lhs, const QShaderKey &rhs) noexcept
 
bool operator!= (const QShaderKey &lhs, const QShaderKey &rhs)
 Returns false if the values in the two QShaderKey objects lhs and rhs are equal; otherwise returns true.
 
size_t qHash (const QShaderKey &k, size_t seed) noexcept
 Returns the hash value for k, using seed to seed the calculation.
 

Detailed Description

\inmodule QtGui

Since
6.6

Specifies the shading language, the version with flags, and the variant.

A default constructed QShaderKey has source set to SpirvShader and sourceVersion set to 100. sourceVariant defaults to StandardShader.

Note
This is a RHI API with limited compatibility guarantees, see \l QShader for details.

Definition at line 177 of file qshader.h.

Constructor & Destructor Documentation

◆ QShaderKey() [1/2]

QShaderKey::QShaderKey ( )
default

◆ QShaderKey() [2/2]

QShaderKey::QShaderKey ( QShader::Source s,
const QShaderVersion & sver,
QShader::Variant svar = QShader::StandardShader )

Constructs a new QShaderKey with shader type s, version sver, and variant svar.

Definition at line 733 of file qshader.cpp.

Member Function Documentation

◆ setSource()

void QShaderKey::setSource ( QShader::Source s)
inline

Sets the shader type s.

Definition at line 186 of file qshader.h.

Referenced by readShaderKey().

+ Here is the caller graph for this function:

◆ setSourceVariant()

void QShaderKey::setSourceVariant ( QShader::Variant svar)
inline

Sets the type of variant to use to svar.

Definition at line 192 of file qshader.h.

Referenced by readShaderKey().

+ Here is the caller graph for this function:

◆ setSourceVersion()

void QShaderKey::setSourceVersion ( const QShaderVersion & sver)
inline

Sets the shading language version sver.

Definition at line 189 of file qshader.h.

Referenced by readShaderKey().

+ Here is the caller graph for this function:

◆ source()

QShader::Source QShaderKey::source ( ) const
inline
Returns
the shader type.

Definition at line 185 of file qshader.h.

Referenced by operator<<(), and writeShaderKey().

+ Here is the caller graph for this function:

◆ sourceVariant()

QShader::Variant QShaderKey::sourceVariant ( ) const
inline
Returns
the type of the variant to use.

Definition at line 191 of file qshader.h.

Referenced by operator<<(), and writeShaderKey().

+ Here is the caller graph for this function:

◆ sourceVersion()

QShaderVersion QShaderKey::sourceVersion ( ) const
inline
Returns
the shading language version.

Definition at line 188 of file qshader.h.

Referenced by operator<<(), and writeShaderKey().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=()

bool operator!= ( const QShaderKey & lhs,
const QShaderKey & rhs )
related

Returns false if the values in the two QShaderKey objects lhs and rhs are equal; otherwise returns true.

Definition at line 221 of file qshader.h.

◆ operator<()

bool operator< ( const QShaderKey & lhs,
const QShaderKey & rhs )
related
Returns
true if lhs is smaller than rhs.

Establishes a sorting order between the two keys lhs and rhs.

Definition at line 879 of file qshader.cpp.

◆ operator==()

bool operator== ( const QShaderKey & lhs,
const QShaderKey & rhs )
related

Returns true if the two QShaderKey objects lhs and rhs are equal.

Definition at line 866 of file qshader.cpp.

◆ qHash()

size_t qHash ( const QShaderKey & k,
size_t seed )
related

Returns the hash value for k, using seed to seed the calculation.

Definition at line 910 of file qshader.cpp.

References qHashMulti(), and seed.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: