MCPcopy Create free account
hub / github.com/antmachineintelligence/mtgbmcode / updateParticles

Method updateParticles

compute/example/nbody.cpp:192–200  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190 glFinish();
191}
192void NBodyWidget::updateParticles()
193{
194 // enqueue kernels to update particles and make sure that the command queue is finished
195 compute::opengl_enqueue_acquire_buffer(m_position, m_queue);
196 m_queue.enqueue_1d_range_kernel(m_velocity_kernel, 0, m_particles, 0).wait();
197 m_queue.enqueue_1d_range_kernel(m_position_kernel, 0, m_particles, 0).wait();
198 m_queue.finish();
199 compute::opengl_enqueue_release_buffer(m_position, m_queue);
200}
201void NBodyWidget::keyPressEvent(QKeyEvent* event)
202{
203 if(event->key() == Qt::Key_Escape) {

Callers

nothing calls this directly

Calls 5

waitMethod · 0.45
finishMethod · 0.45

Tested by

no test coverage detected