Errors building ofxTextureRecorder example

I’m trying to build the example that comes with the ofxTextureRecorder add on a Raspberry Pi 3 but I get the following errors:
‘GL_DYNAMIC_READ’ was not declared in this scope
‘GL_QUERY_RESULT’ was not declared in this scope
‘GST_QUERY_CAST’ was not declared in this scope
‘GL_READ_ONLY’ was not declared in this scope
‘GL_TIME_ELAPSED’ was not declared in this scope
‘glBeginQuery’ was not declared in this scope
‘glEndQuery’ was not declared in this scope
‘glGenQueries’ was not declared in this scope
‘glGetQueryObjectuiv’ was not declared in this scope
‘ofBufferObject’ had no member named ‘unmap’
‘const class ofTexture’ has no member named ‘copyTo’

The example builds fine on my laptop running Ubuntu Studio 21.04.

I’ve tried to locate the macro and function definitions and on my laptop I found them in /usr/include/GL and GLES. On my Pi these files are in /opt/vc/include but they don’t contain these macros or functions.

What I need is a way to record the output of an app which is a rectangle and some strings, and ofxTextureRecorder seems like one solution. If someone has an alternative or can help with the errors above I’d be grateful.

You won’t easily get this working, because that code is using OpenGL, and the RPI uses GLES (which is based on OpenGL but not compatible).

I’ve had success with https://github.com/timscaffidi/ofxVideoRecorder in the past, but I haven’t tried it on the Pi. It’s almost completely based on FFMPEG, which the RPI does have, so it should work.

The other option is to call ofSaveScreen() (ofUtils | openFrameworks) every frame, and then compile those images into a video (you can use FFMPEG or other tools to do that.)

Tried ofxVideoRecorder too, but it won’t build on the Pi. Even the example that comes with the addon won’t build. There are a bunch of undefined reference errors concerning Poco.

Tried ofSaveScreen() with an ofThread class that I mention in this post, but I get a segmentation fault because the screen width and height have not been set. ofSaveScreen() only takes the file name as an argument, so I don’t understand why this is happening. Maybe because I’m trying to use it in a thread, I don’t know. Anyway, that should probably go in the post of the link above.