ofDrawSphere and ofSpherePrimitive

whats is the difference between ofDrawSphere and ofSpherePrimitive if there is any?

In general, the difference between ofDraw(Shape) and of(Shape)Primitive is that the primitive is a persistent object who’s properties you can change at any given time. You’d probably declare it in the header file, give it attributes in setup and change them in update, and then draw them in draw, for example.

ofDraw(Shape) is a function that simply renders an instance of that shape. To contrast the previous example, you’d just call it in the draw function and pass in the size and position when you do.

1 Like

cool man thanks !!!