[vtkusers] Fog ?
Schaap, J.A. (LKEB)
J.A.Schaap at lumc.nl
Tue Mar 19 03:03:52 EST 2002
First set up the renderwindow as usual, like:
vtkRenderer *ren = vtkRenderer::New();
vtkRenderWindow *renWindow = vtkRenderWindow::New();
renWindow->AddRenderer(ren);
renWindow->Render();
Then make the OpenGL call, like:
glEnable(GL_FOG);
glFogf(GL_FOG_MODE, GL_EXP2); //use a nice exp2 mode
glFogf(GL_FOG_DENSITY, 0.2); // you can vary the density
And then just continue to set up your rendering pipeline.
You can switch on and off the fog, but make sure that the renderwindow is the current window by calling renWindow->Render(); and then glEnable(GL_FOG); or glDisable(GL_FOG);
Good luck!
Jorrit
18-3-2002 21:46:28, Karl Krissian <karl at bwh.harvard.edu> wrote:
>
>
> From: Karl Krissian <karl at bwh.harvard.edu>
>
> To: vtkusers at public.kitware.com
> Subject:[vtkusers] Fog ?
> Date: Mon, 18 Mar 2002 15:46:28 -0500
>
>
>
> Dear VTK users,
>
> I am a new VTK user
> and I would like to know if there is an elegant way to
> use the OpenGL fog effect with vtk 3.2.
>
>
> Thanks
>
> --
> Karl Krissian
> http://splweb.bwh.harvard.edu:8000/pages/ppl/karl
> Tel: (+1) 617-842-7778
> Fax: (+1) 617-264-6887
More information about the vtkusers
mailing list