[vtkusers] vtkImageMapper error
John Biddiscombe
john.biddiscombe at mirada-solutions.com
Mon Apr 7 06:23:09 EDT 2003
Neil,
>>
Under Linux indeed this changed the behaviour to something
more sensible.
<<
Good.
>>
Under Solaris I still get a Bus Error, even with this new code.
Do you have the opportunity to try it under Solaris ?
>>
Hmmmm. I'm afraid I haven't touched a solaris box for a long time and can't get a hold of one easily. Can you step through the imagemapper code and see where the error happens? Does it happen every time or just when the window becomes zero sized or anything like that? The only thing that the RenderToRectangle code really does is insert an additional glPixelZoom( float,float) call before the draw and then glPixelZoom( 1.0, 1.0) afterwards.
if (self->GetRenderToRectangle())
{
int rectwidth = (actorPos2[0] - actorPos[0]) + 1;
int rectheight = (actorPos2[1] - actorPos[1]) + 1;
float xscale = (float)rectwidth/width;
float yscale = (float)rectheight/height;
glPixelZoom(xscale, yscale);
}
is really it. width and height are the (visible) image dimensions and are wrong when the image is cropped - that's the bug you have just found - can you see if they are becoming zero at any point. possibly some bug in unrelated code is causing a div by zero or something. can you try inserting a check wherever you see the above lines? (they appear many times in vtkopenglimagemapper)
JB
PS why solaris and nothing else?
More information about the vtkusers
mailing list