What I "think" is irrelevant. You haven't provided enough information to demonstrate an actual issue that can be investigated. Only snippets of data written by your own plugin without an example demonstrating that FlexSim's importer is working incorrectly.
And even if you do produce a working example demonstrating an issue, the answer will be that we will add a case to our development list to look into it, and if you want to resolve it in the meantime, then you'll need to adjust your data so that it works with the current importer. Possibly by adjusting your code so that you have one material and set of triangles per mesh.
FlexSim's renderer doesn't support multiple materials per mesh anyways, so it would need to split meshes up by material. You might as well just adjust your plugin to do that directly.
Modern 3D applications don't support the old OpenGL fixed-function pipeline mechanisms of adjusting the material state in the middle of geometry specifications with deprecated glBegin() and glEnd() calls; they use frame buffer objects and vertex buffer objects to optimize the draw calls for the graphics driver.
Are you trying to find a solution or are you just trying to complain?
Phil BoBo
Sr. Manager, Software Development