vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
VVBufferCopier.h
1 #import <Cocoa/Cocoa.h>
2 #import <VVBufferPool/VVBufferPool.h>
3 #import <pthread.h>
4 
5 
6 
7 
8 extern id _globalVVBufferCopier;
9 
10 
11 
12 
14 
17 @interface VVBufferCopier : GLScene {
18  pthread_mutex_t renderLock;
19  BOOL copyToIOSurface; // NO by default; if NO, the copied buffer won't have an associated IOSurfaceRef
20  VVBufferPixFormat copyPixFormat; // VVBufferPF_BGRA by default
21  BOOL copyAndResize; // NO by default. if NO, copies preserve the size of the passed buffer- if NO, resizes the buffer while copying it
22  NSSize copySize; // only used if "copyAndResize" is YES;
23 }
24 
26 + (void) createGlobalVVBufferCopierWithSharedContext:(NSOpenGLContext *)c;
28 + (VVBufferCopier *) globalBufferCopier;
29 
31 - (VVBuffer *) copyToNewBuffer:(VVBuffer *)n;
32 
34 - (BOOL) copyThisBuffer:(VVBuffer *)a toThisBuffer:(VVBuffer *)b;
36 - (void) sizeVariantCopyThisBuffer:(VVBuffer *)a toThisBuffer:(VVBuffer *)b;
38 - (void) ignoreSizeCopyThisBuffer:(VVBuffer *)a toThisBuffer:(VVBuffer *)b;
39 
41 - (void) copyBlackFrameToThisBuffer:(VVBuffer *)b;
43 - (void) copyOpaqueBlackFrameToThisBuffer:(VVBuffer *)b;
45 - (void) copyRedFrameToThisBuffer:(VVBuffer *)b;
46 
48 @property (assign,readwrite) BOOL copyToIOSurface;
49 @property (assign,readwrite) VVBufferPixFormat copyPixFormat;
51 @property (assign,readwrite) BOOL copyAndResize;
53 @property (assign,readwrite) NSSize copySize;
54 
55 @end
NSSize copySize
the "copySize" is only used if "copyAndResize" is YES
Definition: VVBufferCopier.h:22
VVBuffer represents a buffer- almost always in VRAM as a GL texture or renderbuffer- created and mana...
Definition: VVBuffer.h:134
BOOL copyToIOSurface
NO by default. if YES, will create a GL texture used to back an IOSurface (for inter-process texture ...
Definition: VVBufferCopier.h:19
Wrapper around a GL context with the intent of standardizing the more common render-to-texture operat...
Definition: GLScene.h:34
BOOL copyAndResize
NO by default. if YES, the buffer copier will resize anything passed to "copyToNewBuffer" or throw an...
Definition: VVBufferCopier.h:21
subclass of GLScene, used to copy the contents of VVBuffer instances by rendering them into a texture...
Definition: VVBufferCopier.h:17
enum _VVBufferPixFormat VVBufferPixFormat
This describes the pixel format of the GL resource represented by a VVBuffer.