TINYGL: Cache and clip dirty rect on all DrawCall subclasses.

getDirtyRegion will be called twice on each DrawCall instance, so make
repeated work as short as possible.
This commit is contained in:
Vincent Pelletier 2016-07-23 17:40:41 +02:00
parent 6a63f544f0
commit bf319b5437
5 changed files with 27 additions and 21 deletions

View file

@ -72,6 +72,7 @@ void glInit(void *zbuffer1, int textureSize) {
c->fb->_textureSize = c->_textureSize = textureSize;
c->fb->_textureSizeMask = (textureSize - 1) << ZB_POINT_ST_FRAC_BITS;
c->renderRect = Common::Rect(0, 0, zbuffer->xsize, zbuffer->ysize);
// allocate GLVertex array
c->vertex_max = POLYGON_MAX_VERTEX;