Display(draw) dynamically generated bitmaps

In Rack 0.6.x there are available methods such as nvgCreateImageMem, nvgCreateImageRGBA -> nvgImagePattern -> nvgFillPaint
In Rack 1. there is also OpenGLWidget.

Is there anything else?
My use case: display webcamera or video stream from OpenCV. Not sure yet if I could use first method to do this.

nvgCreateImageRGBA is the best way if you have an RGBA8888 buffer. This creates an OpenGL texture, which is expensive the first time, so call nvgUpdateImage to update it (which still requires an upload of the memory buffer to the GPU) and nvgDeleteImage to destroy it.

GlWidget draws to a framebuffer, so it’s kind of pointless to upload RGBA data using low level OpenGL functions, since it will eventually be copied to another texture upon each drawFramebuffer call.

1 Like

Get anywhere with that?

I’d love to see something like https://warmplace.ru/soft/nosc/ in VCV.