From: Michel Pollet Date: Fri, 15 Jun 2012 08:21:06 +0000 (+0100) Subject: c3texture: Added a resize() function X-Git-Tag: v1.0~75 X-Git-Url: https://git.htl-mechatronik.at/public/?a=commitdiff_plain;h=d03a3077fb119a3ebc97df2a88731e80aa7b7bf1;p=sx%2Fsimavr.git c3texture: Added a resize() function Changes the size of the display quad Signed-off-by: Michel Pollet --- diff --git a/examples/shared/libc3/src/c3texture.c b/examples/shared/libc3/src/c3texture.c index 27ae649..e9e576d 100644 --- a/examples/shared/libc3/src/c3texture.c +++ b/examples/shared/libc3/src/c3texture.c @@ -103,8 +103,11 @@ c3texture_init( } void -c3texture_setpixels( - ) +c3texture_resize( + c3texture_p t, + c3vec2 size ) { - + t->size = size; + t->geometry.dirty = 1; + c3geometry_set_dirty(&t->geometry, 1); } diff --git a/examples/shared/libc3/src/c3texture.h b/examples/shared/libc3/src/c3texture.h index ecaae3e..6ef1477 100644 --- a/examples/shared/libc3/src/c3texture.h +++ b/examples/shared/libc3/src/c3texture.h @@ -42,5 +42,9 @@ c3texture_p c3texture_init( c3texture_p t, struct c3object_t * parent /* = NULL */); +void +c3texture_resize( + c3texture_p t, + c3vec2 size ); #endif /* __C3TEXTURE_H___ */