codenamecpp / carnage3d

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

[Render] Optimize draw sprites #41

Closed codenamecpp closed 4 years ago

codenamecpp commented 4 years ago

Draw only those sprites that are currently on screen.

codenamecpp commented 4 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.