From 1af93fbfe4c8cfa214331d2d96327637ffe749bf Mon Sep 17 00:00:00 2001 From: Comment Date: Fri, 16 Aug 2013 00:56:32 +0100 Subject: adding render log --- rotord/src/cvimage.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'rotord/src/cvimage.h') diff --git a/rotord/src/cvimage.h b/rotord/src/cvimage.h index feb7298..4921f78 100644 --- a/rotord/src/cvimage.h +++ b/rotord/src/cvimage.h @@ -93,12 +93,17 @@ namespace Rotor { int getStride(){ return w*3; } + bool clear(){ + rgb.setTo(0); + }; bool setup(int _w,int _h){ //set up with internal data - rgb.create(_h,_w,CV_8UC3); - RGBdata=rgb.data; //can move to use the bare pointer eventually - ownsRGBdata=false; //will not be necessary - w=_w; - h=_h; + if (w!=_w|h!=h){ + rgb.create(_h,_w,CV_8UC3); + RGBdata=rgb.data; //can move to use the bare pointer eventually + ownsRGBdata=false; //will not be necessary + w=_w; + h=_h; + } return true; /* if (w!=_w||h!=_h||!ownsRGBdata||!ownsAdata||!ownsZdata){ -- cgit v1.2.3