vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
QCGLScene.h
1 #import <Cocoa/Cocoa.h>
2 #import <OpenGL/OpenGL.h>
3 #import <OpenGL/CGLMacro.h>
4 #import <Quartz/Quartz.h>
5 #import <VVBufferPool/VVBufferPool.h>
6 @class VVQCComposition;
7 #import <pthread.h>
8 
9 
10 
11 
12 extern BOOL _QCGLSceneInitialized;
13 extern pthread_mutex_t universalInitializeLock; // used because QC's backend is NOT threadsafe when creating compositions when there are 3rd-party QC plugins installed!
14 extern BOOL _safeQCRenderFlag; // YES by default. if YES, uses try/catch/throw exception handler around render calls to the QCRenderer (if there's a problem, this prevents the QC from getting "stuck")
15 
16 
17 
18 
20 
23 @interface QCGLScene : GLScene {
24  NSString *filePath;
25  VVQCComposition *comp; // RETAINED!
26  QCRenderer *renderer; // RETAINED!
27  VVStopwatch *stopwatch;
28  //MutLockDict *mouseEventDict; // used to pass mouse event info to this scene/renderer from another thread!
29  MutLockArray *mouseEventArray; // fills up with dicts which are passed to the renderer on the render thread
30  pthread_mutex_t renderLock;
31 }
32 
37 - (void) useFile:(NSString *)p;
38 - (void) useFile:(NSString *)p resetTimer:(BOOL)t;
39 - (void) _actuallyDisplayVidInAlertForFile:(NSString *)p;
40 
42 - (void) prepareRendererIfNeeded;
43 
45 - (NSString *) filePath;
47 - (VVQCComposition *) comp;
49 - (QCRenderer *) renderer;
50 - (MutLockArray *) mouseEventArray;
51 
52 - (void) _renderLock;
53 - (void) _renderUnlock;
54 
55 @end
VVQCComposition * comp()
the VVQCComposition for the currently-loaded file
Definition: QCGLScene.m:336
NSString * filePath()
the currently loaded file path
Definition: QCGLScene.m:333
Subclass of GLScene for working with QC compositions.
Definition: QCGLScene.h:23
Wrapper around a GL context with the intent of standardizing the more common render-to-texture operat...
Definition: GLScene.h:34
This class is used to measure how long it takes to do things; much easier to work with than NSDate...
Definition: VVStopwatch.h:16
Load a Quartz Composer composition and parse it as a text file (QC comps are basically big plists) to...
Definition: VVQCComposition.h:49
Similar to NSMutableArray, but thread-safe. Internally, uses an NSMutableArray and a rwlock...
Definition: MutLockArray.h:20
QCRenderer * renderer()
the QCRenderer for the currently-loaded file. this is nil when you first load a file- the QCRenderer ...
Definition: QCGLScene.m:339