2.5: WIP commit for WM compositing.

* Drawing code from wm_event_system.c split into separate wm_draw.c file.

Now there's 3 different draw methods implemented, not sure what survives
or will be added but is useful for debugging.

* Draw All: redraws everything each time, for reference.
* Draw Overlap All: what the code did before this commit, only draw
  regions marked for redraw, and anything that overlaps them.
* Triple Buffer: copies/retores all area regions into a texture, and
  blits that before drawing. Menus, brushes, gestures, etc are redrawn
  always on top of that.

Currently "Draw Overlap All" is set hardcoded to be used still. Triple
Buffer code is not complete, it doesn't handle window resize yet. Cards
that don't support non power of two textures can need quite large
textures as well, this could be split into multiple smaller ones.
This commit is contained in:
2009-01-20 21:55:48 +00:00
parent 5ddc9ed1da
commit 8d4a9081cc
8 changed files with 535 additions and 235 deletions

View File

@@ -62,8 +62,8 @@ int GPU_print_error(char *str);
- if texture with non square dimensions is created, depending on the
graphics card capabilities the texture may actually be stored in a
larger texture with power of two dimensions. the actual dimensions
may be querd with GPU_texture_opengl_width/height. GPU_texture_coord_2f
calls glTexCoord2f with the coordinates adjust for this.
may be queried with GPU_texture_opengl_width/height. GPU_texture_coord_2f
calls glTexCoord2f with the coordinates adjusted for this.
- can use reference counting:
- reference counter after GPU_texture_create is 1
- GPU_texture_ref increases by one