Vuo  1.0.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions
VuoImage.c File Reference

Description

VuoImage implementation.

Functions

void VuoImage_free (void *texture)
 Decrements the retain count of the OpenGL Texture Object associated with the specified VuoImage, and frees the texture VuoImage struct.
 
VuoImage VuoImage_make_internal (unsigned int glTextureName, unsigned int glInternalFormat, unsigned long int pixelsWide, unsigned long int pixelsHigh)
 Helper for VuoImage_make and VuoImage_makeClientOwned.
 
VuoImage VuoImage_make (unsigned int glTextureName, unsigned int glInternalFormat, unsigned long int pixelsWide, unsigned long int pixelsHigh)
 Returns a new VuoImage structure representing the specified glTextureName.
 
VuoImage VuoImage_makeClientOwned (unsigned int glTextureName, unsigned int glInternalFormat, unsigned long int pixelsWide, unsigned long int pixelsHigh, VuoImage_freeCallback freeCallback, void *freeCallbackContext)
 Returns a new VuoImage structure representing the specified glTextureName.
 
VuoImage VuoImage_makeClientOwnedGlTextureRectangle (unsigned int glTextureName, unsigned int glInternalFormat, unsigned long int pixelsWide, unsigned long int pixelsHigh, VuoImage_freeCallback freeCallback, void *freeCallbackContext)
 Returns a new VuoImage structure representing the specified glTextureName.
 
VuoImage VuoImage_makeFromBuffer (const void *pixels, unsigned int format, unsigned int pixelsWide, unsigned int pixelsHigh, VuoImageColorDepth colorDepth)
 Uploads the specified pixel data to the GPU and returns a new VuoImage referencing it.
 
unsigned char * VuoImage_copyBuffer (VuoImage image, unsigned int requestedFormat)
 Downloads the specified image's pixel data from the GPU to the CPU, and returns the CPU memory buffer.
 
void VuoImage_setWrapMode (VuoImage image, VuoImageWrapMode wrapMode)
 Changes the image's wrap mode.
 
static void VuoImage_deleteImage (VuoImage image)
 Deletes image's GL texture.
 
VuoImage VuoImage_makeColorImage (VuoColor color, unsigned int pixelsWide, unsigned int pixelsHigh)
 Makes a solid-color image.
 
VuoImage VuoImage_makeCopy (VuoImage image)
 Returns a new texture copy of the passed image.
 
static void VuoImage_makeGlTextureRectangleCopy_freeCallback (VuoImage imageToFree)
 Deletes the GL texture.
 
VuoImage VuoImage_makeGlTextureRectangleCopy (VuoImage image)
 Copies image to a new GL_TEXTURE_RECTANGLE_ARB texture.
 
bool VuoImage_areEqual (const VuoImage a, const VuoImage b)
 Returns true if both images have the same dimensions and the same RGBA pixel data.
 
bool VuoImage_isEmpty (const VuoImage image)
 
VuoRectangle VuoImage_getRectangle (const VuoImage image)
 Returns a rectangle (in Vuo Coordinates) at the origin, with width 2 and height matching the image's aspect ratio.
 
VuoImageColorDepth VuoImage_getColorDepth (const VuoImage image)
 Returns the color depth of the image.
 
VuoImage VuoImage_makeFromJson (json_object *js)
 Decodes the JSON object js to create a new value.
 
json_object * VuoImage_getJson (const VuoImage value)
 Encodes value as a JSON object.
 
json_object * VuoImage_getInterprocessJson (const VuoImage value)
 Returns a JSON object containing an interprocess handle for the specified texture.
 
char * VuoImage_getSummary (const VuoImage value)
 A brief summary of the contents of this texture.
 

Function Documentation

static void VuoImage_deleteImage ( VuoImage  image)
static

Deletes image's GL texture.

VuoImage VuoImage_make_internal ( unsigned int  glTextureName,
unsigned int  glInternalFormat,
unsigned long int  pixelsWide,
unsigned long int  pixelsHigh 
)

Helper for VuoImage_make and VuoImage_makeClientOwned.

static void VuoImage_makeGlTextureRectangleCopy_freeCallback ( VuoImage  imageToFree)
static

Deletes the GL texture.