Vuo
1.2.3
|
Compiles, runs, and controls a Vuo composition that adheres to the Image Generator protocol.
Instance Methods | |
(id) | - initWithComposition: |
Opens the specified compositionURL , compiles it, and starts it running. | |
(id) | - initWithCompositionString:name:sourcePath: |
Compiles the specified compositionString and starts it running. | |
(NSImage *) | - generateNSImageWithSuggestedPixelsWide:pixelsHigh:atTime: |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time (number of seconds since rendering started), and returns the generated image. | |
(GLuint) | - generateGLTextureWithTarget:suggestedPixelsWide:pixelsHigh:atTime:outputPixelsWide:pixelsHigh: |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time (number of seconds since rendering started), and returns the generated image. | |
(GLuint) | - generateGLTextureWithProvider:suggestedPixelsWide:pixelsHigh:atTime:outputPixelsWide:pixelsHigh:ioSurface: |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time (number of seconds since rendering started), requests that the host provide a texture of the appropriate size, and returns that texture with image data attached to its GL_TEXTURE_RECTANGLE_ARB target. | |
(VuoImage) | - generateVuoImageWithSuggestedPixelsWide:pixelsHigh:atTime: |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time (number of seconds since rendering started), and returns the generated image. | |
![]() | |
(NSArray *) | - inputPorts |
Returns an array listing the names of the composition's published input ports, excluding those used by protocols. | |
(NSArray *) | - outputPorts |
Returns an array listing the names of the composition's published output ports, excluding those used by protocols. | |
(NSDictionary *) | - detailsForPort: |
Returns a dictionary with information about the specified portName . | |
(id) | - propertyListFromInputValues |
Returns a property list with the current values of the composition's (non-protocol) published input ports. | |
(BOOL) | - setInputValuesWithPropertyList: |
Sets the values of the composition's published input ports using a property list. | |
(BOOL) | - setValue:forInputPort: |
Sets the value of the specified published input port. | |
(BOOL) | - setJSONValue:forInputPort: |
Sets the value of the specified published input port using a JSON-serialized value. | |
(id) | - valueForOutputPort: |
Returns the value of the specified published output port. | |
(GLuint) | - glTextureWithTarget:forOutputPort:outputPixelsWide:pixelsHigh: |
Returns the image in the specified published output port, keeping it in GPU VRAM as an OpenGL texture. | |
(GLuint) | - glTextureFromProvider:forOutputPort:outputPixelsWide:pixelsHigh:ioSurface: |
Retrieves the image in the specified published output port, keeping it in GPU VRAM as an OpenGL texture. | |
Class Methods | |
(BOOL) | + canOpenComposition: |
Returns YES if the specified compositionURL can be opened and adheres to the Image Generator protocol. | |
(BOOL) | + canOpenCompositionString: |
Returns YES if the specified compositionString and adheres to the Image Generator protocol. | |
![]() | |
(void) | + setGlobalRootContext: |
Specifies an OpenGL context to be used as the base for all of Vuo's shared GL contexts. | |
(void) | + prepareForFastBuild |
Prepares the cache that enables compositions to build faster. | |
(id) | + cocoaObjectWithVuoValue:ofType: |
Given the specified vuoValue (serialized as JSON), returns a Cocoa object. | |
(json_object *) | + vuoValueWithCocoaObject: |
Given the specified Cocoa object, returns a Vuo value (serialized as JSON). | |
(NSImage *) | + nsImageWithVuoImage: |
Converts the provided VuoImage to an NSImage. | |
Additional Inherited Members | |
![]() | |
dispatch_queue_t | runnerQueue |
The composition's user-defined title. | |
VuoRunner * | runner |
The composition's user-defined title. | |
VuoCompiler * | compiler |
The composition's user-defined title. | |
VuoComposition * | composition |
The composition's user-defined title. | |
NSURL * | compositionURL |
The composition's user-defined title. | |
NSString * | compositionString |
The composition's user-defined title. | |
NSString * | compositionSourcePath |
The composition's user-defined title. | |
NSString * | compositionProcessName |
The composition's user-defined title. | |
VuoProtocol * | protocol |
The composition's user-defined title. | |
![]() | |
NSString * | compositionName |
The composition's user-defined title. | |
NSString * | compositionDescription |
The composition's user-defined description. | |
NSString * | compositionCopyright |
The composition's user-defined copyright text. | |
+ (BOOL) canOpenComposition: | (NSURL *) | compositionURL |
Returns YES
if the specified compositionURL
can be opened and adheres to the Image Generator protocol.
+ (BOOL) canOpenCompositionString: | (NSString *) | compositionString |
Returns YES
if the specified compositionString
and adheres to the Image Generator protocol.
- (GLuint) generateGLTextureWithProvider: | (NSUInteger pixelsWide, NSUInteger pixelsHigh) | provider | |
suggestedPixelsWide: | (NSUInteger) | suggestedPixelsWide | |
pixelsHigh: | (NSUInteger) | suggestedPixelsHigh | |
atTime: | (NSTimeInterval) | time | |
outputPixelsWide: | (NSUInteger *) | outputPixelsWide | |
pixelsHigh: | (NSUInteger *) | outputPixelsHigh | |
ioSurface: | (IOSurfaceRef *) | outputIOSurface | |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time
(number of seconds since rendering started), requests that the host provide a texture of the appropriate size, and returns that texture with image data attached to its GL_TEXTURE_RECTANGLE_ARB
target.
suggestedPixelsWide | The suggested width of the output image. | |
suggestedPixelsHigh | The suggested height of the output image. | |
time | The logical time at which to filter the image. | |
provider | A block that returns an OpenGL texture name with the requested width and height. The host app must not call glTexImage2D() on the texture, since this makes the texture incompatible with the IOSurface backing. | |
[out] | outputPixelsWide | Upon return, this contains the width of the output texture. |
[out] | outputPixelsHigh | Upon return, this contains the height of the output texture. |
[out] | outputIOSurface | Upon return, this contains the IOSurface backing the output texture. When the host app is finished with the output texture, it must signal and release the IOSurface: VuoIoSurfacePool_signal(outputIOSurface); CFRelease(outputIOSurface); |
- (GLuint) generateGLTextureWithTarget: | (GLuint) | target | |
suggestedPixelsWide: | (NSUInteger) | suggestedPixelsWide | |
pixelsHigh: | (NSUInteger) | suggestedPixelsHigh | |
atTime: | (NSTimeInterval) | time | |
outputPixelsWide: | (NSUInteger *) | outputPixelsWide | |
pixelsHigh: | (NSUInteger *) | outputPixelsHigh | |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time
(number of seconds since rendering started), and returns the generated image.
target
must be either GL_TEXTURE_2D
or GL_TEXTURE_RECTANGLE_ARB
.
- (NSImage *) generateNSImageWithSuggestedPixelsWide: | (NSUInteger) | suggestedPixelsWide | |
pixelsHigh: | (NSUInteger) | suggestedPixelsHigh | |
atTime: | (NSTimeInterval) | time | |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time
(number of seconds since rendering started), and returns the generated image.
This method requires a roundtrip between CPU and GPU RAM, which is slow. If possible, use generateGLTextureWithTarget:suggestedPixelsWide:pixelsHigh:atTime:outputPixelsWide:pixelsHigh: instead.
- (VuoImage) generateVuoImageWithSuggestedPixelsWide: | (NSUInteger) | suggestedPixelsWide | |
pixelsHigh: | (NSUInteger) | suggestedPixelsHigh | |
atTime: | (NSTimeInterval) | time | |
Instructs the Vuo composition to generate an image with the specified dimensions at the specified logical time
(number of seconds since rendering started), and returns the generated image.
- (id) initWithComposition: | (NSURL *) | aCompositionURL |
Opens the specified compositionURL
, compiles it, and starts it running.
Returns nil
if the composition cannot be opened, if it does not adhere to the Image Generator protocol, or if it cannot be compiled.
- (id) initWithCompositionString: | (NSString *) | aCompositionString | |
name: | (NSString *) | name | |
sourcePath: | (NSString *) | sourcePath | |
Compiles the specified compositionString
and starts it running.
name
specifies the running process should have.
Returns nil
if the composition does not adhere to the Image Generator protocol, or if it cannot be compiled.