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

Method draw

samples/_opengl/ParticleSphereCS/src/ParticleSphereCSApp.cpp:180–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180void ParticleSphereCSApp::draw()
181{
182 gl::clear( Color( 0, 0, 0 ) );
183 gl::setMatricesWindowPersp( getWindowSize() );
184 gl::enableDepthRead();
185 gl::enableDepthWrite();
186
187 gl::ScopedGlslProg render( mRenderProg );
188 gl::ScopedBuffer scopedParticleSsbo( mParticleBuffer );
189 gl::ScopedVao vao( mAttributes );
190
191 gl::context()->setDefaultShaderVars();
192
193 gl::drawArrays( GL_POINTS, 0, NUM_PARTICLES );
194
195 gl::setMatricesWindow( app::getWindowSize() );
196 gl::drawString( toString( static_cast<int>( getAverageFps() ) ) + " fps", vec2( 32.0f, 52.0f ) );
197}
198
199CINDER_APP( ParticleSphereCSApp, RendererGl, []( App::Settings *settings ) {
200 settings->setWindowSize( 1280, 720 );

Callers

nothing calls this directly

Calls 13

setMatricesWindowPerspFunction · 0.85
enableDepthReadFunction · 0.85
enableDepthWriteFunction · 0.85
drawArraysFunction · 0.85
setMatricesWindowFunction · 0.85
drawStringFunction · 0.85
getAverageFpsFunction · 0.85
setDefaultShaderVarsMethod · 0.80
clearFunction · 0.50
ColorFunction · 0.50
getWindowSizeFunction · 0.50
contextFunction · 0.50

Tested by

no test coverage detected