Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

cruZ

Rendering Code in DLL

This topic is 6233 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

Do I have any performance penalty if I encapsulate my rendering code into a DLL. Or is it better to use lib files which are then compiled together with the application code?

Share this post


Link to post
Share on other sites
Advertisement
A DLL call costs oooooh about 2 cycles more at most, and often 0 cycles more.

A DLL gets loaded into the same address space as your process, all references to it (if loaded at runtime rather than explicitly LoadLibrary()d) get corrected at load time...

...don''t worry about it unless the function in the DLL is being called a lot per frame...

ie. you wouldn''t do:

__declspec(dllexport) DrawAPixel(x,y).........


but its fine to do:

__declspec(dllexport) DrawAModel(...)

--
Simon O''''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
well , i tried last time to make the rendering code
in a DLL , it was fast because i launched a thread in the
DLL and made all the rendering function calles local and not
exported from the DLL..

i had a problem implementing Classes in the DLL
the destructor and constructor had problems..

but if u stick to vanilla C , it shouldnt be a problem ..


{ Stating the obvious never helped any situation !! }

Share this post


Link to post
Share on other sites
There are actually many advantages to use dlls over libs. If you have one for each level then you're not loading the whole game at once, just for the current level.

Edited by - gph-gw on July 21, 2001 4:11:48 PM

Share this post


Link to post
Share on other sites

  • 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!