HTML and CSS Reference
In-Depth Information
Figure 17-3. Your map with a 64 × 64 tile boundary grid overlaid on it
The obvious solution here is to reduce the number of draws per frame. One of the main ways of fixing this
problem involves taking the raw map-rendering data and using the concept of offscreen canvas rendering to reduce
the number of draw calls.
This process works by dividing the entire map into 1,024 × 1,024 sections and prerendering each section into a
larger texture (see Figure 17-4 ). At render time, you can draw the pregenerated textures instead of each individual tile.
Thus, rather than incurring the overhead of thousands of draw calls per tile, you simply have to do eight or so draws
per frame for all the static map data.
 
Search WWH ::




Custom Search