| Home | About | Links | Problems | My Graphics BaseCode | Compiling and Linking | Contact |
In Main.h you can enable or disable several features by commenting or uncommenting the #defines there. This will enable you to use the BaseCode even if you don't have the DirectX SDK installed, for example. Various versions of the code with certain elements (both library and source) excluded from the build can be gotten here:
DirectX, OpenGL, and Software
DirectX and Software only
OpenGL and Software only
Software only
Windows, DirectX, and OpenGL all have seperate library requirements.
Furthermore, Visual Studio .NET will automatically include some core libraries
that Visual Studio 6.0 will not. Even more annoying, the DirectX headers will
include some libraries automatically as well. The result is a mess of
libraries. Where appropriate, I provide my own copies of the libraries I use;
libraries that come with Windows shouldn't be transferred between computers
(and you should have them already or something's wrong.) In all cases, my code
is 32-bit; changes will have to be made to get it to compile on a 64-bit
system.
To change the libraries .NET links with, go to File -> Properties -> Linker ->
Input -> Additional Dependencies...
The VC++ 6.0 equivalent is project -> settings-> Link Object / library modules
winmm.lib,
used for its timer functions
vfw32.lib,
used for screen capture
kernel32.lib
user32.lib
advapi32.lib
The last three libraries are automatically included in the DirectX headers and by Visual Studio .NET, and thus are not explicitly included in the additional dependencies line.
It should be possible to run the DirectX code without installing the SDK by directly linking my versions, however I advise just getting the most recent copies of the libraries straight from Microsoft.
d3d9.lib
d3dx9dt.lib
(for Visual Studio .NET only)
d3dx9.lib
(for VC++ 6.0 only)
DShow.lib
(this is only if you want to use video files as textures. You will probably
need to get this from me, as it's part of an older version of the DirectX SDK.
Current copies of the DirectX SDK do not contain DirectShow.)
If everything works, the following 640x480 window with a rotating sphere inside it should come up: