From 5d4f9e03dfdf9d39b24a1cf5a1682a1e2500ee54 Mon Sep 17 00:00:00 2001 From: David Rose Date: Sat, 28 Oct 2000 00:03:04 +0000 Subject: [PATCH] *** empty log message *** --- panda/src/dxgsg/dxGraphicsStateGuardian.cxx | 3 ++- panda/src/wdxdisplay/wdxGraphicsWindow.cxx | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx index 2ab3be41d9..5abf5e2b2b 100644 --- a/panda/src/dxgsg/dxGraphicsStateGuardian.cxx +++ b/panda/src/dxgsg/dxGraphicsStateGuardian.cxx @@ -1278,7 +1278,8 @@ draw_prim_setup(const Geom *geom) // If we have per-vertex colors or normals, we need smooth shading. // Otherwise we want flat shading for performance reasons. - if (perVertex & (PerColor | PerNormal)) + if (perVertex & ((wants_colors() ? PerColor : 0) | + (wants_normals() ? PerNormal : 0))) _d3dDevice->SetRenderState(D3DRENDERSTATE_SHADEMODE, D3DSHADE_GOURAUD); else _d3dDevice->SetRenderState(D3DRENDERSTATE_SHADEMODE, D3DSHADE_FLAT); diff --git a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx index 42328c149e..795fe99576 100644 --- a/panda/src/wdxdisplay/wdxGraphicsWindow.cxx +++ b/panda/src/wdxdisplay/wdxGraphicsWindow.cxx @@ -506,6 +506,7 @@ wdxGraphicsWindow(GraphicsPipe* pipe, const // Description: //////////////////////////////////////////////////////////////////// wdxGraphicsWindow::~wdxGraphicsWindow(void) { + AtExitFn(); #ifdef WBD_GL_MODE free(_visual); #endif //WBD_GL_MODE