codenamecpp / carnage3d

Reimplementation of Grand Theft Auto 1 [GTA1]
MIT License
470 stars 38 forks source link

[Render] Optimize draw sprites #41

Closed codenamecpp closed 3 years ago

codenamecpp commented 3 years ago

Draw only those sprites that are currently on screen.

codenamecpp commented 3 years ago

The right way to do it - use spatial structure for scene (aabb tree for example).

But also there is a fast and dirty one - draw only objects which are located at certain distance from camera position.