Browse Source

modify line warning

georges 25 years ago
parent
commit
e7c94bfa9a
1 changed files with 5 additions and 2 deletions
  1. 5 2
      panda/src/dxgsg/dxGraphicsStateGuardian.cxx

+ 5 - 2
panda/src/dxgsg/dxGraphicsStateGuardian.cxx

@@ -990,8 +990,11 @@ draw_line(const GeomLine* geom) {
 #endif
 
 #ifdef _DEBUG
-     if(geom->get_width()!=1.0f) {
-         dxgsg_cat.error() << "DX does not support drawing lines with a non-1.0 pixel width!!\n";
+     static BOOL bPrintedMsg=FALSE;
+
+     if(!bPrintedMsg && (geom->get_width()!=1.0f)) {
+         bPrintedMsg=TRUE;
+         dxgsg_cat.warning() << "DX does not support drawing lines with a non-1.0 pixel width, setting width to 1.0!\n";
      }
 #endif