Commit 70e24cb8 authored by Ken Martin's avatar Ken Martin
Browse files

no backlight

parent b240d9d7
......@@ -100,14 +100,6 @@ public:
vtkSetVector3Macro(Ambient,float);
vtkGetVectorMacro(Ambient,float,3);
// Description:
// Turn on/off whether objects are lit from behind with another light.
// If backlighting is on, for every light that is created, a second
// opposing light is created to backlight the object.
vtkSetMacro(BackLight,int);
vtkGetMacro(BackLight,int);
vtkBooleanMacro(BackLight,int);
// Description:
// Set/Get the amount of time this renderer is allowed to spend
// rendering its scene. Zero indicates an infinite amount of time.
......@@ -201,7 +193,6 @@ protected:
vtkActorCollection Actors;
float Ambient[3];
float Background[3];
int BackLight;
vtkRenderWindow *RenderWindow;
float DisplayPoint[3];
float ViewPoint[3];
......
......@@ -87,18 +87,7 @@ void vtkGlrLight::Render(vtkLight *lgt, vtkGlrRenderer *ren,int light_index)
light_info[6] = -dy;
light_info[7] = -dz;
vtkDebugMacro(<< "Defining front light\n");
vtkDebugMacro(<< "Defining light\n");
lmdef(DEFLIGHT, light_index, 0, light_info);
// define another mirror light if backlit is on
if (ren->GetBackLight())
{
light_info[5] = dx;
light_info[6] = dy;
light_info[7] = dz;
vtkDebugMacro(<< "Defining back light\n");
lmdef(DEFLIGHT, light_index + 1, 0, light_info);
}
}
......@@ -153,15 +153,6 @@ int vtkGlrRenderer::UpdateLights ()
// increment the current light by one
cur_light++;
count++;
// and do the same for the mirror source if backlit is on
// and we aren't out of lights
if ((this->BackLight > 0.0) &&
(cur_light < (LIGHT0+MAX_LIGHTS)))
{
lmbind(cur_light,cur_light);
// if backlighting is on then increment the current light again
cur_light++;
}
}
}
......
......@@ -81,12 +81,6 @@ void vtkOglrLight::Render(vtkLight *lgt, vtkOglrRenderer *ren,int light_index)
glLightfv((GLenum)light_index, GL_DIFFUSE, color);
glLightfv((GLenum)light_index, GL_SPECULAR, color);
if( ren->GetBackLight())
{
glLightfv((GLenum)(light_index+1), GL_DIFFUSE, color);
glLightfv((GLenum)(light_index+1), GL_SPECULAR, color);
}
// define the light source
if (!lgt->GetPositional())
{
......@@ -95,15 +89,6 @@ void vtkOglrLight::Render(vtkLight *lgt, vtkOglrRenderer *ren,int light_index)
Info[2] = -dz;
Info[3] = 0.0;
glLightfv((GLenum)light_index, GL_POSITION, Info );
// define another mirror light if backlit is on
if (ren->GetBackLight())
{
Info[0] = dx;
Info[1] = dy;
Info[2] = dz;
Info[3] = 0.0;
glLightfv((GLenum)(light_index + 1), GL_POSITION, Info );
}
}
else
{
......
......@@ -155,16 +155,6 @@ int vtkOglrRenderer::UpdateLights ()
// increment the current light by one
cur_light++;
count++;
// and do the same for the mirror source if backlit is on
// and we aren't out of lights
if ((this->BackLight > 0.0) &&
(cur_light < (GL_LIGHT0+MAX_LIGHTS)) &&
((!light->GetPositional())))
{
glEnable((GLenum)cur_light);
// if backlighting is on then increment the current light again
cur_light++;
}
}
}
......
......@@ -79,7 +79,6 @@ vtkRenderer::vtkRenderer()
this->Viewport[2] = 1;
this->Viewport[3] = 1;
this->BackLight = 1;
this->AllocatedRenderTime = 0;
this->Aspect[0] = this->Aspect[1] = 1.0;
......@@ -569,7 +568,6 @@ void vtkRenderer::PrintSelf(ostream& os, vtkIndent indent)
os << indent << "Background: (" << this->Background[0] << ", "
<< this->Background[1] << ", " << this->Background[2] << ")\n";
os << indent << "Back Light: " << (this->BackLight ? "On\n" : "Off\n");
os << indent << "DisplayPoint: (" << this->DisplayPoint[0] << ", "
<< this->DisplayPoint[1] << ", " << this->DisplayPoint[2] << ")\n";
os << indent << "Lights:\n";
......
......@@ -101,19 +101,8 @@ void vtkSbrLight::Render(vtkLight *lgt, vtkSbrRenderer *ren,int light_index)
}
light_flag |= (0x0001 << light_index);
vtkDebugMacro(<< "Defining front light\n");
vtkDebugMacro(<< "Defining light\n");
// define another mirror light if backlit is on and not positional
if (ren->GetBackLight() && !lgt->GetPositional())
{
light_index++;
light_source(fd, light_index, DIRECTIONAL,
color[0], color[1], color[2],
dx, dy, dz);
vtkDebugMacro(<< "Defining back light\n");
light_flag |= (0x0001 << light_index);
}
// update the light switch
light_switch(fd, light_flag);
ren->SetLightSwitch(light_flag);
......
......@@ -824,7 +824,7 @@ void vtkSbrRenderWindow::WindowInitialize (void)
clear_control(this->Fd, CLEAR_DISPLAY_SURFACE | CLEAR_ZBUFFER);
// set back faces of polygons to be rendered same as front
bf_control(this->Fd, FALSE, TRUE);
bf_control(this->Fd, TRUE, FALSE);
// make default polymarker a dot (pixel)
marker_type(this->Fd, 0);
......
......@@ -131,14 +131,6 @@ int vtkSbrRenderer::UpdateLights ()
// increment the current light by one
cur_light++;
count++;
// and do the same for the mirror source if backlit is on
// and we aren't out of lights
if ((this->BackLight > 0.0) &&
(cur_light < MAX_LIGHTS))
{
// if backlighting is on then increment the current light again
cur_light++;
}
}
}
......
......@@ -82,23 +82,6 @@ void vtkXglrLight::Render(vtkLight *lgt, vtkXglrRenderer *ren,int light_index)
XGL_LIGHT_DIRECTION, &direction,
NULL);
vtkDebugMacro(<< "Defining front light\n");
// define another mirror light if backlit is on
if (ren->GetBackLight())
{
direction.x = -direction.x;
direction.y = -direction.y;
direction.z = -direction.z;
/* define the light source */
xgl_object_set(lights[light_index+1],
XGL_LIGHT_TYPE, XGL_LIGHT_DIRECTIONAL,
XGL_LIGHT_COLOR, &light_color,
XGL_LIGHT_DIRECTION, &direction,
NULL);
vtkDebugMacro(<< "Defining back light\n");
}
vtkDebugMacro(<< "Defining light\n");
}
......@@ -134,15 +134,6 @@ int vtkXglrRenderer::UpdateLights ()
// increment the current light by one
cur_light++;
count++;
// and do the same for the mirror source if backlit is on
// and we aren't out of lights
if ((this->BackLight > 0.0) &&
(cur_light < VTK_MAX_LIGHTS))
{
xglr_switches[cur_light] = TRUE;
// if backlighting is on then increment the current light again
cur_light++;
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment