Jona
1
Jona
2
Here is a second example, that shows how to record a certain webgl texture:
https://recorder2.handmadeproductions.de
This starts the recording of the texture:
//--------------------------------------------------------------
void ofApp::toggle_1_event(bool & e) {
if (rgbaFbo.getTexture().isAllocated()) {
EM_ASM(recordVideo($0), e);
}
}
//--------------------------------------------------------------
void ofApp::toggle_2_event(bool & e) {
if (rgbaFbo.getTexture().isAllocated()) {
if (e) {
isDrawingTexture = true;
} else {
isDrawingTexture = false;
}
EM_ASM(recordVideo($0, $1), e, rgbaFbo.getTexture().getTextureData().textureID);
}
}
And this draws the texture to the (second) canvas:
if (isDrawingTexture) {
EM_ASM(drawTexture($0, $1), rgbaFbo.getWidth(), rgbaFbo.getHeight());
}
This is the recording “class”: openFrameworks/recordVideo.js at Emscripten_recordVideo · Jonathhhan/openFrameworks · GitHub