![]() |
Qt 6.x
The Qt SDK
|
#include <qopenglprogrambinarycache_p.h>
Classes | |
struct | ProgramDesc |
struct | ShaderDesc |
Public Member Functions | |
QOpenGLProgramBinaryCache () | |
bool | load (const QByteArray &cacheKey, uint programId) |
void | save (const QByteArray &cacheKey, uint programId) |
Definition at line 33 of file qopenglprogrambinarycache_p.h.
QOpenGLProgramBinaryCache::QOpenGLProgramBinaryCache | ( | ) |
Definition at line 83 of file qopenglprogrambinarycache.cpp.
References QSysInfo::buildAbi(), QStandardPaths::CacheLocation, QStandardPaths::GenericCacheLocation, QString::isEmpty(), qCDebug, qPrintable, qt_ensureWritableDir(), subPath(), and QStandardPaths::writableLocation().
bool QOpenGLProgramBinaryCache::load | ( | const QByteArray & | cacheKey, |
uint | programId | ||
) |
Definition at line 248 of file qopenglprogrambinarycache.cpp.
References BASE_HEADER_SIZE, e, QByteArray::fromRawData(), FULL_HEADER_SIZE, header(), info, QCache< Key, T >::insert(), lock, QCache< Key, T >::object(), PADDING_SIZE, qCDebug, qt_safe_read(), QIODeviceBase::ReadOnly, readStr(), readUInt(), renderer, DeferredFileRemove::setActive(), and QByteArray::size().
Referenced by QOpenGLShaderProgramPrivate::linkBinary().
void QOpenGLProgramBinaryCache::save | ( | const QByteArray & | cacheKey, |
uint | programId | ||
) |
Definition at line 353 of file qopenglprogrambinarycache.cpp.
References BINSHADER_MAGIC, BINSHADER_QTVERSION, BINSHADER_VERSION, context, QOpenGLContext::currentContext(), QByteArray::data(), error, FULL_HEADER_SIZE, funcs, GL_CONTEXT_LOST, GL_PROGRAM_BINARY_LENGTH, GLenum(), GLint(), headerSize, i, info, lock, ok, PADDING_SIZE, qCDebug, qPrintable, qt_ensureWritableDir(), QFileInfo::size(), Qt::Uninitialized, writeFile(), writeStr(), and writeUInt().
Referenced by QOpenGLShaderProgramPrivate::linkBinary().