An image residing in GPU memory (GL Texture Object).
|
typedef struct _VuoImage * | VuoImage |
| An image residing in GPU memory (GL Texture Object).
|
|
|
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_join (unsigned int glTextureName, unsigned long int pixelsWide, unsigned long int pixelsHigh) |
| Returns a new VuoImage structure containing the specified values.
|
|
VuoImage | VuoImage_valueFromString (const char *initializer) |
| Parses initializer , a GL Texture represented as a JSON C string, and returns a VuoImage structure.
|
|
char * | VuoImage_stringFromValue (const VuoImage value) |
| Returns a JSON string representing the specified texture, in the same format as typeInitWithValue .
|
|
char * | VuoImage_summaryFromValue (const VuoImage value) |
| A brief summary of the contents of this texture.
|
|
Class Members |
unsigned int |
glTextureName |
|
unsigned long int |
pixelsHigh |
|
unsigned long int |
pixelsWide |
We could glGetTexLevelParameteri() but that would require a GPU roundtrip (inefficient). |
VuoImage VuoImage_join |
( |
unsigned int |
glTextureName, |
|
|
unsigned long int |
pixelsWide, |
|
|
unsigned long int |
pixelsHigh |
|
) |
| |
Returns a new VuoImage
structure containing the specified values.
The VuoImage takes ownership of glTextureName
, and will call glDeleteTextures()
on it when it's no longer needed.
char * VuoImage_summaryFromValue |
( |
const VuoImage |
value | ) |
|
A brief summary of the contents of this texture.
- Example:
GL Texture (ID 42)
640x480
VuoImage VuoImage_valueFromString |
( |
const char * |
initializer | ) |
|
Parses initializer
, a GL Texture represented as a JSON C string, and returns a VuoImage
structure.
- Parameters
-
initializer | A JSON string containing a GL Texture Name, and the texture's width and height in pixels. |
- Example:
{
"glTextureName": 42,
"pixelsWide": 640,
"pixelsHigh": 480
}