A quick question about DLL's

Started by
1 comment, last by ParadigmShift 19 years ago
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
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.
-Mike
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
"E-mail is for geeks and pedophiles." -Cruel Intentions

This topic is closed to new replies.

Advertisement