vvopensource
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Properties Macros Groups Pages
Instance Methods | Class Methods | Properties
VVBufferCopier Class Reference

subclass of GLScene, used to copy the contents of VVBuffer instances by rendering them into a texture. More...

#import <VVBufferCopier.h>

Inherits GLScene.

Instance Methods

(VVBuffer *) - copyToNewBuffer:
 returns a retained instance of VVBuffer which was made by rendering the passed buffer into a new texture of matching dimensions.
 
(BOOL) - copyThisBuffer:toThisBuffer:
 copies the first passed buffer into the second, returns YES if successful- if sizes don't match or either buffer is nil, bails and returns NO! ignores "copyToIOSurface" and "copyPixFormat"!
 
(void) - sizeVariantCopyThisBuffer:toThisBuffer:
 copies the first buffer into the second buffer. will stretch/squash 'a' to fit into 'b'.
 
(void) - ignoreSizeCopyThisBuffer:toThisBuffer:
 copies the first buffer into the second buffer, completely ignoring sizes- it just draws 'a' in the bottom-left corner of 'b'. the resulting image may depict 'a' as being "too small" or "cropped".
 
(void) - copyBlackFrameToThisBuffer:
 fills the passed buffer with transparent black
 
(void) - copyOpaqueBlackFrameToThisBuffer:
 fills the passed buffer with opaque black
 
(void) - copyRedFrameToThisBuffer:
 fills the passed buffer with opaque red
 
- Instance Methods inherited from GLScene
(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.
 

Class Methods

(void) + createGlobalVVBufferCopierWithSharedContext:
 there's a global (singleton) instance of VVBufferCopier- by default this is created when you set up the global VVBufferPool, but if you want to override it and create it to work with a different context, this is how.
 
(VVBufferCopier *) + globalBufferCopier
 returns the instance of the global (singleton) VVBufferCopier which is automatically created when you make the global VVBufferPool. if this is nil, something's wrong- check to see if your global buffer pool is nil or not!
 
- Class Methods inherited from GLScene
(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.
 

Properties

BOOL copyToIOSurface
 NO by default. if YES, will create a GL texture used to back an IOSurface (for inter-process texture sharing) when "copyToNewBuffer" is called.
 
BOOL copyAndResize
 NO by default. if YES, the buffer copier will resize anything passed to "copyToNewBuffer" or throw an error if the buffer sizes don't match and you call "copyThisBuffer:toThisBuffer:".
 
NSSize copySize
 the "copySize" is only used if "copyAndResize" is YES
 
- Properties inherited from GLScene
NSSize size
 Set the size at which this scene should render.
 
id renderTarget
 Every time this scene renders, the "renderSelector" is called on "renderTarget".
 
SEL renderSelector
 Every time this scene renders, the "renderSelector" is called on "renderTarget". You put your drawing code in the "renderSelector".
 

Detailed Description

subclass of GLScene, used to copy the contents of VVBuffer instances by rendering them into a texture.


The documentation for this class was generated from the following files: