KKMMMTTT / AstroSoar

0 stars 0 forks source link

BatchTextureContext #8

Closed MatthewChrobak closed 4 years ago

MatthewChrobak commented 4 years ago

Requirements

Create a renderable context in the Annex implementation that (in a single Draw call) supports rendering a single texture in several locations in arbitrary sizes.

Pseudocode

var positions = new (int, int)[] {
    (0, 0), (32, 32), (64, 64), ... , (256, 256)
};
var sizes = new (int, int)[] {
    (32, 32)
};
var ctx = new BatchTextureContext("tile.png", positions, sizes);
canvas.Draw(ctx);