<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<STYLE>
BLOCKQUOTE {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; MARGIN-LEFT: 2em
}
OL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
UL {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
P {
        MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px
}
BODY {
        LINE-HEIGHT: 1.5; FONT-FAMILY: ΢ÈíÑźÚ; COLOR: #000000; FONT-SIZE: 10.5pt
}
</STYLE>
<META name=GENERATOR content="MSHTML 8.00.7600.16912"></HEAD>
<BODY style="MARGIN: 10px">
<DIV>
<DIV>Hi:</DIV>
<DIV> I want to use OpenGL with VTK. For example, I want to
draw a line with OpenGL like this:</DIV>
<DIV>
glBegin (GL_LINES);
<DIV>
glColor3f(1.0,0.0,0.0);</DIV>
<DIV>
glVertex2f (-2.5, 2.5);</DIV>
<DIV>
glVertex2f (2.5, -2.5);</DIV>
<DIV>
glEnd ();</DIV>
<DIV> And I want to render and display it with VTK classes, like
vtkRenderer and vtkRenderWindow. But I don't know how to deal with it.</DIV>
<DIV> The following codes can't work;</DIV>
<DIV><PRE><I style="FONT-FAMILY: @΢ÈíÑźÚ"> <SPAN style="FONT-STYLE: normal"> renWin->Render();
</SPAN></I><I style="FONT-STYLE: normal; FONT-FAMILY: @΢ÈíÑźÚ"> glBegin (GL_LINES);
</I><I style="FONT-STYLE: normal; FONT-FAMILY: @΢ÈíÑźÚ"> glVertex2f (-2.5, 2.5);
</I><I style="FONT-STYLE: normal; FONT-FAMILY: @΢ÈíÑźÚ"> glVertex2f (2.5, -2.5);
</I><I style="FONT-STYLE: normal; FONT-FAMILY: @΢ÈíÑźÚ"> glEnd ();
</I><I style="FONT-STYLE: normal; FONT-FAMILY: @΢ÈíÑźÚ"> iren->Start();</I></PRE><PRE><FONT face=@΢ÈíÑźÚ> Can you give me some examples and details? Thank you very much!</FONT></PRE><PRE><FONT face=@΢ÈíÑźÚ>Sangma Xie</FONT></PRE></DIV></DIV></DIV>
<DIV> </DIV>
<HR style="WIDTH: 210px; HEIGHT: 1px" align=left color=#b5c4df SIZE=1>
<DIV><SPAN>sangmaxie<SPAN
style="FONT-STYLE: italic; FONT-FAMILY: Microsoft Sans Serif; COLOR: #969696; FONT-SIZE: 10.5pt">
via foxmail</SPAN></SPAN></DIV></BODY></HTML>