Page 1 of 1

Using MFC on Windows with celestia

Posted: 17.11.2003, 15:15
by alexibu
Hi,
I am trying to get the celestia core to work in a Windows application using MFC.
Problem : The performance of celestia is really bad - about 4 fps instead of the 20 + fps in the celestia application - on a pentium 4 ? GHz.
The problem is not to do with graphics because even the initialisation runs slowly - loading all the databases etc.
I suspect that this is because MFC seems to force you to link against thread safe standard libraries. I cant seem to get the project to link if I dont use the thread safe libraries either.
I notice that Celestia doesn't use the MFC, and also links against non thread safe standard libraries.
Can anyone confirm that this is the problem - or suggest other problems that it might be ?

The solutions I have come up with are :
    - Put Celestia into a DLL or ActiveX Control and use non thread safe libs. (ATL will probably cause similar probs, and it will be ugly having to expose any bits of the engine that I want to use)
    - Abandon MFC, and write everything from scratch like celestia.
:?:

Posted: 21.11.2003, 04:14
by chris
I doubt that the problem is thread-safe libraries . . . They shouldn't cause that much of a slowdown, particularly since Celestia's performance is generally computation or rendering limited, rather than being tied to library calls.

Do you have VTune or some other profiling tool?

--Chris