warning fix: abort program and spit out a message if getNumPrims() is called with unknown mode. (Shouldn't happen anyway)

This commit is contained in:
torsten
2009-08-20 11:09:37 +00:00
committed by Tim Moore
parent 9cb15b302c
commit a3e391a523

View 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;