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
qktxhandler.cpp File Reference

(6463b36da05bf57f2ff5857be6fa56e2c240fe12)

#include "qktxhandler_p.h"
#include "qtexturefiledata_p.h"
#include <QtEndian>
#include <QSize>
#include <QMap>
#include <QtCore/qiodevice.h>
+ Include dependency graph for qktxhandler.cpp:

Go to the source code of this file.

Classes

struct  KTXHeader
 
struct  KTXKeyValuePairItem
 
struct  KTXMipmapLevel
 

Macros

#define KTX_IDENTIFIER_LENGTH   12
 

Functions

static const std::optional< quint32nearestMultipleOf4 (quint32 value)
 
static QByteArrayView safeView (QByteArrayView view, quint32 start, quint32 length)
 

Variables

static const char ktxIdentifier [KTX_IDENTIFIER_LENGTH] = { '\xAB', 'K', 'T', 'X', ' ', '1', '1', '\xBB', '\r', '\n', '\x1A', '\n' }
 
static const quint32 platformEndianIdentifier = 0x04030201
 
static const quint32 inversePlatformEndianIdentifier = 0x01020304
 
static constexpr quint32 qktxh_headerSize = sizeof(KTXHeader)
 

Macro Definition Documentation

◆ KTX_IDENTIFIER_LENGTH

#define KTX_IDENTIFIER_LENGTH   12

Definition at line 22 of file qktxhandler.cpp.

Referenced by renderToKTXFileInternal().

Function Documentation

◆ nearestMultipleOf4()

static const std::optional< quint32 > nearestMultipleOf4 ( quint32 value)
static

Definition at line 75 of file qktxhandler.cpp.

References qAddOverflow().

Referenced by QKtxHandler::read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ safeView()

static QByteArrayView safeView ( QByteArrayView view,
quint32 start,
quint32 length )
static

Definition at line 86 of file qktxhandler.cpp.

References qAddOverflow(), and view.

Referenced by QKtxHandler::read().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Variable Documentation

◆ inversePlatformEndianIdentifier

const quint32 inversePlatformEndianIdentifier = 0x01020304
static

Definition at line 25 of file qktxhandler.cpp.

◆ ktxIdentifier

const char ktxIdentifier[KTX_IDENTIFIER_LENGTH] = { '\xAB', 'K', 'T', 'X', ' ', '1', '1', '\xBB', '\r', '\n', '\x1A', '\n' }
static

Definition at line 23 of file qktxhandler.cpp.

Referenced by QKtxHandler::canRead(), and renderToKTXFileInternal().

◆ platformEndianIdentifier

const quint32 platformEndianIdentifier = 0x04030201
static

Definition at line 24 of file qktxhandler.cpp.

Referenced by renderToKTXFileInternal().

◆ qktxh_headerSize

constexpr quint32 qktxh_headerSize = sizeof(KTXHeader)
staticconstexpr

Definition at line 44 of file qktxhandler.cpp.

Referenced by QKtxHandler::read().