Original Post
So, the base of my graphics engine has been completed. I can successfully create and render all the various objectes needed in an engine. The next logical step of course, is then to write a plugin, so i can export data from a 3d program (Maya) to my engine. Here's the issue: What is the better path to choose when writing a resuble interface for import/export of a 3d scene? Two options have I've come up with: 1) Go oldschool: Have the plugin directly write the data to the file. Pros: Fast & easy. Doesn't require engine/game interfaces. Cons: Doesn't allow for 'unified' file IO. Easy to cause errors. 2) Create a 'write' method for my scene class (read already exists) Pros: Unified IO. All plugins just add data to the scene, scene writes it. Easy to make changes that effect multiple plugins. Cons: Would need to create "accessor" classes to get to needed data for each type (primitive, texture etc). All plugins would have to minimally load the graphics engine in order to get the operational handles. Now, i'm really wondering which is the lesser of the two evils here. On one hnd, you've got a fast solution, but requires alot of upkeep in the longrun. and at the same time, doesn't require alot of interfacing with the engine. While on the other hand, you've got alot of work up front, low upkeep in the long run, but a HELL of a lot of code for accessor functions. Also, there's the fact that each plugin will have to load a minimal device from the engine in order to create the objects. I was wondering if anyone has thoughts on this, or if you would like to comment. ~Main