MCPcopy Create free account
hub / github.com/cinder/Cinder / setup

Method setup

samples/FlickrTestMultithreaded/src/FlickrTestMultithreadedApp.cpp:41–51  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

39};
40
41void FlickrTestMTApp::setup()
42{
43 mShouldQuit = false;
44 mImages = new ConcurrentCircularBuffer<gl::TextureRef>( 5 ); // room for 5 images
45 // create and launch the thread with a new gl::Context just for that thread
46 gl::ContextRef backgroundCtx = gl::Context::create( gl::context() );
47 mThread = shared_ptr<thread>( new thread( bind( &FlickrTestMTApp::loadImagesThreadFn, this, backgroundCtx ) ) );
48 mLastTime = getElapsedSeconds() - 10; // force an initial update by make it "ten seconds ago"
49
50 gl::enableAlphaBlending();
51}
52
53void FlickrTestMTApp::loadImagesThreadFn( gl::ContextRef context )
54{

Callers

nothing calls this directly

Calls 5

enableAlphaBlendingFunction · 0.85
createFunction · 0.50
contextFunction · 0.50
bindFunction · 0.50
getElapsedSecondsFunction · 0.50

Tested by

no test coverage detected