Project

General

Profile

« Previous | Next » 

Revision 680c4d86

Added by danij about 16 years ago

Began refactoring the interface to the rend lists (i.e. RL_AddPoly) with the following goals:
  • Currently only our domain-specific primitives quad/divquad/flat can be added to the rend lists. Instead we should break them down to standard primitives on the other side of this interface.
  • Remove rendpoly_t. Although convenient, this structure and its continual, rapid allocation/deallocation on the stack is one of the main bottlenecks in our current renderer.
  • Provide an interface which allows external reservation of gl_vertex_t, gl_texcoord_t and gl_color_t elements from the global arrays. This is related to rendpoly_t bottleneck.
  • Reduce memory requirements brought about by unnecessary allocation of gl_texcoord_t structures for smooth texture animation when not actually used.
Work done thus far:
  • Standardized on the gl primitive types that can be added via the RL_AddPoly interface to the render lists. Domain-specific primitives are now decomposed/tesselated on the other side of this interface in rend_main.c:renderWorldPoly. This includes the division of wall segs (divquads).
  • Dynamic light polys are now handled similarly, being decomposed into standard primitives which are then sent via RL_AddPoly to the rend lists.
  • Handling of multitextured lights, detail textures and smooth texture/flat animation updated accordingly.
  • Texture coordinates are now supplied to RL_AddPoly rather than being derived based on the rendpoly_t paramaters and the primitive type.
  • Redesigned how detail textures are drawn. Now uses the texture matrix for position/scale/rotation and so the primary texture coordinates can be re-used. Thus memory requirements for a list primitive reduced by 1/6th.
  • Surface reflection paramaters are now determined in R_MaterialPrepare and returned to the caller (currently only renderWorldPoly).
  • Began generalizing how multitexturing is handled internally within rend_list.c
  • Fixed broken surface reflection texture coordinate generation with planes.
  • Fixed problem with detail texture selection which failed to differentiate between detailtex_t instances when only their defined scale differs (todo, clearly this needs to be revised further as scale should not be a property of the instance).
  • Fixed long standing issue within the memory management of the rend lists and dynamic lights due to reallocation of list data leaving a dangling ptr in the dynamic light poly, list header.
Todo:
  • Reflection and fakeradio texcoord generation is currently broken with wall segs that have edge divisions.
  • Fix issue with the paramaters used for the texture matrix manipulations with detail textures on wall segs. Currently they scroll vertically if the floor/ceiling plane on the seg side moves.
  • Remaining work to achieve the stated goals (doh!).

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences