Project

General

Profile

« Previous | Next » 

Revision 13d5327e

Added by danij about 16 years ago

Extensive changes to the renderer to support multiple local players and to reduce the amount of work done per viewport (shared between multiple viewers where possible).
  • Migrated the viewgrid stuff from the old 1.8.0 branch into the trunk. We can now render multiple local players, each in a separate viewport pretty much flawlessly (there is a couple of issues to address though such as non 4:3 aspect ratios in places and possibly some binding issues).
  • Added: Ccmd "viewgrid" controls the viewgrid setup.
  • Added (Public API): R_GetViewPort, returns the position+dimensions+index of the viewport currently assigned to the specified player.
  • Generalized the lumobj>surface contact code so that surface contact lists can be built/managed for any type of object. This is now being used for mobjs to fix the long standing problem of mobjs not being visible when the sector they are in isn't visible (see bug fix below).
  • Changed how vissprites are generated for mobjs. R_AddSprites is now called for each subsector (was sector) during BSP traversal in Rend_RenderSubsector. A vissprite is projected for each mobj linked to the subsector in it's list of obj>subsector contacts (unless it has already been added).
  • Completed the redesign of surface decorations. These now integrate fully with the obj>surface contacts system and only one round of decoration projection is needed per render frame. Reworked the distance based alpha adjustment into the dynlight management which can now take advantage of the same feature. In addition, model decorations are now affected by sector lightlevel limits as set in the decoration definition.
  • Reworked logic for occluded lumobjs to be independant from LO_AddLuminous, so that we only need to add luminous mobjs once per render frame (i.e. once before rendering multiple viewports).
  • Reworked back-end handling of halos and paramaterized H_RenderHalo. Also removed dependencies between rend_halo.c and r_lumobjs.c
  • Reworked the hand off between vissprites and the various render routines (sprite/model/midwall) to potentially reduce work per viewport by calculating rend paramater structs for e.g. Rend_RenderSprite once and then storing in vissprite_t directly for now (this requires further work as currently vissprites are not yet shared between multiple viewers, per render frame).
  • Fixed Bug: If dynamic lighting was disabled when in-game, the links to lumobjs from mobj_t where not cleared and were being dereferenced in later frames in e.g. Rend_RenderSprite.
  • Fixed Bug: Mobjs not being drawn when the sector they are in isn't visible.
  • Fixed Bug: R_NewVisSprite was not initializing the returned vissprite_t.
  • Changed: Always announce missing models in R_MissingModel (was verbose only).
  • Changed: Removed fixed upper limit on the sort buffer used when there is a fixed number of allowed visible lights.
  • Changed: Revised memory management for lumobjs so that we can free it all when changing maps. The problem was that after playing a massive map with thousands of luminous objects this memory was not being released until shut down, even though we may not need it again.
  • Fixed a couple of bugs in the wall texture texture coordinate determination, surface decoration projection and the conversion from lumobj to vlight which crept in, in earlier changes.
  • Fixed bug in the "chatto" ccmd which would always result in a Con_Error() due to a missing break in the controlling switch statement (not sure how long this one has been there).
  • Fixed potential segfault in R_SurfaceListIterate if paramater sl == NULL.
  • Minor changes to a couple of the public API routines for use with the new game-side multiplayer scoreboard.
  • Removed the profiling timing for fakeradio temporarily.

Part 1 of 3.

TODO: I'm currently working on the remaining changes to the conversion of lumobjs to vlights for use with the model/sprite drawing which currently causes a FTBFS issue.
TODO: There seems to be a problem with the sprite lighter currently; although all normals and vectors (sprite quad + vlight) are setup correctly, the sprite is not always lit as expected.
TODO: LO_ToIndex currently requires a full traversal of the list of lumobjs.

Files

  • added
  • modified
  • copied
  • renamed
  • deleted

View differences