This example project demonstrates how to draw shaded and textured polygons to the viewport from a custom Ruby tool.
It will draw the faces in the root of the model offset to the left using the currently selected material.
This requires SketchUp 2020.0 or newer.