Add type checks to OpenGLRenderInterface.

draw() and compileList() no longer assume the input Shape is a
ShapeMesh.