mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-12-13 06:01:25 +00:00
bb8c66b3a0
Create a new surface for each 'usemtl' statement in the OBJ file, and fix memory errors caused by TriangulateQuad. Calculate missing normals, and fix incorrect UV coordinates Fix construction of vertex buffer for objects with multiple surfaces Localize curMtl, curSurface, aggSurfFaceCount, and curSurfFaceCount to FOBJModel::Load(), since they are not used anywhere else. Fix parsing of OBJs without UV references Internally, I replaced hashtag line comments with C-style line comments, and I replaced each forward slash with newSideSep. If no UV coordinates are available, add a default vector of (0,0). Also, remove "this->" from ResolveIndex to make the code a bit cleaner, and fix a minor garbage issue I failed to notice earlier (normref would pick up garbage if there was no normal reference). Ensure usemtl statements remain intact It may be a bit inefficient, but I tried modifying the buffer directly, and I got memory corruption errors. In this case, it's a lot better to be safe than sorry. |
||
---|---|---|
.. | ||
models | ||
a_dynlightdata.cpp | ||
colormaps.cpp | ||
colormaps.h | ||
gldefs.cpp | ||
matrix.cpp | ||
matrix.h | ||
portalgroups.cpp | ||
r_interpolate.cpp | ||
r_interpolate.h | ||
r_translate.cpp | ||
r_translate.h | ||
r_vanillatrans.cpp | ||
r_vanillatrans.h | ||
renderinfo.cpp | ||
renderstyle.cpp | ||
renderstyle.h | ||
sprites.cpp | ||
sprites.h | ||
voxels.cpp | ||
voxels.h |