57 return ((desc >> 44) & a_flag) != 0;
61 desc |= (
static_cast<uint64_t
>(a_flag) << 44);
65 desc &= ~(
static_cast<uint64_t
>(a_flag) << 44);
70 return (desc >> (4 *
static_cast<uint8_t
>(a_attribute) + 2)) & 0x3C;
75 const uint64_t lhs =
static_cast<uint64_t
>(a_offset) << (4 *
static_cast<uint8_t
>(a_attribute) + 2);
76 const uint64_t rhs = desc & ~static_cast<uint64_t>(15 << (4 *
static_cast<uint8_t
>(a_attribute) + 4));
97 std::uint32_t vertexSize = 0;
101 vertexSize +=
sizeof(float) * 4;
104 vertexSize +=
sizeof(std::uint16_t) * 2;
107 vertexSize +=
sizeof(std::uint16_t) * 2;
110 vertexSize +=
sizeof(std::uint16_t) * 2;
112 vertexSize +=
sizeof(std::uint16_t) * 2;
116 vertexSize +=
sizeof(std::uint8_t) * 4;
119 vertexSize +=
sizeof(std::uint16_t) * 4 +
sizeof(std::uint8_t) * 4;
122 vertexSize +=
sizeof(float);
132 static_assert(
sizeof(VertexDesc) == 0x8);
Definition VertexDesc.h:53
void SetAttributeOffset(Vertex::Attribute a_attribute, std::uint32_t a_offset)
Definition VertexDesc.h:72
void SetFlags(Vertex::Flags a_flags)
Definition VertexDesc.h:90
void ClearAttributeOffsets()
Definition VertexDesc.h:81
void ClearFlag(Vertex::Flags a_flag)
Definition VertexDesc.h:63
std::uint32_t GetAttributeOffset(Vertex::Attribute a_attribute) const
Definition VertexDesc.h:68
void SetFlag(Vertex::Flags a_flag)
Definition VertexDesc.h:59
bool HasFlag(Vertex::Flags a_flag) const
Definition VertexDesc.h:55
Vertex::Flags GetFlags() const
Definition VertexDesc.h:86
std::uint32_t GetSize()
Definition VertexDesc.h:95
Definition AbsorbEffect.h:6
Definition VertexDesc.h:10
Attribute
Definition VertexDesc.h:12
@ VA_SKINNING
Definition VertexDesc.h:19
@ VA_POSITION
Definition VertexDesc.h:13
@ VA_COUNT
Definition VertexDesc.h:23
@ VA_NORMAL
Definition VertexDesc.h:16
@ VA_BINORMAL
Definition VertexDesc.h:17
@ VA_LANDDATA
Definition VertexDesc.h:20
@ VA_EYEDATA
Definition VertexDesc.h:21
@ VA_TEXCOORD0
Definition VertexDesc.h:14
@ VA_COLOR
Definition VertexDesc.h:18
@ VA_TEXCOORD1
Definition VertexDesc.h:15
Masks
Definition VertexDesc.h:41
@ DESC_MASK_VERT
Definition VertexDesc.h:42
@ DESC_MASK_UVS
Definition VertexDesc.h:43
@ DESC_MASK_SKCOL
Definition VertexDesc.h:45
@ DESC_MASK_DATA
Definition VertexDesc.h:46
@ DESC_MASK_FLAGS
Definition VertexDesc.h:48
@ DESC_MASK_OFFSET
Definition VertexDesc.h:47
@ DESC_MASK_NBT
Definition VertexDesc.h:44
Flags
Definition VertexDesc.h:27
@ VF_EYEDATA
Definition VertexDesc.h:36
@ VF_UV_2
Definition VertexDesc.h:30
@ VF_FULLPREC
Definition VertexDesc.h:37
@ VF_TANGENT
Definition VertexDesc.h:32
@ VF_VERTEX
Definition VertexDesc.h:28
@ VF_UV
Definition VertexDesc.h:29
@ VF_SKINNED
Definition VertexDesc.h:34
@ VF_LANDDATA
Definition VertexDesc.h:35
@ VF_COLORS
Definition VertexDesc.h:33
@ VF_NORMAL
Definition VertexDesc.h:31