qzdoom/src/r_data
Kevin Caccamo bb8c66b3a0 Fix rendering and parsing of OBJ models
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.
2018-09-01 07:28:26 +02:00
..
models Fix rendering and parsing of OBJ models 2018-09-01 07:28:26 +02:00
a_dynlightdata.cpp Cleaned up #include's in dynamic lights code 2018-04-19 11:12:29 +03:00
colormaps.cpp Removed all superfluous #include's 2018-04-24 14:30:35 +03:00
colormaps.h - refactoring of fixed colormap stuff to have it better organized and to reduce the number of uniforms in the main shader. 2018-06-16 22:40:44 +02:00
gldefs.cpp - fix user defines and textures not working 2018-07-15 23:34:58 +02:00
matrix.cpp Removed all superfluous #include's 2018-04-24 14:30:35 +03:00
matrix.h - moved the matrix code out of 'gl' because the model code also needs it. 2017-11-25 13:51:09 +01:00
portalgroups.cpp - moved all portal code that sets up a scene to be rendered into API independent code and let it be handled by a common wrapper class. 2018-06-23 23:03:34 +02:00
r_interpolate.cpp Removed all superfluous #include's 2018-04-24 14:30:35 +03:00
r_interpolate.h - changed TObjPtr to take a pointer as its template argument and not the class it points to. 2017-03-08 13:35:21 +01:00
r_translate.cpp Removed all superfluous #include's 2018-04-24 14:30:35 +03:00
r_translate.h - integrated GL parts of translation handling into the main module. 2018-04-01 00:59:49 +02:00
r_vanillatrans.cpp - use 0 as the default for r_vanillatrans. 2017-06-04 12:39:39 +02:00
r_vanillatrans.h - r_vanillatrans: Cache the cache! Transform the function into a global variable and recheck at the start of D_Display 2017-06-04 12:30:35 +02:00
renderinfo.cpp - gl_system.h as well, in particular this has no place in hw_* files. 2018-05-16 23:34:52 +02:00
renderstyle.cpp Corrected render style definition 2018-04-27 09:34:02 +02:00
renderstyle.h Corrected render style definition 2018-04-27 09:34:02 +02:00
sprites.cpp - move modeldef parsing to its own function (ParseModelDefLump) 2018-05-22 01:28:57 +02:00
sprites.h - Added +SPRITEFLIP which reverses a sprite's left-rightness. 2017-05-03 21:13:31 +02:00
voxels.cpp Removed all superfluous #include's 2018-04-24 14:30:35 +03:00
voxels.h - changed voxel remapping to make a copy instead of destroying the original. 2018-04-03 00:30:02 +02:00