Commit bc47058c authored by Ken Martin's avatar Ken Martin

Some X window fixes and make two slow tests faster

parent e321b129
......@@ -164,6 +164,7 @@ vtkglX::GLXFBConfig* vtkXOpenGLRenderWindowTryForFBConfig(Display *DisplayId,
if (doublebuff)
{
attributes[index++] = GLX_DOUBLEBUFFER;
attributes[index++] = True;
}
if (stencil)
{
......@@ -174,6 +175,7 @@ vtkglX::GLXFBConfig* vtkXOpenGLRenderWindowTryForFBConfig(Display *DisplayId,
{
// also try for STEREO
attributes[index++] = GLX_STEREO;
attributes[index++] = True;
}
if (multisamples)
{
......@@ -221,6 +223,7 @@ XVisualInfo *vtkXOpenGLRenderWindowTryForVisual(Display *DisplayId,
if (doublebuff)
{
attributes[index++] = GLX_DOUBLEBUFFER;
attributes[index++] = True;
}
if (stencil)
{
......@@ -231,6 +234,7 @@ XVisualInfo *vtkXOpenGLRenderWindowTryForVisual(Display *DisplayId,
{
// also try for STEREO
attributes[index++] = GLX_STEREO;
attributes[index++] = True;
}
if (multisamples)
{
......
......@@ -80,11 +80,11 @@ int TestVBOPLYMapper(int argc, char *argv[])
cerr << "first render time: " << firstRender << endl;
timer->StartTimer();
int numRenders = 85;
int numRenders = 8;
for (int i = 0; i < numRenders; ++i)
{
renderer->GetActiveCamera()->Azimuth(1);
renderer->GetActiveCamera()->Elevation(1);
renderer->GetActiveCamera()->Azimuth(10);
renderer->GetActiveCamera()->Elevation(10);
renderWindow->Render();
}
timer->StopTimer();
......
......@@ -160,6 +160,7 @@ GLXFBConfig* vtkXOpenGLRenderWindowTryForFBConfig(Display *DisplayId,
if (doublebuff)
{
attributes[index++] = GLX_DOUBLEBUFFER;
attributes[index++] = True;
}
if (stencil)
{
......@@ -170,6 +171,7 @@ GLXFBConfig* vtkXOpenGLRenderWindowTryForFBConfig(Display *DisplayId,
{
// also try for STEREO
attributes[index++] = GLX_STEREO;
attributes[index++] = True;
}
if (multisamples)
{
......@@ -708,12 +710,6 @@ void vtkXOpenGLRenderWindow::DestroyWindow()
if (this->Internal->ContextId)
{
/* first delete all the old lights */
for (short cur_light = GL_LIGHT0; cur_light < GL_LIGHT0+MAX_LIGHTS; cur_light++)
{
glDisable(static_cast<GLenum>(cur_light));
}
glFinish();
glXDestroyContext(this->DisplayId, this->Internal->ContextId);
}
......
2bdeeb7de22c7fee671c13c9051344e0
b076ea879c259729c3296f589a2c3668
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