Skip to content

Commit eaf3983

Browse files
committed
ode: fix trimeshes in double-precision ODE builds
Fixes panda3d#174
1 parent a1b5c6f commit eaf3983

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

panda/src/ode/odeTriMeshData.cxx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ OdeTriMeshData(const NodePath& model, bool use_normals) :
103103

104104
write_faces(odetrimeshdata_cat.debug());
105105

106+
#ifdef dSINGLE
106107
if (!use_normals) {
107108
build_single(_vertices, sizeof(StridedVertex), _num_vertices,
108109
_faces, _num_faces * 3, sizeof(StridedTri));
@@ -111,6 +112,16 @@ OdeTriMeshData(const NodePath& model, bool use_normals) :
111112
_faces, _num_faces * 3, sizeof(StridedTri),
112113
_normals);
113114
}
115+
#else
116+
if (!use_normals) {
117+
build_double(_vertices, sizeof(StridedVertex), _num_vertices,
118+
_faces, _num_faces * 3, sizeof(StridedTri));
119+
} else {
120+
build_double1(_vertices, sizeof(StridedVertex), _num_vertices,
121+
_faces, _num_faces * 3, sizeof(StridedTri),
122+
_normals);
123+
}
124+
#endif
114125

115126
preprocess();
116127
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy