Skip to main content
gamedev.net
🔒 Locked

plugins,dll and performance

Started by b3rs3rk Aug 13, 2006 at 7:10 PM 0 replies 450+ views
Original Post
b3rs3rk
b3rs3rk
i'm starting to develop a plugin system for my shader manager in my engine, and i'm wondering if there are some perfomance issues. In a nutshell, i've planned to use a dll for every shader i have, this way i can write custom binding function for every shader, using the same syntax (something like void Bind(); veeeery simple :D ) and so on. This way, when i've to use a shader, i get the bind function handler from the dll with GetProcAddress and simply call it. Of course i'll use GetProcAddress at loading time and store the pointer, so i don't have to call it every frame... but there are the same performance problems or other relevant things to consider?
ApochPiQ
ApochPiQ
In general function pointers should not be a significant detriment to performance unless you're using them to extremes (e.g. tens of thousands of times per frame). Since every program's performance needs are different, it's impossible for anyone to give you an accurate and general-case answer. The best way to find out is to implement it and profile it to see if it actually causes trouble for your particular code base.

Chances are you won't have a problem unless you're at extremes either for the amount of calls made via function pointers, or very low hardware specs.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.