MCPcopy Create free account
hub / github.com/cinder/Cinder / draw

Method draw

test/ShapeTest/src/ShapeTestApp.cpp:160–193  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

158}
159
160void ShapeTestApp::draw()
161{
162 gl::clear();
163
164 gl::pushModelMatrix();
165 gl::setModelMatrix( mModelMatrix );
166
167 // Draw SDF texture if available.
168 if( mTexture ) {
169 gl::pushModelMatrix();
170 gl::translate( mBounds.getUpperLeft() );
171
172 gl::color( 1, 1, 1 );
173 gl::draw( mTexture );
174
175 gl::popModelMatrix();
176 }
177
178 drawDebugShape( mShape, 3.0f );
179
180 // Draw shape outlines.
181 gl::color( mIsInside ? Color( 0.4f, 0.8f, 0.0f ) : Color( 0.8f, 0.4f, 0.0f ) );
182 gl::draw( mShape );
183
184 gl::popModelMatrix();
185
186 // Draw closest point on shape.
187 gl::color( 0, 0.5f, 0.5f );
188 gl::drawSolidCircle( mClosest, 5 );
189
190 // Draw distance as a circle.
191 gl::color( 0.5f, 0.5f, 0 );
192 gl::drawStrokedCircle( mMouse, mDistance );
193}
194
195void ShapeTestApp::mouseMove( MouseEvent event )
196{

Callers

nothing calls this directly

Calls 10

pushModelMatrixFunction · 0.85
setModelMatrixFunction · 0.85
popModelMatrixFunction · 0.85
drawSolidCircleFunction · 0.85
drawStrokedCircleFunction · 0.85
clearFunction · 0.50
translateFunction · 0.50
colorFunction · 0.50
drawFunction · 0.50
ColorFunction · 0.50

Tested by

no test coverage detected