vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Data Structures | Typedefs | Enumerations | Functions
VVBuffer.h File Reference
#import <Cocoa/Cocoa.h>
#import <OpenGL/CGLMacro.h>
#import <CoreVideo/CoreVideo.h>
#import <IOSurface/IOSurface.h>

Go to the source code of this file.

Data Structures

struct  _VVBufferDescriptor
 This C struct describes the basic characteristics of a VVBuffer's internal GL properties. More...
 
class  VVBuffer
 VVBuffer represents a buffer- almost always in VRAM as a GL texture or renderbuffer- created and managed by VVBufferPool. Conceptually, it's safe to think of VVBuffers as "images" or "frames", as that is typically what they're used for. You should never alloc/init a VVBuffer- if you want a buffer, you need to get one by asking a VVBufferPool to create one for you. More...
 

Typedefs

typedef enum _VVBufferType VVBufferType
 These are the different kinds of VVBuffers.
 
typedef enum _VVBufferIntFormat VVBufferIntFormat
 This desribes the internal format of the GL resource represented by a VVBuffer.
 
typedef enum _VVBufferPixFormat VVBufferPixFormat
 This describes the pixel format of the GL resource represented by a VVBuffer.
 
typedef enum _VVBufferPixType VVBufferPixType
 This describes the pixel type of the GL resource represented by a VVBuffer.
 
typedef enum _VVBufferCPUBack VVBufferCPUBack
 The origin of any CPU-based content.
 
typedef enum _VVBufferGPUBack VVBufferGPUBack
 The origin of any GPU-based content.
 
typedef enum _VVBufferBackID VVBufferBackID
 The "VVBufferBackID" is an arbitrary enum that isn't used functionally by this framework. This enum- and VVBuffer's corresponding "backingID" member- exist to help track where a VVBuffer came from (if it was made from pixels, from another object, etc). More...
 
typedef struct _VVBufferDescriptor VVBufferDescriptor
 This C struct describes the basic characteristics of a VVBuffer's internal GL properties.
 
typedef void(* VVBufferBackingReleaseCallback )(id VVBufferBeingFreed, void *callbackContext)
 This is a function pointer- it gets called when the VVBuffer that owns it is being deallocated and needs to deallocate any resources associated with it. If you want to extend the VVBufferPool framework to wrap other APIs, you'll want to write your own callback function similar to this and use it to free the buffer's callback context. More...
 

Enumerations

enum  _VVBufferType { VVBufferType_None = 0, VVBufferType_RB, VVBufferType_FBO, VVBufferType_Tex }
 These are the different kinds of VVBuffers. More...
 
enum  _VVBufferIntFormat {
  VVBufferIF_None = 0, VVBufferIF_Lum8 = GL_LUMINANCE8, VVBufferIF_LumFloat = GL_LUMINANCE32F_ARB, VVBufferIF_R = GL_RED,
  VVBufferIF_RGB = GL_RGB, VVBufferIF_RGBA = GL_RGBA, VVBufferIF_RGBA8 = GL_RGBA8, VVBufferIF_Depth24 = GL_DEPTH_COMPONENT24,
  VVBufferIF_RGBA32F = GL_RGBA32F_ARB, VVBufferIF_RGB_DXT1 = GL_COMPRESSED_RGB_S3TC_DXT1_EXT, VVBufferIF_RGBA_DXT5 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT, VVBufferIF_YCoCg_DXT5 = GL_COMPRESSED_RGBA_S3TC_DXT5_EXT
}
 This desribes the internal format of the GL resource represented by a VVBuffer. More...
 
enum  _VVBufferPixFormat {
  VVBufferPF_None = 0, VVBufferPF_Depth = GL_DEPTH_COMPONENT, VVBufferPF_Lum = GL_LUMINANCE, VVBufferPF_R = GL_RED,
  VVBufferPF_RGBA = GL_RGBA, VVBufferPF_BGRA = GL_BGRA, VVBufferPF_YCBCR_422 = GL_YCBCR_422_APPLE
}
 This describes the pixel format of the GL resource represented by a VVBuffer. More...
 
enum  _VVBufferPixType {
  VVBufferPT_None = 0, VVBufferPT_Float = GL_FLOAT, VVBufferPT_U_Byte = GL_UNSIGNED_BYTE, VVBufferPT_U_Int_8888_Rev = GL_UNSIGNED_INT_8_8_8_8_REV,
  VVBufferPT_U_Short_88 = GL_UNSIGNED_SHORT_8_8_APPLE
}
 This describes the pixel type of the GL resource represented by a VVBuffer. More...
 
enum  _VVBufferCPUBack { VVBufferCPUBack_None = 0, VVBufferCPUBack_Internal, VVBufferCPUBack_External }
 The origin of any CPU-based content. More...
 
enum  _VVBufferGPUBack { VVBufferGPUBack_None = 0, VVBufferGPUBack_Internal, VVBufferGPUBack_External }
 The origin of any GPU-based content. More...
 
enum  _VVBufferBackID {
  VVBufferBackID_None = 0 , VVBufferBackID_Pixels, VVBufferBackID_CVPixBuf, VVBufferBackID_CVTex,
  VVBufferBackID_NSBitImgRep, VVBufferBackID_RemoteIOSrf, VVBufferBackID_External
}
 The "VVBufferBackID" is an arbitrary enum that isn't used functionally by this framework. This enum- and VVBuffer's corresponding "backingID" member- exist to help track where a VVBuffer came from (if it was made from pixels, from another object, etc). More...
 

Functions

void VVBufferDescriptorPopulateDefault (VVBufferDescriptor *d)
 Populates the passed VVBufferDescriptor pointer with default values.
 
void VVBufferDescriptorCopy (VVBufferDescriptor *src, VVBufferDescriptor *dst)
 Copies the contents of the src to dst.
 
BOOL VVBufferDescriptorCompare (VVBufferDescriptor *a, VVBufferDescriptor *b)
 Compares the passed buffers, returns a YES if they are completely identical.
 
BOOL VVBufferDescriptorCompareForRecycling (VVBufferDescriptor *a, VVBufferDescriptor *b)
 Compares the passed buffers for the purpose of recycling, returns a YES if they are close enough of a match to be used interchangeably.
 
unsigned long VVBufferDescriptorCalculateCPUBackingForSize (VVBufferDescriptor *b, NSSize s)
 Calculates the size (in bytes) that would be required to create a CPU-based backing for a buffer of the passed dimensions matching the passed buffer descriptor.