I am writing an application in which at the moment you need to integrate the particle system. I have a suitable thing - Magic Particles from Astralax. I have ported the functionality of this library to myself but the drawing of the final result does not work for me. I do not understand what the problem is. Either the context does not work for me correctly, or I missed some step. You can see and run the project yourself. m_paintDevice-> update () method; just causes glDrawElements and it works, but the result is not visible. What could be the problem?
The code on github .
mainwidget.cpp
void MainWidget::initializeGL() { makeCurrent(); initializeOpenGLFunctions(); glClearColor(0, 0, 0, 1); m_paintDevice = new PaintDevice(this->width(), this->height()); timer.start(12, this); } void MainWidget::timerEvent(QTimerEvent *e) { m_paintDevice->update(); update(); } void MainWidget::paintGL() { glClearColor(0.0f, 0.0f, 0.0f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); m_paintDevice->paint(); QCoreApplication::postEvent(this, new QEvent(QEvent::UpdateRequest)); } mp_wrap.cpp
void MP_Device_WRAP::DrawVertices(int starting_index, int indexes_count, int max_vertices) { MP_BUFFER_RAM *index_buffer_ram = (MP_BUFFER_RAM *)index_buffer; #ifdef INDEX_BUFFER_32_WRAP glDrawElements(GL_TRIANGLES, indexes_count, GL_UNSIGNED_INT, &(index_buffer_ram->buffer[starting_index * 4])); #else glDrawElements(GL_TRIANGLES, indexes_count, GL_UNSIGNED_SHORT, &(index_buffer_ram->buffer[starting_index * 2])); #endif } 

