THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/10/2004 at 09:43, xxxxxxxx wrote:
Well, for future interest the answer to part (a) is a simple hack as follows:
Make a struct like this:
struct ProgressData {
LONG count; //iterator
Real height; //real to save conversion time
};
then where you're going to do your render:
ProgressData mydata;
mydata.height=mybmp->GetBh();
mydata.count=0;
if (RenderDocument(mydoc,myrendersettings,myprogresshook,&mydata;,mybmp,RENDERFLAG_PREVIEWRENDER | RENDERFLAG_NODOCUMENTCLONE, mythread)!=RAY_OK) return FALSE;
then in your progresshook just do the following
//-------------------------------
//ignore p as it's not filled without RENDERFLAG_EXTERNAL!!!
void myprogresshook(Real p,void* pd) {
ProgressData *mydata=(ProgressData* )pd;
mydata->count++;
StatusSetBar(floor((mydata->count/mydata->height)*100.0));
}
Now i guess i'll have to look into working out how to exactly get the bitmap the right shape/size and camera offset right to compensate for the aspect ratio problems whilst retaining the resolution for the section that needs to be rendered correctly. Currently if I touch camera offset, even setting it to 0.0 it seems modify the camera in quite unexpected and undesirous ways :/