It seems to do all the window creating itself, well at least on windows i havnt tested it on linux yet, since my linux box is in several pieces on the floor :s

I am hoping it deals with these things, it will save myself from a lot extra debuging, and headaches :roll:

What i have done is all the systems within the engine are in seperate units with their own initialization code, so for example the particle systems is in XParticleSystems.pas, with a TList class that holds all the particle systems, this is created and destroyed in the initialization and finalization of the unit, i have placed a log event in every unit that does this, how ever for seem reason the units get initialized at different times not matter where i put the uses clause in the dpr, for example in both the projects i have:

Code:
uses
  XParticleSystems,
  XLightmaps,
....
  XModels;
how ever in the log, in 1 of the projects it would say that the models class was created first, but in another project it would say the lightmaps was created first, for this reason i spent 2 weeks debuging, due to several access violations, because for example the models unit uses a class that gets created in the lightmaps unit.

I found this same problem was why one of my attempts of creating the window manually failed, because it was creating the window before initializing OpenGL.

My engine seems to be riddled with little bugs that jump out of no where :s
last week i rewrote my engine, so that its no longer built within a library, for some reason i had a for loop within the render procedure that always violated the array range, how ever i never got an error about this until a month later when i started on the particle system..

I will take your advice about the verbose log, thanks it would help in the long run.