<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4207.2601" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT size=2>Oops, I forgot to insert the program, sorry.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Here it is:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>void main( int argc, char *argv[] )<BR>{<BR> // create a
rendering window and renderer<BR> vtkRenderer *ren_upper =
vtkRenderer::New();<BR> vtkRenderer *ren_lower =
vtkRenderer::New();<BR>
ren_upper->SetViewport(0,0.5,1.0,1.0);<BR>
ren_lower->SetViewport(0,0,1,0.5);<BR> <BR> vtkRenderWindow
*renWindow = vtkRenderWindow::New();<BR>
renWindow->AddRenderer(ren_upper);<BR>
renWindow->AddRenderer(ren_lower);<BR> renWindow->SetSize( 300, 300
);<BR> vtkRenderWindowInteractor *iren =
vtkRenderWindowInteractor::New();<BR>
iren->SetRenderWindow(renWindow);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // create an actor and give it cone geometry<BR>
vtkVectorText *text = vtkVectorText::New();<BR>
text->SetText("1");<BR> vtkPolyDataMapper *textMapper =
vtkPolyDataMapper::New();<BR>
textMapper->SetInput(text->GetOutput());<BR> vtkActor *textActor =
vtkActor::New();<BR>
textActor->SetMapper(textMapper);<BR>
textActor->SetPosition(100.25,100.25,100.25);<BR>
textActor->SetScale(0.5,0.5,0.5);</FONT></DIV>
<DIV><FONT size=2>
textActor->GetProperty()->SetColor(0,0,1.0);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> vtkSphereSource *sphere =
vtkSphereSource::New();<BR>
sphere->SetCenter(100,100,100);<BR>
sphere->SetRadius(0.5);<BR> vtkPolyDataMapper *sphereMapper =
vtkPolyDataMapper::New();<BR>
sphereMapper->SetInput(sphere->GetOutput());<BR> vtkActor
*sphereActor = vtkActor::New();<BR>
sphereActor->SetMapper(sphereMapper);<BR>
sphereActor->GetProperty()->SetColor(1.0,0,0);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> vtkVectorText *text2 =
vtkVectorText::New();<BR> text2->SetText("2");</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> vtkPolyDataMapper *textMapper2 =
vtkPolyDataMapper::New();<BR>
textMapper2->SetInput(text2->GetOutput());<BR> vtkActor *textActor2
= vtkActor::New();<BR>
textActor2->SetMapper(textMapper2);<BR>
textActor2->SetPosition(100.25,100.25,100.25);<BR>
textActor2->SetScale(0.5,0.5,0.5);</FONT></DIV>
<DIV><FONT size=2>
textActor2->GetProperty()->SetColor(0,0,1.0);<BR> </FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> vtkSphereSource *sphere2 =
vtkSphereSource::New();<BR>
sphere2->SetCenter(100,100,100);<BR>
sphere2->SetRadius(0.5);<BR> vtkPolyDataMapper *sphereMapper2 =
vtkPolyDataMapper::New();<BR>
sphereMapper2->SetInput(sphere2->GetOutput());<BR> vtkActor
*sphereActor2 = vtkActor::New();<BR>
sphereActor2->SetMapper(sphereMapper2);<BR>
sphereActor2->GetProperty()->SetColor(1.0,0,0);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // assign our actor to the
renderer<BR> ren_upper->AddActor(textActor);<BR>
ren_upper->AddActor(sphereActor);<BR>
ren_lower->AddActor(textActor2);<BR>
ren_lower->AddActor(sphereActor2);</FONT></DIV>
<DIV><FONT size=2> </FONT></DIV>
<DIV><FONT size=2> ren_upper->SetBackground(1,1,1);<BR>
ren_lower->SetBackground(0.8,0.8,0.8);</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> // draw the resulting scene<BR>
renWindow->Render();</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> iren->Start();</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2> </FONT><FONT size=2>// Clean up<BR>
ren_lower->Delete();<BR> ren_upper->Delete();<BR>
renWindow->Delete();<BR> text->Delete();<BR>
textMapper->Delete();<BR> textActor->Delete();<BR>
sphere->Delete();<BR> sphereMapper->Delete();<BR>
sphereActor->Delete();<BR> text2->Delete();<BR>
textMapper2->Delete();<BR> textActor2->Delete();<BR>
sphere2->Delete();<BR> sphereMapper2->Delete();<BR>
sphereActor2->Delete();<BR>}</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<BLOCKQUOTE dir=ltr
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=tarifa@rpi.edu href="mailto:tarifa@rpi.edu">Asad A. Abu-Tarif</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A title=vtkusers@public.kitware.com
href="mailto:vtkusers@public.kitware.com">vtk User List</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, October 18, 2001 4:12
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [vtkusers] Strange response on
Linux</DIV>
<DIV><BR></DIV>
<DIV><FONT size=2>Hi,</FONT></DIV>
<DIV><FONT size=2>I started recently porting the code I've been developing for
2 years</FONT></DIV>
<DIV><FONT size=2>on NT to Linux. So, I'm really new to Linux!!</FONT></DIV>
<DIV><FONT size=2>I compiled and ran the following program on both WinNT and
Linux.</FONT></DIV>
<DIV><FONT size=2>The program runs as expected on NT (a sphere in the upper
renderer</FONT></DIV>
<DIV><FONT size=2>with the number 1 and a white background; and a sphere in
the lower</FONT></DIV>
<DIV><FONT size=2>renderer with the number 2 and a grayish
background).</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>However, when I run it under linux the following
happens:</FONT></DIV>
<DIV><FONT size=2>1) The upper renderer is black (not white) and contains
no actors.</FONT></DIV>
<DIV><FONT size=2>2) The lower renderer is white (not grayish) but has the
correct actors.</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Did anyone encounter such a problem on Linux
before?</FONT></DIV>
<DIV><FONT size=2>I'm using Linux RedHat 6.2 and Mesa 3.1.2</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>Thanks,</FONT></DIV>
<DIV><FONT size=2>Asad</FONT></DIV>
<DIV><FONT size=2>
__________________________________________________<BR>
/
Asad A.
Abu-Tarif
\<BR> | Computer
Engineering.
| <BR> | PhD
Candidate, Rensselaer Polytechnic Institute
(RPI). |</FONT></DIV>
<DIV><FONT size=2> | PhD Thesis:
Multi-Model 3D Registration
|<BR>
\___________________________________________________/
<BR></DIV></BLOCKQUOTE></FONT></BODY></HTML>