Xmodal / autonomX

Experiment with life-like processes to generate dynamic, emergent and self-organizing patterns and output these patterns via OSC.
10 stars 4 forks source link

Rewrite history graph rendering using OpenGL #118

Open simondemeule opened 4 years ago

simondemeule commented 4 years ago

The current implementation of the history graph relies on Canvas to draw the history plot. While this solution works fine with one or two generators, it becomes very resource hungry and laggy when a few more generators are added.

To remedy this, the drawing method for the history graph should be rewritten using a shader. This would involve making the history circular buffer into a 2D vertex array, and rendering it using Qt 3D OpenGL in C++ through QQuickFrameBufferObject (see #75 for details).

This was initially discussed in #107.

netherwaves commented 4 years ago

some examples for reference: https://doc.qt.io/qt-5/qtquick3d-customshaders-example.html (useful for setting up a basic 3D render farm in Qt Quick 3D) https://doc.qt.io/qt-5/qt3d-wave-example.html (looks too complicated for what we want to do; besides, the example project doesn't compile)

also just found this EXTREMELY relevant doc entry, which basically lets you create custom, QML-exposable geometry for use with Qt Quick 3D: https://doc.qt.io/qt-5/qquick3dgeometry.html

simondemeule commented 4 years ago

simple example with OpenGL: https://github.com/interferences-at/proto-opengl/blob/master/OpenGLWindow.cpp