|
(void) | - housekeeping |
| You have to call this method periodically (once per global render pass is fine, ideally at the end of the pass). Calling this method frees up buffers if they've been sitting unused for a while.
|
|
(VVBuffer *) | - allocFBO |
| Allocates and returns a VVBuffer instance that represents an OpenGL framebuffer. Framebuffers have textures or renderbuffers associated with them as color (image) or depth attachments.
|
|
(VVBuffer *) | - allocBGRTexSized: |
| Allocates and returns a VVBuffer instance that represents an OpenGL texture. Specifically, returns an 8-bit per channel RECT texture with a BGRA internal format.
|
|
(VVBuffer *) | - allocBGR2DPOTTexSized: |
| Allocates and returns a VVBuffer instance that represents an OpenGL texture. Specifically, returns an 8-bit per channel 2D texture with power-of-two dimensions and a BGRA internal format. More...
|
|
(VVBuffer *) | - allocBGRFloatTexSized: |
| Allocates and returns a VVBuffer instance that represents an OpenGL texture. Specifically, returns a 32-bit-float-per-channel RECT texture with a BGRA internal format. More...
|
|
(VVBuffer *) | - allocBGRFloat2DPOTTexSized: |
| Allocates and returns a VVBuffer instance that represents an OpenGL texture. Specifically, returns a 32-bit-float-per-channel 2D texture with power-of-two dimensions and a BGRA internal format. More...
|
|
(VVBuffer *) | - allocDepthSized: |
| Allocates and returns a VVBuffer instance that represents an OpenGL texture used as a depth attachment. More...
|
|
(VVBuffer *) | - allocMSAAColorSized:numOfSamples: |
| Allocates and returns a VVBuffer instance that represents an OpenGL renderbuffer suitable for multisample antialiasing as a color (image) attachment. More...
|
|
(VVBuffer *) | - allocMSAADepthSized:numOfSamples: |
| Allocates and returns a VVBuffer instance that represents an OpenGL renderbuffer suitable for multisample antialiasing as a depth attachment. More...
|
|
(VVBuffer *) | - allocBufferForNSImage:prefer2DTexture: |
| Allocates and returns a VVBuffer instance that represents an 8-bit per channel OpenGL texture. The texture is automaticall populated with the contents of the passed image. More...
|
|
(VVBuffer *) | - allocBufferForBitmapRep:prefer2DTexture: |
| Allocates and returns a VVBuffer instance that represents an 8-bit per channel OpenGL texture. The texture is automaticall populated with the contents of the passed NSBitmapImageRep. More...
|
|
(VVBuffer *) | - allocBufferForCVGLTex: |
| Allocates and returns a VVBuffer instance that represents the GL texture used by the passed CVOpenGLTextureRef. The VVBuffer actually retains the CV texture, so the underlying CV resource is retained until all VVBuffers referencing it are freed. More...
|
|
(VVBuffer *) | - allocTexRangeForHapCVImageBuffer: |
| Special method for working with Hap movie files- uploads the passed image buffer (only accepts hap image buffers) to a GL texture. HapQ movies will still need to be converted from YCoCg to RGBA! More...
|
|
(VVBuffer *) | - allocBufferForTexBackedIOSurfaceSized: |
| Allocates and returns a VVBuffer instance backed by an IOSurfaceRef. If you want to pass a texture to another process via an IOSurface, create one of these and then render to it. More...
|
|
(VVBuffer *) | - allocBufferForIOSurfaceID: |
| Allocates and returns a VVBuffer instance created from an existing IOSurfaceRef. If you want to receive textures from another process, get the IOSurfaceID from the remote process and then pass it to this method to create the VVBuffer. More...
|
|
(id) | - initWithSharedContext: |
| Init an instance of GLScene using the passed shared context.
|
|
(id) | - initWithSharedContext:sized: |
| Init an instance of GLScene using the passed shared context. The GLScene will automatically be configured to render at the passed size.
|
|
(id) | - initWithSharedContext:pixelFormat: |
| Init an instance of GLScene using the passed shared context and pixel format.
|
|
(id) | - initWithSharedContext:pixelFormat:sized: |
| Init an instance of GLScene using the passed shared context and pixel format. The GLScene will automatically be configured to render at the passed size.
|
|
(VVBuffer *) | - allocAndRenderABuffer |
| Allocate a VVBuffer of the appropriate size, renders into this buffer, and then return it. Probably the "main" rendering method.
|
|
(void) | - renderInMSAAFBO:colorRB:depthRB:fbo:colorTex:depthTex:target: |
| This is the low-level rendering method- if you want to fool around with MSAA or build a leaner interface, you'll probably want to use this. More...
|
|
(void) | - setClearNSColor: |
| Set the clear color from the passed NSColor.
|
|
(void) | - setClearColor: |
| Set the clear color from the passed array of GLfloats.
|
|
(void) | - setClearColors:::: |
| Set the clear color from the passed color values.
|
|
|
(int) | + msaaMaxSamples |
|
(void) | + createGlobalVVBufferPoolWithSharedContext: |
| Call this method and pass the GL context you wish to share to create the global (singleton) VVBufferPool. Other classes in this framework will automatically try to configure themselves to work with the global pool or its shared context if they exist- a lot of stuff will be easier to use and require less configuration if setting up the global buffer pool is the first thing you do. More...
|
|
(id) | + globalVVBufferPool |
| Returns the global buffer pool (singleton). The buffer pool itself should be threadsafe (you can use it from multiple threads at the same time and the pool will handle the details).
|
|
(void) | + timestampThisBuffer: |
| Call this method and pass a VVBuffer instance to it to give the passed VVBuffer instance a timestamp. More...
|
|
(NSMutableArray *) | + gpuVendorArray |
| Returns an array of the GPUs currently accessible by the renderer accessible being used with this process.
|
|
(BOOL) | + integratedGPUFlag |
| Returns a YES if you're using an integrated GPU.
|
|
(BOOL) | + nvidiaGPUFlag |
| Returns a YES if you're using an NVIDIA GPU.
|
|
(GLuint) | + glDisplayMaskForAllScreens |
| Returns a GL display mask that encompassess all your screens.
|
|
(NSOpenGLPixelFormat *) | + defaultPixelFormat |
| Returns a default NSOpenGLPixelFormat instance. If you don't explicitly set a pixel format when creating your instances of GLScene (and its subclasses), this is the pixel format that will be used.
|
|
Creates VVBuffers. Should be the only way you create VVBuffers- most projects will only have a single instance of VVBufferPool, which shares an OpenGL context with other parts of your program so GL resources (specifically textures) may be shared.
The goal of the buffer pool is two-fold: firstly, to simplify the process of creating and working with GL-based resources by treating them as "buffer objects". secondly, to minimize the impact of creating and dealing with gl-based resources; when a VVBuffer is released, it goes back into the pool for a specified period of time. during this time, anything that asks the pool for a matching buffer will be given the pre-existing asset (instead of forcing the creation of a new asset). if nothing requires the resource, it will eventually be freed (again, VVBufferPool is a subclass of GLScene- it has a context, and may free gl resources).
VVBufferPool is a subclass of GLScene. this is important: the buffer pool is essentially its own GL context- the idea is to have a single buffer pool which is capable of creating resources which may be shared among contexts which are being rendered on other threads.
the buffer pool creates VVBuffers; each buffer retains the buffer pool which created it to ensure that the pool sticks around until it has freed every resource it creates. this should be mostly unnecessary- you'll probably only ever need the one global instance of VVBufferPool.