Andrew
Andrew

Reputation: 24846

2d game engine clipping algorithms

I'm building a 2d game engine using c++ and opengl. Now i have implemented a scene graph and now every node of this graph is being rendered every frame. What are good algorithms for clipping nodes that are outside the viewport?

Upvotes: 0

Views: 441

Answers (1)

Necrolis
Necrolis

Reputation: 26171

at a most simple level, you could use quadtrees for culling, it has the added bonus of being useful for collision detection as well, Wikipedia has a page explaining it.

Upvotes: 1

Related Questions