Moving graphics engine to DLL project

Started by
12 comments, last by Dawoodoz 13 years, 6 months ago
Well, I havent compiled a dll and linked it to a library, so, hopefully it will work :P


In your header, do this


extern const int NumberOfLights;


In your cpp, define it

const int NumberOfLights = 10;


Then compile your dll, link it to your project, and see if it works.

Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.
Advertisement
That seems more complicated than having to copy the header to a constant shader string because I add values more than I change them.

Can I reach the same header as both a Visual Studio resource and a regular header?
If you are inclined to put everything into a dll, then you must compile it each time something within it changes. So, if you want to "hide" information from people who use your dll, then you will have to recompile it each time to add/change/remove something.

If your code is in a header, everyone can see it or modify it. If its in a cpp file, then you can compile it into your dll. That is really the end of it. Decide what you want to do. If its not convenient to recompile the dll for each change you make, then don't put it into a dll.

It is unnecessary to think you need to rebuild the dll for every little change you make . . . Just build everything using the full source code, and build your dll only when you want to release a build.
Wisdom is knowing when to shut up, so try it.
--Game Development http://nolimitsdesigns.com: Reliable UDP library, Threading library, Math Library, UI Library. Take a look, its all free.
I have configured the solution so that modified modules in the engine DLL is compiled automatically when when starting the testing project.

This topic is closed to new replies.

Advertisement