Skip to content
Snippets Groups Projects
Commit 6a37b3c0 authored by Alam Ed Arias's avatar Alam Ed Arias
Browse files

Update src/hardware/mw_model.c

Restore old code in GeneratePolygonNormals(), add TODO
parent 4bec1434
No related branches found
No related tags found
No related merge requests found
...@@ -663,6 +663,7 @@ void GeneratePolygonNormals(model_t *model, int ztag) ...@@ -663,6 +663,7 @@ void GeneratePolygonNormals(model_t *model, int ztag)
{ {
int k; int k;
mdlframe_t *frame = &mesh->frames[j]; mdlframe_t *frame = &mesh->frames[j];
const float *vertices = frame->vertices;
vector_t *polyNormals; vector_t *polyNormals;
frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0); frame->polyNormals = (vector_t*)Z_Malloc(sizeof(vector_t) * mesh->numTriangles, ztag, 0);
...@@ -671,6 +672,11 @@ void GeneratePolygonNormals(model_t *model, int ztag) ...@@ -671,6 +672,11 @@ void GeneratePolygonNormals(model_t *model, int ztag)
for (k = 0; k < mesh->numTriangles; k++) for (k = 0; k < mesh->numTriangles; k++)
{ {
/// TODO: normalize vectors
(void)vertices;
(void)polyNormals;
// Vector::Normal(vertices, polyNormals);
vertices += 3 * 3;
polyNormals++; polyNormals++;
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment