C++ Common Architecture questions

Firstly, precompiled headers are new to me. If a project is set up to use one, does that mean that each new .cpp file must include it Does it also mean I need to #include and re-build the .pch each time I add a new header file

Secondly... after updating the August sdk with the December 2005 release, the fps count in a project was capped at 60. While that's not a problem, ( as I understand that's ideal ), I did use fps as a gauge for performance impact as the project grew. Is there a way to disable this cap

Overall, I think the new common architecture is very nice, but I'm finding building projects with it a bit frustrating due to this method of includes.

Any help or advice would be appreciated.






Answer this question

C++ Common Architecture questions

  • Boise83716

    DarkSkies wrote:
    Firstly, precompiled headers are new to me. If a project is set up to use one, does that mean that each new .cpp file must include it
    Yes. You'll get a compile error for any translation units that don't include the PCH.

    DarkSkies wrote:
    Does it also mean I need to #include and re-build the .pch each time I add a new header file
    Yes, but the compiler should handle that for you. If you change the PCH header file it should trigger a "rebuild all" event.

    Bare in mind that PCH's offer no additional functionality - they just improve build times for large projects. If you're finding the process difficult to manage/understand then you could drop it. I'm developing a (currently) 40,000 lines C++ project spread over several hundred source code files - a complete rebuild takes ~2 minutes. Most builds (with changes restricted to a few files) take 10-15 seconds. It's not really the end of the world if you have to wait that long. It's when you're dealing with 100's of 1000's of lines spread over 1000's of files and build times in the > 10 minutes (or hours) that it really matters...

    DarkSkies wrote:
    after updating the August sdk with the December 2005 release, the fps count in a project was capped at 60. While that's not a problem, ( as I understand that's ideal ), I did use fps as a gauge for performance impact as the project grew. Is there a way to disable this cap
    What you're seeing is almost certainly "Vertical Synchronisation" - VSYNC. You can hint for it's removal in the code by setting the "presentation interval" in the "presentation parameters" structure you pass to Createdevice(). In the SDK sample code you can hit F2 and select it from the drop-down's.

    It's worth noting that NV/ATI drivers allows users to override this in ways that are difficult (or impossible) to detect via the application code. Gotta love them for that

    hth
    Jack



  • Duncan Woods

    Thanks a million, very helpful.

  • C++ Common Architecture questions