allegroflare / allegro_flare

Application toolkit for Allegro 5
https://clubcatt.com/allegroflare
MIT License
35 stars 6 forks source link

TileMesh does not support "empty" tiles #265

Closed MarkOates closed 6 months ago

MarkOates commented 7 months ago

Components in Use

A somewhat disjointed problem among several components. The roles of each are not yet sorted out.

Irregularities

Desired features

Fastest possible would be a single mesh, holding all sprites and tiles, a single shader with different blending modes, additional shader data included in the vertex with correlated data in another bitmap like a normal map. Something like that.

MarkOates commented 6 months ago

This issue describes several different issues with the PrimMesh specifically. Since writing this issue, a new object TileMaps/TileMesh is created that permits empty tiles. It accomplishes this having an internal ALLEGRO_INDEX_BUFFER (along with a ALLEGRO_VERTEX_BUFFER). The tiles are "removed" by having the vertices removed from the index buffer via vertex_indices_for_tile_xy(x, y). They remain present in the vertex buffer.

This core issue is completed, however, the additional issues need to be broken down into separate issues.