drawSolidCicle()
| Namespace | Include |
|---|---|
gl::drawSolidCircle() |
#include "cinder/gl.h" |
Draws a filled circle centered around center with a radius of radius . Default numSegments requests a conservative (high-quality, but slow) number based on radius.
Using a GL convenience method should always be considered the slow path . They're fine for initial development or code that is not performance-sensitive, but
gl::Batchshould be preferred where speed counts.
Signature
| Output | Function |
|---|---|
| void | drawSolidCircle (const vec2 ¢er, float radius, int numSegments=-1) |
Example

#include "cinder/app/App.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
using namespace ci;
using namespace ci::app;
class MyApp : public App {
public:
void draw() override;
};
void MyApp::draw()
{
gl::clear(Color::gray(0.1f));
gl::bindStockShader(gl::ShaderDef().color());
gl::drawSolidCircle(getWindowCenter(), 20.0f);
}
CINDER_APP(MyApp, RendererGl)