]> git.mxchange.org Git - simgear.git/commitdiff
warning fix: abort program and spit out a message if getNumPrims() is called with...
authortorsten <torsten>
Thu, 20 Aug 2009 11:09:37 +0000 (11:09 +0000)
committerTim Moore <timoore@redhat.com>
Sun, 23 Aug 2009 19:37:02 +0000 (21:37 +0200)
simgear/scene/util/PrimitiveUtils.cxx

index b2f14c1cf0a3f9e951b39a89ab0dcd47e01e76de..2038a40d8fc2413326b675bc4d232e3e6a7f7d7d 100644 (file)
@@ -20,7 +20,7 @@
  */
 
 #include "PrimitiveUtils.hxx"
-
+#include <iostream>
 using namespace osg;
 
 namespace
@@ -302,6 +302,9 @@ protected:
             return count - 2;
         case GL_QUAD_STRIP:
             return (count - 2) / 2;
+        default:
+            std::cerr << "FATAL: unknown GL mode " << mode << std::endl;
+            throw new std::exception();
         }
     }
     unsigned _primitiveIndex;