Skip to content

Commit b8911e1

Browse files
committed
Fixes in 3D object loading
1 parent 91be7ad commit b8911e1

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

CHANGELOG

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*******************************************************************************
44

55
=== 1.0.32 ===
6-
6+
* Fixes in 3D object loading.
77

88
=== 1.0.31 ===
99
* Updated and extended interface of dspu::RingBuffer.

src/main/3d/Object3D.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,16 @@ namespace lsp
107107
if ((vn1 < 0) || (vn2 < 0) || (vn3 < 0))
108108
{
109109
// Add normal
110-
xvn = pScene->vXNormals.alloc();
110+
const ssize_t id = pScene->vNormals.size() + pScene->vXNormals.size();
111+
xvn = pScene->vXNormals.alloc();
111112
if (xvn == NULL)
112113
return -STATUS_NO_MEM;
113114

114115
// Get points
115116
dsp::calc_normal3d_p3(xvn, t->v[0], t->v[1], t->v[2]);
117+
xvn->id = id;
118+
xvn->ptag = NULL;
119+
xvn->itag = 0;
116120
}
117121

118122
t->n[0] = (vn1 >= 0) ? pScene->normal(vn1) : xvn;

0 commit comments

Comments
 (0)