Fixes a lot of warnings and move math enums to enum classes

This commit is contained in:
Jérôme Leclercq
2021-08-19 20:27:20 +02:00
parent a2a0e6bd54
commit 8db8533300
27 changed files with 323 additions and 315 deletions

View File

@@ -108,8 +108,8 @@ namespace Nz
{
case PrimitiveType::Box:
{
unsigned int indexCount;
unsigned int vertexCount;
std::size_t indexCount;
std::size_t vertexCount;
ComputeBoxIndexVertexCount(primitive.box.subdivision, &indexCount, &vertexCount);
indexBuffer = std::make_shared<IndexBuffer>(vertexCount > std::numeric_limits<UInt16>::max(), indexCount, params.storage, params.indexBufferFlags);
@@ -130,8 +130,8 @@ namespace Nz
case PrimitiveType::Cone:
{
unsigned int indexCount;
unsigned int vertexCount;
std::size_t indexCount;
std::size_t vertexCount;
ComputeConeIndexVertexCount(primitive.cone.subdivision, &indexCount, &vertexCount);
indexBuffer = std::make_shared<IndexBuffer>(vertexCount > std::numeric_limits<UInt16>::max(), indexCount, params.storage, params.indexBufferFlags);
@@ -152,8 +152,8 @@ namespace Nz
case PrimitiveType::Plane:
{
unsigned int indexCount;
unsigned int vertexCount;
std::size_t indexCount;
std::size_t vertexCount;
ComputePlaneIndexVertexCount(primitive.plane.subdivision, &indexCount, &vertexCount);
indexBuffer = std::make_shared<IndexBuffer>(vertexCount > std::numeric_limits<UInt16>::max(), indexCount, params.storage, params.indexBufferFlags);
@@ -178,8 +178,8 @@ namespace Nz
{
case SphereType::Cubic:
{
unsigned int indexCount;
unsigned int vertexCount;
std::size_t indexCount;
std::size_t vertexCount;
ComputeCubicSphereIndexVertexCount(primitive.sphere.cubic.subdivision, &indexCount, &vertexCount);
indexBuffer = std::make_shared<IndexBuffer>(vertexCount > std::numeric_limits<UInt16>::max(), indexCount, params.storage, params.indexBufferFlags);
@@ -200,8 +200,8 @@ namespace Nz
case SphereType::Ico:
{
unsigned int indexCount;
unsigned int vertexCount;
std::size_t indexCount;
std::size_t vertexCount;
ComputeIcoSphereIndexVertexCount(primitive.sphere.ico.recursionLevel, &indexCount, &vertexCount);
indexBuffer = std::make_shared<IndexBuffer>(vertexCount > std::numeric_limits<UInt16>::max(), indexCount, params.storage, params.indexBufferFlags);
@@ -222,8 +222,8 @@ namespace Nz
case SphereType::UV:
{
unsigned int indexCount;
unsigned int vertexCount;
std::size_t indexCount;
std::size_t vertexCount;
ComputeUvSphereIndexVertexCount(primitive.sphere.uv.sliceCount, primitive.sphere.uv.stackCount, &indexCount, &vertexCount);
indexBuffer = std::make_shared<IndexBuffer>(vertexCount > std::numeric_limits<UInt16>::max(), indexCount, params.storage, params.indexBufferFlags);