Skip to content

CCDrawNode Enhancements #490

Open
Open
@slembcke

Description

@slembcke

Missing Functionality:

CCDrawNode was originally created specifically for debug rendering Chipmunk physics. It's functionality is still limited to drawing circles (filled), rounded line segments (filled), and convex polygons (filled/outlined). CCDrawingPrimitives additionally supports convenience methods for rects, curves and more fill/outline options. These should probably be added to CCDrawNode if CCDrawingPrimitives are going to be deprecated.

Performance:

CCDrawNode batches it's rendering so it's fairly efficient to draw hundreds of primitives. Because of how the shader is written, it's not very efficient with fillrate usage though. Trilinear texture filtering can do the same job at the cost of the VRAM to store a large anti-aliased circle texture and it's mipmaps. It's worth looking into I think.

Concave Polygons:

There are several relatively easy triangulation algorithms, such as ear clipping, that work fine for rendering purposes. It would be a nice addition I think if it doesn't take long to implement.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions