Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
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 &k, size_t seed=0)

(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.

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 710 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.

◆ 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 227 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 932 of file qshader.cpp.

◆ qHash

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

Definition at line 950 of file qshader.cpp.


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