Although VRML/X3D model already provides the tree (graph of VRML/X3D nodes), it's a little too complicated to be used at each render call. It's especially true for VRML <= 1.0 (where properties may "leak out" from one node to the next), VRML/X3D >= 2.0 cleaned a lot here but still some work must be done when traversing (like accumulating transformations).
Enumerate all single texture nodes (possibly) used by the shapes. This looks into all shapes (not only active, so e.g. it looks into all Switch/LOD children, not only the chosen one).
This looks into the Appearance.texture field (and if it's MultiTexture, looks into it's children). Also it looks into shaders textures. Also, for VRML 1.0, looks into LastNodes.Texture2.
function DebugInfo(const Indent: string = ''): string; virtual; abstract;