Skip to main content
GameDev.net gamedev.net
🔒 Locked

dll creation

Started by biotech Jan 15, 2004 at 12:31 PM 4 replies 900+ views
Original Post
biotech
biotech
did anyone tried to make a dll with all opengl initialization junk,just not to be worried about it any more...and what is the easiest way of doing this?
belgrade-yu
llvllatrix
llvllatrix
I wouldnt bother with a dll - could just create a function that contains the common(by your definition of common) initialization parameters and whenever you need then, call it. You can do the same when you want to restore gl to some common state (dont need as much stuff as initialization stuff).

Modulate the function and you can include it in all of your programs.
biotech
biotech
well i thouht to expand it some kind of simple render engine....and this should be a good starting point.
belgrade-yu
llvllatrix
llvllatrix
ic...then dlls are a good choice; allows for scalability. I would also start a primitive ogl wrapper if thats the direction you''re headed.

good luck
chawk
chawk
The only advantage I can see to making a .dll file from your initialization code is if you actually plan to make a large-scale, flexible, and even publically distributed engine. Updates to the engine don''t necessitate recompiling the application using it, so that''s a nice feature. Additionally, you can dynamically load/unload code in a .dll, but I''m not sure why you''d want to load/unload an engine Half-life does have their engine code in a .dll file I believe -- the game mods then interface with that.

My current basecode is just a .cpp and .h file that I include into each new project I make (plus a .h and .rc resource file for my video settings dialog). I often find I modify the basecode slightly depending on the project, so it''s nice having the source instead of an immutable .dll package. One day I''ll probably have really flexible init code, or a full-blown engine, and that''ll probably be in a .dll

Just my thoughts.
biotech
biotech
...i dont know,i just wanted to play around with dlls,just to get rid of those annoying stuff that i would deal with any more.
belgrade-yu

Topic Locked

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

Sign in to reply to this topic.