On 25 June 2010 18:07, Misha Koshelev misha680@gmail.com wrote:
So here is why I thought maybe having a separate shape.c file might be good. I am very new to D3DX9 so please pardon my ignorance, but simply looking at SDK, I see:
i) http://msdn.microsoft.com/en-us/library/bb172976%28v=VS.85%29.aspx Shape Drawing Functions are all defined in "D3dx9shape.h"
whereas http://msdn.microsoft.com/en-us/library/bb172973%28v=VS.85%29.aspx Mesh Functions are all defined in "D3dx9mesh.h"
This is not a reason to implement shape drawing functions in a separate file _per se_, but additionally:
ii) all the tests in mesh.c do not rely on CreateWindow calls or Direct3DCreate9 calls whereas those for shape functions inherently will (like line.c)
Thus, since I'm going to try to focus on d3dx9 stuff (hope code-freeze is over July 4th), it seems like it might be good to have a separate file.
What is the argument for keeping them all in the mesh file besides that they are mesh creation functions?
Essentially that there's no convincing reason not to. It's only a handful of functions, clearly related to the mesh functions, so you can't justify it with reasons like prohibitive source file size or being clearly distinct functionality. Also, Wine as a project has a preference of fewer large files over lots of small ones. You can make good arguments for that in terms of e.g. ease of editing and keeping a good overview of things, but if nothing else you can simply consider it project policy.