GetPoint.OnDynamicDraw with shadows

Hi all,
I’m seeing something unexpected when deriving a class from Rhino.Input.Custom.GetPoint to override the OnDynamicDraw() method.
If the shadows are on, the solids show black sides.

but all is fine without shadows

Here is the sample script that draws the cylinder

import Rhino
import System

def main(): 
  gep = GetPushPullPoint()
  gep.AcceptNothing( True )
  gep.SetCommandPrompt( '... Testing ...' )

class GetPushPullPoint( Rhino.Input.Custom.GetPoint ):

  def OnDynamicDraw( self, eventargs ):
    brep = Rhino.Geometry.Brep.CreateFromCylinder(
        Rhino.Geometry.Cylinder( Rhino.Geometry.Circle( 100 ), 100 ),
        True, True )
    color = System.Drawing.Color.Cyan
        brep, Rhino.Display.DisplayMaterial( color ) )


Is there a way to avoid that ?
Am I missing something ?

No, you are not missing anything, and no there is no way to avoid this.

Dynamic drawing does not support any sort of depth buffering. So, you are not going to get any shadows, as this requries depth buffering.

Dale … just trying to understand a little more …
OK, I don’t get proper shadows, but I do get black vertical surfaces, so I guess that turning on shadows has some kind of effect on the way the objects are drawn in dynamic drawing. Is this correct ?

The bottom line is that you should not be drawing anything shaded in a dynamic draw operation. To get it correct is too time consuming for dynamic drawing…

OK, thanks for the info !