Dynamic RGBA texture on a quad

I’ve made two open source libraries that render video (via LibVLC) and web content (via CEF) to memory and I’d like to use LibCinder to write OpenGL based test/example apps for them.

To start with, I want to display a 3D quad whose texture is taken from a memory that changes every frame and let users rotate it by dragging the mouse.

I looked at the samples folder but didn’t see anything that I might use as a starting point - did I miss something like this or does anyone have something similar I can look at?

Many thanks.


The SurfaceBasic sample shows how to take a CPU side image and push it to the GPU and draw it, and pretty much every sample in Samples/_opengl will have a camera in it, but you could look at the CameraPersp sample to see how to hook up a CameraPersp and a CameraUi to get a user controlled camera.

Thank you - While I was waiting for my first post to be reviewed, I went ahead and put something together - source is here: https://github.com/callumprentice/Cinder-DynTexture/blob/master/src/DynTextureApp.cpp

I’ll take a look at the examples you suggested and see what mistakes I made :slight_smile:

Next I need to get pick x/y from the surface and get raw macOS keyboard events then I’m ready to start making some tests for my libraries.

I got picking working - bit of a special case for the simple rectangle but I think it’ll work for my tests.