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
QShaderCode Class Reference

\inmodule QtGui More...

#include <qshader.h>

+ Collaboration diagram for QShaderCode:

Public Member Functions

 QShaderCode ()=default
 
 QShaderCode (const QByteArray &code, const QByteArray &entry=QByteArray())
 Constructs a new QShaderCode with the specified shader source code and entry point name.
 
QByteArray shader () const
 
void setShader (const QByteArray &code)
 Sets the shader source or byte code.
 
QByteArray entryPoint () const
 
void setEntryPoint (const QByteArray &entry)
 Sets the entry point name.
 

Friends

Q_GUI_EXPORT size_t qHash (const QShaderCode &, size_t) noexcept
 Returns the hash value for k, using seed to seed the calculation.
 

Related Symbols

(Note that these are not member symbols.)

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

Detailed Description

\inmodule QtGui

Since
6.6

Contains source or binary code for a shader and additional metadata.

When shader() is empty after retrieving a QShaderCode instance from QShader, it indicates no shader code was found for the requested key.

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

Definition at line 59 of file qshader.h.

Constructor & Destructor Documentation

◆ QShaderCode() [1/2]

QShaderCode::QShaderCode ( )
default

◆ QShaderCode() [2/2]

QShaderCode::QShaderCode ( const QByteArray & code,
const QByteArray & entry = QByteArray() )

Constructs a new QShaderCode with the specified shader source code and entry point name.

Definition at line 700 of file qshader.cpp.

Member Function Documentation

◆ entryPoint()

QByteArray QShaderCode::entryPoint ( ) const
inline
Returns
the entry point name.

Definition at line 68 of file qshader.h.

◆ setEntryPoint()

void QShaderCode::setEntryPoint ( const QByteArray & entry)
inline

Sets the entry point name.

Definition at line 69 of file qshader.h.

◆ setShader()

void QShaderCode::setShader ( const QByteArray & code)
inline

Sets the shader source or byte code.

Definition at line 66 of file qshader.h.

◆ shader()

QByteArray QShaderCode::shader ( ) const
inline
Returns
the shader source or bytecode.

Definition at line 65 of file qshader.h.

Referenced by QRhiD3D11::compileHlslShaderSource(), QMetalGraphicsPipeline::create(), QVkGraphicsPipeline::create(), QVkComputePipeline::create(), and QRhiMetalData::createMetalLib().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator!=()

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

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

Definition at line 226 of file qshader.h.

◆ operator==()

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

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

Definition at line 924 of file qshader.cpp.

◆ qHash [1/2]

size_t qHash ( const QShaderCode & k,
size_t seed = 0 )
friend

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

Definition at line 943 of file qshader.cpp.

◆ qHash() [2/2]

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

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

Definition at line 943 of file qshader.cpp.


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