The previous patch used the extension in GLContext::TexImage2D, but not
TexSubImage2D. This patch corrects that and makes sure to use the extension
in both cases.
A GLES 2.0 extension exists that allows us to use GL_UNPACK_ROW_LENGTH, amongst
other variables. This really helps us when uploading sub-regions of a buffer
that don't span the entire width of that buffer (for example, when scrolling
horizontally).
This extension is available on Android tablets, and possibly other Tegra 2
devices, so is very much worth taking advantage of.
Details:
http://www.khronos.org/registry/gles/extensions/EXT/GL_EXT_unpack_subimage.txt
TiledTextureImage breaks BeginUpdate/EndUpdate in these cases:
- The update is encompassed by more than one tile
- The update is encompassed by a single tile that isn't the first tile
- The update is a non-rectangular region that covers more than one tile
Fixed by using signed instead of unsigned integers in tile loops, correcting
an incorrect device offset and correcting the region returned by BeginUpdate.
Drawing of rotated buffers relies on texture-wrapping, but in the case of
tiled textures, this would cause each individual tile to wrap instead of
wrapping the compound texture.
Add a special case for tiled textures that manually does the wrapping.
A GLES 2.0 extension exists that allows us to use GL_UNPACK_ROW_LENGTH, amongst
other variables. This really helps us when uploading sub-regions of a buffer
that don't span the entire width of that buffer (for example, when scrolling
horizontally).
This extension is available on Android tablets, and possibly other Tegra 2
devices, so is very much worth taking advantage of.
Details:
http://www.khronos.org/registry/gles/extensions/EXT/GL_EXT_unpack_subimage.txt
Drawing of rotated buffers relies on texture-wrapping, but in the case of
tiled textures, this would cause each individual tile to wrap instead of
wrapping the compound texture.
Add a special case for tiled textures that manually does the wrapping.
TiledTextureImage breaks BeginUpdate/EndUpdate in these cases:
- The update is encompassed by more than one tile
- The update is encompassed by a single tile that isn't the first tile
- The update is a non-rectangular region that covers more than one tile
Fixed by using signed instead of unsigned integers in tile loops, correcting
an incorrect device offset and correcting the region returned by BeginUpdate.