From d03a3077fb119a3ebc97df2a88731e80aa7b7bf1 Mon Sep 17 00:00:00 2001 From: Michel Pollet Date: Fri, 15 Jun 2012 09:21:06 +0100 Subject: [PATCH] c3texture: Added a resize() function Changes the size of the display quad Signed-off-by: Michel Pollet --- examples/shared/libc3/src/c3texture.c | 9 ++++++--- examples/shared/libc3/src/c3texture.h | 4 ++++ 2 files changed, 10 insertions(+), 3 deletions(-) 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___ */ -- 2.39.5