Vuo  1.1.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions | Variables
VuoImageResize.c File Reference

Description

VuoImageResize implementation.

Functions

VuoShader VuoImageResize_makeShader ()
 Create and compile a resize shader for reuse with VuoImage_resizeWithShaderAndContext.
 
VuoImage VuoImageResize_resize (VuoImage image, VuoShader shader, VuoImageRenderer renderer, VuoSizingMode sizingMode, VuoInteger width, VuoInteger height)
 Returns a new image resized from image.
 

Variables

static const char * applyScaleFragmentShader
 Fragment shader that scales and offsets an image.
 

Function Documentation

VuoShader VuoImageResize_makeShader ( )

Create and compile a resize shader for reuse with VuoImage_resizeWithShaderAndContext.

VuoImage VuoImageResize_resize ( VuoImage  image,
VuoShader  shader,
VuoImageRenderer  renderer,
VuoSizingMode  sizingMode,
VuoInteger  width,
VuoInteger  height 
)

Returns a new image resized from image.

Use with VuoImageResize_makeShader().

Variable Documentation

const char* applyScaleFragmentShader
static
Initial value:
varying vec4 fragmentTextureCoordinate;
uniform sampler2D texture;
uniform vec2 scale;
uniform vec2 offset;
void main(void)
{
gl_FragColor = texture2D(texture, (vec2(fragmentTextureCoordinate.x, fragmentTextureCoordinate.y)-offset) * scale);
}
)

Fragment shader that scales and offsets an image.