diff --git a/include/osg/Drawable b/include/osg/Drawable
index 60a78c126..934003ae9 100644
--- a/include/osg/Drawable
+++ b/include/osg/Drawable
@@ -22,7 +22,13 @@ class Vec2;
class Vec3;
class Vec4;
+// this is define to alter the way display lists are compiled inside the
+// the draw method, it has been found that the NVidia drivers fail completely
+// to optimize COMPILE_AND_EXECUTE in fact make it go slower than for no display
+// lists, but optimize a seperate COMPILE very well?! Define it as default
+// the use of a sperate COMPILE, then glCallList rather than use COMPILE_AND_EXECUTE.
+#define USE_SEPERATE_COMPILE_AND_EXECUTE
/** Pure virtual base class for drawable Geometry. Contains no drawing primitives
directly, these are provided by subclasses such as GeoSet. State attributes
@@ -232,10 +238,19 @@ inline void Drawable::draw(State& state)
}
else if (_useDisplayList)
{
+#ifdef USE_SEPERATE_COMPILE_AND_EXECUTE
+ globj = glGenLists( 1 );
+ glNewList( globj, GL_COMPILE );
+ drawImmediateMode(state);
+ glEndList();
+
+ glCallList( globj);
+#else
globj = glGenLists( 1 );
glNewList( globj, GL_COMPILE_AND_EXECUTE );
drawImmediateMode(state);
glEndList();
+#endif
}
}
diff --git a/index.html b/index.html
index c67d010fd..383611c70 100644
--- a/index.html
+++ b/index.html
@@ -226,6 +226,35 @@ CodeWarroir's Make/Workspace files for Mac.