Graphics: Fix some warnings
This commit is contained in:
parent
7f6b61df53
commit
74534236ef
|
|
@ -44,7 +44,7 @@ namespace Nz
|
||||||
UInt32 distanceInt;
|
UInt32 distanceInt;
|
||||||
std::memcpy(&distanceInt, &distanceNear, sizeof(UInt32));
|
std::memcpy(&distanceInt, &distanceNear, sizeof(UInt32));
|
||||||
|
|
||||||
UInt64 distance = ~distanceInt; //< Reverse distance to have back to front
|
UInt64 distance = static_cast<UInt64>(~distanceInt); //< Reverse distance to have back to front
|
||||||
|
|
||||||
// Transparent RQ index:
|
// Transparent RQ index:
|
||||||
// - Layer (8bits)
|
// - Layer (8bits)
|
||||||
|
|
|
||||||
|
|
@ -33,13 +33,15 @@ namespace Nz
|
||||||
|
|
||||||
for (std::size_t i = 0; i < maxQuadCount; ++i)
|
for (std::size_t i = 0; i < maxQuadCount; ++i)
|
||||||
{
|
{
|
||||||
*indexPtr++ = i * 4 + 0;
|
UInt16 index = static_cast<UInt16>(i);
|
||||||
*indexPtr++ = i * 4 + 1;
|
|
||||||
*indexPtr++ = i * 4 + 2;
|
|
||||||
|
|
||||||
*indexPtr++ = i * 4 + 2;
|
*indexPtr++ = index * 4 + 0;
|
||||||
*indexPtr++ = i * 4 + 1;
|
*indexPtr++ = index * 4 + 1;
|
||||||
*indexPtr++ = i * 4 + 3;
|
*indexPtr++ = index * 4 + 2;
|
||||||
|
|
||||||
|
*indexPtr++ = index * 4 + 2;
|
||||||
|
*indexPtr++ = index * 4 + 1;
|
||||||
|
*indexPtr++ = index * 4 + 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
m_indexBuffer->Fill(indices.data(), 0, indexCount * sizeof(UInt16));
|
m_indexBuffer->Fill(indices.data(), 0, indexCount * sizeof(UInt16));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue