The Correct Usage of DLLs with a DirectX Game?
Posted
by
smoth190
on Game Development
See other posts from Game Development
or by smoth190
Published on 2011-11-19T03:48:45Z
Indexed on
2011/11/19
10:16 UTC
Read the original article
Hit count: 279
I'm using DirectX 10 (in C++) to make a game engine, and a test driver program on top of it.
Now that I've written many messy rough drafts of an engine, I want to make the final (or sorta final) clean version. I choose to follow how I've seen other engines do it, and that's to have all the core nasty messy crap in a DLL, and then you can create games with just a few functions (well, not really :D).
However, I'm unsure of what nasty messy crap to put in that DLL. I don't know about speed restrictions with DLLs. What I've done is put my winproc in the DLL, and have a class that takes the messages, and sends them through to the program using the DLL. Then that program does what it needs to do, and calls a rendering functions back in the DLL that renders everything.
Only problem is it gets very low FPS (2, to be exact...). I've looked through everything, and I don't know if the way I'm using DLLs in causing this, or its something different.
Whether it's the DLLs or not, I still want to know how to use a DLL correctly with a game engine. I like being neat, I hate having to see all those long names of DirectX classes. I use typedef a lot.
© Game Development or respective owner