I found culling only under spatial hashing for collisions. I'm referring to the kind of backface culling performed by 3D graphics libraries, where anything that need not be visible isn't rendered.
Does Chipmunk2D/Pymunk have any provision for not drawing objects that are not within screen bounds or does that user have to implement it themselves?
For example:
The red rectangle is the screen boundary. All blue objects should get drawn because they are within the screen. Green objects shouldn't be drawn.
I was hoping debug_draw()
would have a culling functionality.
ps: btw, if I don't use debug_draw()
for drawing, what is the other way of drawing? I don't see a draw()
or release_draw()
function. So would the user have to write code to individually iterate all objects and draw them? I guess that'd work fine because then the user can do a rectangle intersection test and decide which objects to cull. Perhaps debug_draw
could be renamed to drawAll()
.