Original Post
I'm currently designing my very first DirectX project, a rather simple graphics engine. Right now I'm working on the lighting system, and I would like to know if the method I'm using for representing lights is efficient: Currently I created a generic light class, which contains all the data required by a direct3D light source. This is the data that is handled throughout the engine. When it comes to rendering, the ID of this light source is sent to the video handler, where there is a linked list of all the registered light sources. Once the handler finds the light within the list, it will put it in its assigned spot within the D3DLIGHT9 array, which contains room for 8 light sources. The video handler takes care to transform the engine light data into direct3D light data, and then put the converted light into the array. Am I using an inefficient method? Am I working too much? Any comments would be appreciated.