Skip to content

Instantly share code, notes, and snippets.

@ryanbartley
Created March 20, 2015 14:55
Show Gist options
  • Save ryanbartley/347b7fed1996ec5bcc24 to your computer and use it in GitHub Desktop.
Save ryanbartley/347b7fed1996ec5bcc24 to your computer and use it in GitHub Desktop.
#include "cinder/app/AppNative.h"
#include "cinder/app/RendererGl.h"
#include "cinder/gl/gl.h"
#include "cinder/qtime/QuickTimeGl.h"
#include "cinder/gl/Texture.h"
using namespace ci;
using namespace ci::app;
using namespace std;
class CinderProjectApp : public AppNative {
public:
void setup() override;
void mouseDown( MouseEvent event ) override;
void update() override;
void draw() override;
qtime::MovieGlRef mMovie;
gl::Texture2dRef mTexture;
};
void CinderProjectApp::setup()
{
mMovie = qtime::MovieGl::create( getAssetPath( "Speaker Test_smpte_L_R_C_LFE_Ls_Rs to LCRLsRsLFE.mov" ) );
mMovie->play();
}
void CinderProjectApp::mouseDown( MouseEvent event )
{
}
void CinderProjectApp::update()
{
if( mMovie->checkNewFrame() )
mTexture = mMovie->getTexture();
}
void CinderProjectApp::draw()
{
gl::clear( Color( 0, 0, 0 ) );
gl::setMatricesWindow( getWindowSize() );
gl::draw( mTexture );
}
CINDER_APP_NATIVE( CinderProjectApp, RendererGl )
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment