Jump to content
  • Advertisement
Sign in to follow this  
Leviathan3328

A quick question about DLL's

This topic is 4887 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hey guys I have been recently playing around with rendering abstraction and the way I have it set up right now is my rendering code is hidden behind a common interface with all the rendering code behind a DLL that are dynamicaly linked to the application. The main application will get a pointer to a rendering window and then can manipulate it from there. My question is why am I getting a CPU usage of 0? All my application is doing right now is running a message pump and using the pointers to the rendering windows to clear them to blue but I would expect there to be CPU usage, is any work done with DLLs not reflected in the appliactions CPU usage and instead in System Idle Process? The second I turn off my rendering code and just let the message pump do its thing I will see 99% usage. I am guessing this is the reason but why they would do it that way doesnt make sense to me. Also the last question I have is how much of a hit performance wise do you take from calling interfaces that are behind a DLL? From what I understand its slight. Thanks

Share this post


Link to post
Share on other sites
Advertisement
DLL's don't effect your process cpu statistics. Maybe your rendering engine is tied to the frame rate and the driver is waiting on your behalf for the end of the frame.

The cost of calling a function in a DLL is roughly the same as the cost of calling a virtual function in C++. Don't worry about it.

Share this post


Link to post
Share on other sites
I think Mike is right. If you just run your loop it consumes a lot of CPU cycles, but when you call your buffer swap function it probably waits for vblank, freeing up the CPU.

Tom

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!