Module twilight: Change committed

warp at icculus.org warp at icculus.org
Tue Dec 16 07:32:16 EST 2003


Commiter   : warp
CVSROOT    : /cvs/cvsroot/twilight
Module     : twilight
Commit time: 2003-12-16 12:32:16 UTC

Log message:

The great VBO and vertex array management rewrite.

mod_brush.h:
  Add vbo_t, a struct with VBO information.
  Replace vbo_objects[3] with vbo[3] (of type vbo_t) in the brush header struct.

src/renderer/alias.c:
  Just update to the new TWI_ChangeVDrawArraysALL interface.

src/renderer/brush.c:
  Update to the new TWI_ChangeVDrawArraysALL interface, reduces a lot of code.
  Change a () prototype to (void).

src/renderer/gl_arrays.c:
  Three new cvars, gl_vbo_v, gl_vbo_tc, and gl_vbo_c, controls VBO (if available) for the vertex, texcoord, and color arrays, respectively.

src/renderer/gl_arrays.h:
  Nuke TWI_ChangeVDrawArrays_p, TWI_ChangeVDrawArrays_m, TWI_ChangeVDrawArrays, and TWI_ChangeVDrawArraysVBO.
  Add TWI_ChangeVDrawArraysALL, handles all array state changes, including the decision on if to use VBO or not.
  TWI_PreVDrawCVA: Only lock if we are not already locked.
  TWI_PostVDrawCVA: Set va_locked to false on unlock, doh.

src/renderer/liquid.c:
  Update to new TWI_ChangeVDrawArraysALL interface.
  Fold EmitWaterPolys into R_Draw_Liquid_Chain.
  Move the translation for scrolling out of the loops.
  For the !arranged case now simply map the entire brush model into the buffers outside the loop, instead of changing the arrays every polygon inside the loop. (Slight slowdown for the non-VBO case, speedup for VBO.)

src/renderer/mod_brush.c:
  Now fill in the new brush vbo fields.

  Change all of a brush's arrays to live in one VBO.

src/renderer/sky.c:
  Update to new TWI_ChangeVDrawArraysALL interface.
  For the !arranged case now simply map the entire brush model into the buffers outside the loop, instead of changing the arrays every polygon inside the loop. (Slight slowdown for the non-VBO case, speedup for VBO.)

Modified files:
     src/base/mod_brush.h src/renderer/alias.c src/renderer/brush.c
     src/renderer/gl_arrays.c src/renderer/gl_arrays.h
     src/renderer/liquid.c src/renderer/mod_brush.c src/renderer/sky.c
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: twilight.20031216.123216.warp.diff
URL: <http://icculus.org/pipermail/twilight-commits/attachments/20031216/063866d8/attachment.diff>


More information about the twilight-commits mailing list