Added Quaternion component type

Not compatible with Vertex Declaration though


Former-commit-id: 3174553981ab23fe59ed616c2ce1a27bf7db0108
This commit is contained in:
Lynix 2014-07-13 09:29:12 +02:00
parent 7d5876d505
commit 7a6195991c
3 changed files with 13 additions and 3 deletions

View File

@ -65,8 +65,9 @@ enum nzComponentType
nzComponentType_Int2,
nzComponentType_Int3,
nzComponentType_Int4,
nzComponentType_Quaternion,
nzComponentType_Max = nzComponentType_Int4
nzComponentType_Max = nzComponentType_Quaternion
};
enum nzCubemapFace

View File

@ -1931,10 +1931,11 @@ GLenum NzOpenGL::ComponentType[] =
GL_INT, // nzComponentType_Int1
GL_INT, // nzComponentType_Int2
GL_INT, // nzComponentType_Int3
GL_INT // nzComponentType_Int4
GL_INT, // nzComponentType_Int4
GL_FLOAT // nzComponentType_Quaternion
};
static_assert(nzComponentType_Max+1 == 13, "Attribute type array is incomplete");
static_assert(nzComponentType_Max+1 == 14, "Attribute type array is incomplete");
GLenum NzOpenGL::CubemapFace[] =
{

View File

@ -919,6 +919,9 @@ bool NzRenderer::IsComponentTypeSupported(nzComponentType type)
case nzComponentType_Int3:
case nzComponentType_Int4:
return glVertexAttribIPointer != nullptr; // Fonction requise pour envoyer des entiers
case nzComponentType_Quaternion:
return false;
}
NazaraError("Attribute type out of enum (0x" + NzString::Number(type, 16) + ')');
@ -1851,6 +1854,11 @@ bool NzRenderer::EnsureStateUpdate()
break;
}
default:
{
NazaraInternalError("Unsupported component type");
break;
}
}
// Les attributs d'instancing ont un diviseur spécifique (pour dépendre de l'instance en cours)
if (i == 1)