Using MFC on Windows with celestia

The place to discuss creating, porting and modifying Celestia's source code.
Topic author
alexibu
Posts: 17
Joined: 17.11.2003
With us: 20 years 11 months
Location: Bristol UK

Using MFC on Windows with celestia

Post #1by alexibu » 17.11.2003, 15:15

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.
:?:

chris
Site Admin
Posts: 4211
Joined: 28.01.2002
With us: 22 years 9 months
Location: Seattle, Washington, USA

Post #2by chris » 21.11.2003, 04:14

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


Return to “Development”