vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
VVBufferGLView.h
1 #import <Cocoa/Cocoa.h>
2 #import <OpenGL/CGLMacro.h>
3 #import "VVBuffer.h"
4 #import <pthread.h>
5 #import "VVSizingTool.h"
6 #import <libkern/OSAtomic.h>
7 
8 
9 
10 
12 
15 @interface VVBufferGLView : NSOpenGLView {
16  BOOL initialized;
17  pthread_mutex_t renderLock;
18 
19  VVSizingMode sizingMode;
20 
21  BOOL retainDraw;
22  OSSpinLock retainDrawLock;
23  VVBuffer *retainDrawBuffer;
24 
25  BOOL onlyDrawNewStuff; // NO by default. if YES, only draws buffers with content timestamps different from the timestamp of the last buffer displayed
26  OSSpinLock onlyDrawNewStuffLock;
27  struct timeval onlyDrawNewStuffTimestamp;
28 }
29 
30 - (void) redraw;
32 - (void) drawBuffer:(VVBuffer *)b;
34 - (void) setSharedGLContext:(NSOpenGLContext *)c;
35 
36 @property (assign,readwrite) BOOL initialized;
37 @property (assign,readwrite) VVSizingMode sizingMode;
38 - (void) setRetainDraw:(BOOL)n;
39 - (void) setRetainDrawBuffer:(VVBuffer *)n;
40 @property (assign,readwrite) BOOL onlyDrawNewStuff;
41 
42 @end
subclass of NSOpenGLView, fastest and easiest way to display a VVBuffer. automatically sizes the buff...
Definition: VVBufferGLView.h:15
VVBuffer represents a buffer- almost always in VRAM as a GL texture or renderbuffer- created and mana...
Definition: VVBuffer.h:134
VVSizingMode
Different sizing modes.
Definition: VVSizingTool.h:12