hello,
I want to have a video playback on top of the background… however, the video is always below the background… any idea?
void SceneInstruction::setup() {
ofBackground(0,0,0);
ofEnableSmoothing();
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE);
bg.loadImage("ui/instruction_bg.jpg");
player.loadMovie("ui/Man_handshake.mp4");
player.setLoopState(OF_LOOP_NORMAL);
player.play();
unsigned delay = 500;
unsigned duration = 1000;
}
void SceneInstruction::update() {
player.update();
}
void SceneInstruction::draw() {
bg.draw(0,0);
if (player.isFrameNew()){
player.draw(360, 260, 585, 330);
}
}