1 #import <Cocoa/Cocoa.h>
2 #import <OpenGL/CGLMacro.h>
4 #import <VVBasics/VVBasics.h>
6 #import "VVBufferPoolStringAdditions.h"
8 #import "VVBufferAggregate.h"
9 #import "VVBufferGLView.h"
10 #import "RenderThread.h"
13 #import "GLShaderScene.h"
15 #import "VVQCComposition.h"
17 #import "VVBufferCopier.h"
18 #import "HapSupport.h"
26 extern id _globalVVBufferPool;
27 extern int _msaaMaxSamples;
28 extern BOOL _bufferPoolInitialized;
37 #define FOURCC_PACK(a,b,c,d) ((unsigned long)((((uint32_t)d)) | (((uint32_t)c)<<8) | (((uint32_t)b)<<16) | (((uint32_t)a)<<24)))
55 pthread_mutex_t contextLock;
62 + (int) msaaMaxSamples;
63 + (void) setGlobalVVBufferPool:(
id)n;
69 + (void) createGlobalVVBufferPoolWithSharedContext:(NSOpenGLContext *)n;
71 + (id) globalVVBufferPool;
76 + (void) timestampThisBuffer:(
id)n;
79 - (void) housekeeping;
80 - (void) startHousekeepingThread;
81 - (void) stopHousekeepingThread;
92 - (
VVBuffer *) allocBGRTexSized:(NSSize)s;
100 - (
VVBuffer *) allocBGR2DPOTTexSized:(NSSize)s;
105 - (
VVBuffer *) allocBGRFloatTexSized:(NSSize)s;
110 - (
VVBuffer *) allocBGRFloat2DPOTTexSized:(NSSize)s;
115 - (
VVBuffer *) allocDepthSized:(NSSize)s;
120 - (
VVBuffer *) allocMSAAColorSized:(NSSize)s numOfSamples:(
int)n;
125 - (
VVBuffer *) allocMSAADepthSized:(NSSize)s numOfSamples:(
int)n;
128 - (
VVBuffer *) allocBufferForNSImage:(NSImage *)img;
134 - (
VVBuffer *) allocBufferForNSImage:(NSImage *)img prefer2DTexture:(BOOL)prefer2D;
135 - (
VVBuffer *) allocBufferForBitmapRep:(NSBitmapImageRep *)rep;
141 - (
VVBuffer *) allocBufferForBitmapRep:(NSBitmapImageRep *)rep prefer2DTexture:(BOOL)prefer2D;
146 - (
VVBuffer *) allocBufferForCVGLTex:(CVOpenGLTextureRef)cvt;
152 - (
VVBuffer *) allocTexRangeForHapCVImageBuffer:(CVImageBufferRef)img;
158 - (
VVBuffer *) allocBufferForTexBackedIOSurfaceSized:(NSSize)s;
163 - (
VVBuffer *) allocBufferForIOSurfaceID:(IOSurfaceID)n;
167 - (void) _returnBufferToPool:(
VVBuffer *)b;
170 - (void) _releaseBufferResource:(
VVBuffer *)b;
181 unsigned long VVPackFourCC_fromChar(
char *charPtr);
182 void VVUnpackFourCC_toChar(
unsigned long fourCC,
char *destCharPtr);
Simple class for spawning a thread which executes at a specified interval- simpler and easier to work...
Definition: VVThreadLoop.h:25
VVBuffer represents a buffer- almost always in VRAM as a GL texture or renderbuffer- created and mana...
Definition: VVBuffer.h:134
Wrapper around a GL context with the intent of standardizing the more common render-to-texture operat...
Definition: GLScene.h:34
Creates VVBuffers. Should be the only way you create VVBuffers- most projects will only have a single...
Definition: VVBufferPool.h:53
This class is used to measure how long it takes to do things; much easier to work with than NSDate...
Definition: VVStopwatch.h:16
Similar to NSMutableArray, but thread-safe. Internally, uses an NSMutableArray and a rwlock...
Definition: MutLockArray.h:20
This C struct describes the basic characteristics of a VVBuffer's internal GL properties.
Definition: VVBuffer.h:83