Hi List,
for all of you who don’t know it: ofxBezierWarp is a most incredible Addon helping you to warp and map videos. Thank you blainer_s and gameover for this incredible work!
In my new project I want to use a second ofxBezierWarp object. As soon as I allocate it (even when not updating/drawing), the first one is disturbed. See an example here:
This is simplified code from the example, only sizes has been adjusted and added a second object.
ofApp.h:
#pragma once
#include "ofMain.h"
#include "ofxBezierWarp.h"
class ofApp : public ofBaseApp {
public:
void setup();
void update();
void draw();
ofVideoPlayer vid;
ofxBezierWarp warp;
ofxBezierWarp warp2;
};
ofApp.cpp:
#include "ofApp.h"
//--------------------------------------------------------------
void ofApp::setup() {
vid.loadMovie("videos/Timecoded_Big_bunny_2.mov");
vid.play();
warp.allocate(800, 600, 5, 4, 80);
warp.setShowWarpGrid(true);
warp2.allocate(400,700, 5, 4, 80); // without this line, everything is fine!
ofBackground(0, 0, 0);
}
//--------------------------------------------------------------
void ofApp::update() {
vid.update();
warp.begin();
vid.draw(0, 0, ofGetWidth(), ofGetHeight());
warp.end();
}
//--------------------------------------------------------------
void ofApp::draw() {
warp.draw(40,40);
}
Seems to be some GL Problem to me, so I’m lost.
Is there a way to adapt the code to be able to use multiple warp objects?
thanks for every hint!
oe