Switch to using floats instead of shorts for normal data - they're supposed to be faster.

Also use shorts instead of ints for the index data, since index arrays are limited anyhow.
This commit is contained in:
Kester Maddock
2004-06-30 13:41:19 +00:00
parent 09d3007b71
commit c9b4585618
8 changed files with 50 additions and 121 deletions

View File

@@ -254,16 +254,10 @@ int RAS_MeshObject::FindOrAddVertex(int vtxarray,
RAS_IPolyMaterial* mat,
int orgindex)
{
short newnormal[3];
newnormal[0]=(short)((normal[0])*32767.0);
newnormal[1]=(short)((normal[1])*32767.0);
newnormal[2]=(short)((normal[2])*32767.0);
KX_ArrayOptimizer* ao = GetArrayOptimizer(mat);//*(m_matVertexArrays[*mat]);
int numverts = ao->m_VertexArrayCache1[vtxarray]->size();//m_VertexArrayCount[vtxarray];
RAS_TexVert newvert(xyz,uv,rgbacolor,newnormal, 0);
RAS_TexVert newvert(xyz,uv,rgbacolor,normal, 0);
#define KX_FIND_SHARED_VERTICES
#ifdef KX_FIND_SHARED_VERTICES