5#ifndef QSSGN_RENDERQSSGDER_TYPES_H
6#define QSSGN_RENDERQSSGDER_TYPES_H
19#include <QtQuick3DUtils/private/qssgdataref_p.h>
21#include <QtQuick3DUtils/private/qtquick3dutilsglobal_p.h>
23#include <QtGui/QVector2D>
24#include <QtGui/QVector3D>
25#include <QtGui/QVector4D>
26#include <QtGui/QMatrix4x4>
27#include <QtGui/QMatrix3x3>
68 static constexpr quint8 DepthTextureFlag = 1u << 6;
69 static constexpr quint8 CompressedTextureFlag = 1u << 7;
115 Depth16 = DepthTextureFlag + 1,
121 RGBA_DXT1 = CompressedTextureFlag + 1,
177 return (
format & CompressedTextureFlag);
182 return !isCompressedTextureFormat();
187 return (
format & DepthTextureFlag);
190 [[nodiscard]]
const char *
toString()
const;
218 case LuminanceAlpha8:
226 case Depth24Stencil8:
278 case LuminanceAlpha8:
286 case Depth24Stencil8:
322 float l2 = 1.f + std::floor(log2f(
val));
323 float mm =
val / powf(2.f, l2);
332 float mm =
val / powf(2.f, exp - 128);
338 void decodeToFloat(
void *inPtr,
qint32 byteOfs,
float *outPtr)
const;
339 void encodeToPixel(
float *inPtr,
void *outPtr,
qint32 byteOfs)
const;
393 if (
this != &inOther) {
423 return QVector2D(absoluteCoordinates.
x() -
float(
r.x()), absoluteCoordinates.
y() -
float(
r.y()));
428 return QVector2D(
float(
r.width() / 2.0),
float(
r.height() / 2.0));
444 return { (rectRelativeCoords.
x() /
halfDims(
r).
x()) - 1.0f, (rectRelativeCoords.
y() /
halfDims(
r).
y()) - 1.0f };
456 return QVector2D(inRelativeCoords.
x() +
float(
r.x()), inRelativeCoords.
y() +
float(
r.y()));
459template<
typename TDataType>
469template<
typename TDataType>
479 return x == inOther.
x &&
y == inOther.
y &&
z == inOther.
z;
483template<
typename TDataType>
494 return x == inOther.
x &&
y == inOther.
y &&
z == inOther.
z &&
w == inOther.
w;
\inmodule QtCore\reentrant
static constexpr QSSGRenderTextureCubeFace next(QSSGRenderTextureCubeFace face)
static constexpr QSSGRenderTextureCubeFace prev(QSSGRenderTextureCubeFace face)
The QVector2D class represents a vector or vertex in 2D space.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float x() const noexcept
Returns the x coordinate of this point.
Combined button and popup list for selecting options.
static QString displayName(CGDirectDisplayID displayID)
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
GLuint GLfloat GLfloat GLfloat GLfloat GLfloat z
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei GLenum format
GLint GLenum GLboolean normalized
QSSGRenderGenericVec3< bool > bool_3
QVector2D toRectRelative(const QRectF &r, const QVector2D &absoluteCoordinates)
static constexpr QSSGRenderTextureCubeFace QSSGRenderTextureCubeFaces[]
QSSGRenderTextureCubeFace
QSSGRenderGenericVec3< qint32 > qint32_3
QSSGRenderGenericVec3< quint32 > quint32_3
QVector2D relativeToNormalizedCoordinates(const QRectF &r, QVector2D rectRelativeCoords)
QSSGRenderGenericVec4< qint32 > qint32_4
QVector2D absoluteToNormalizedCoordinates(const QRectF &r, const QVector2D &absoluteCoordinates)
QSSGRenderTextureFilterOp
QVector2D toAbsoluteCoords(const QRectF &r, const QVector2D &inRelativeCoords)
QSSGRenderTextureTypeValue
QSSGRenderGenericVec2< bool > bool_2
QVector2D halfDims(const QRectF &r)
QSSGRenderGenericVec2< qint32 > qint32_2
QVector2D toNormalizedRectRelative(const QRectF &r, QVector2D absoluteCoordinates)
QSSGRenderGenericVec4< quint32 > quint32_4
QSSGRenderGenericVec2< quint32 > quint32_2
QSSGRenderGenericVec4< bool > bool_4
char * toString(const MyType &t)
[31]
QSSGRenderGenericVec2(TDataType _x, TDataType _y)
bool operator==(const QSSGRenderGenericVec2 &inOther) const
QSSGRenderGenericVec3(TDataType _x, TDataType _y, TDataType _z)
bool operator==(const QSSGRenderGenericVec3 &inOther) const
bool operator==(const QSSGRenderGenericVec4 &inOther) const
QSSGRenderGenericVec4(TDataType _x, TDataType _y, TDataType _z, TDataType _w)
M8E8(const float val, quint8 exp)
@ SRGB8_Alpha8_ASTC_12x10
@ SRGB8_Alpha8_ASTC_12x12
@ SRGB8_Alpha8_ASTC_10x10
@ SRGB8_PunchThrough_Alpha1_ETC2
@ RGB8_PunchThrough_Alpha1_ETC2
bool isDepthTextureFormat() const noexcept
bool operator==(const QSSGRenderTextureFormat &other) const
bool operator!=(const QSSGRenderTextureFormat &other) const
constexpr bool isCompressedTextureFormat() const noexcept
constexpr QSSGRenderTextureFormat(Format f)
qint32 getNumberOfComponent() const
constexpr bool isUncompressedTextureFormat() const noexcept
qint32 getSizeofFormat() const
QSSGRenderVertexBufferEntry & operator=(const QSSGRenderVertexBufferEntry &inOther)
QSSGRenderVertexBufferEntry(const QSSGRenderVertexBufferEntry &inOther)
quint32 m_firstItemOffset
QSSGRenderVertexBufferEntry(const QByteArray &nm, QSSGRenderComponentType type, quint32 numComponents, quint32 firstItemOffset=0)
QSSGRenderComponentType m_componentType
QSSGRenderVertexBufferEntry()