c3texture: Added a resize() function
authorMichel Pollet <buserror@gmail.com>
Fri, 15 Jun 2012 08:21:06 +0000 (09:21 +0100)
committerMichel Pollet <buserror@gmail.com>
Fri, 15 Jun 2012 08:21:06 +0000 (09:21 +0100)
Changes the size of the display quad

Signed-off-by: Michel Pollet <buserror@gmail.com>
examples/shared/libc3/src/c3texture.c
examples/shared/libc3/src/c3texture.h

index 27ae649..e9e576d 100644 (file)
@@ -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);
 }
index ecaae3e..6ef1477 100644 (file)
@@ -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___ */