Skip to main content
gamedev.net
🔒 Locked

DirectX class?

Started by Tran Minh Quang Feb 15, 2003 at 7:08 AM 4 replies 850+ views
Original Post
Tran Minh Quang
Tran Minh Quang
Hi everyone! Cany you tell me. How can i encapsulate DirectX Componenents into class, say: Class CDraw, CSound, CInput, CMusic...And can i even encapsulate every those objects into one class called: DirectX Class. So everytime i want to use DirectX to make game i just include that DirectX class to get everything of DX? Thanks
Ilthigore
Ilthigore
If you are using VC++ (I''m not sure if any other compilers support it) use a static library (.lib file) for your class. Compile the class as a LIB project. Then put you headers in a valid include directory and your LIB file into a valid LIB directory. Then all you need to do is call #include <whatever.h> and change the link settings to link the lib. See MSDN for more.

>>>>>>>>>>>>>>>>>
Ilthigore
<<<<<<<<<<<<<<<<<
Ilthigore<<<<<<<<<<<<<<<<<
Pipo DeClown
Pipo DeClown
You should learn C++, and try to implement it. I dont have a clue how you could ask these questions, Im sorry but its true...

.lick
Warspawn
Warspawn
Also if using VC you can use the DX app wizard to generate a basic framework for you. This will give you an example of how it can be done. (the example may be a bit difficult to read through if you are just beginning, but it will give you classes for ALL of the features).

Tran Minh Quang
Tran Minh Quang
quote:

If you are using VC++ (I''m not sure if any other compilers support it) use a static library (.lib file) for your class. Compile the class as a LIB project. Then put you headers in a valid include directory and your LIB file into a valid LIB directory. Then all you need to do is call #include <whatever.h> and change the link settings to link the lib. See MSDN for more.



It is a good idea!
Thanks for all of you

Topic Locked

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

Sign in to reply to this topic.