Eric's DirectX Page
Go to:
D3DAppBase
Links
Eric Kerfoot <ekerfoot@uwo.ca> © 2003
Welcome to my DirectX page where I keep my Direct3D, DirectInput, and DirectMusic class library. D3DAppBase is something I've worked on for years, it's a set of classes and encapsulate various DirectX objects, provide various functions and managers, and provides a base class to build applications on.

I haven't written much with it other than the example programs below. I'm working on a space-destroyer-type game though schoolwork is taking up just about all my time.

If you want to use my class library go right ahead so long as it's for non-commercial use, otherwise get in touch with me if you're interested in using it for a product. I'd appreciate any feedback/bug reports on the library, or if you need any help feel free to email me.

D3DAppBase requires the DirectX SDK version 8.1 or higher, though I haven't tried it with version 9 just yet. You can get the SDK from http://www.microsoft.com/directx. The SDK includes a lot of example programs and has all the documentation you need. Other than that my links section is below for other places to look for things.



A little bit about me:

I'm currently a student at the University of Western Ontario in London, Ontario Canada, where I'm studying Honours Computer Science. I've been into programming and specifically game program for years now, I first learned Java on my own way back in grade 12 with Microsoft's J++ compiler. Since them I've learned C/C++ for DirectX, but I also wrote stuff for the WildTangent API, which is a Java API for DirectX essentially.

My old WildTangent page can be found here. It's been a while since I tried to run that game I've got there so I make no guarantees about it working, but looking at the code for a smallish game perhaps still helps. (The textures and materials are all mine as far as I know, so if you want to use them please let me know).

D3DAppBase
D3DAppBaseFiles.zip - Zip file with the library C++ and header files

This is the D3DAppBase class library for C++. It consists of four different sections:

  • D3DAppBase.cpp/.h - The Direct3D class library, contains classes for manipulating meshes, managing resources, effects like billboards and particles, and a base class for applications classes to extend.
  • DIBase.cpp/.h - Simple DirectInput class that handles immediate keyboard and mouse data, and can load a joystick or other peripheral.
  • DMBase.cpp/.h - Simple DirectMusic classes for managing and playing sound segments, and for 3D positional audio paths.
  • DXUtil.cpp/.h - Utility functions mostly from the DirectX SDK, plus my own functions and macros that the above files all use.
To see how to setup a project to use DirectX in, look at the examples I've provided. Make sure if you're using .NET that you compile with managed extensions turned off. I always have precompiled headers turned off as well, but other than the external dependencies my projects are more or less like the default Win32 project that Visual Studio coughs up.

Your project configuration should include these as external/additional dependencies however:

dxerr8.lib dinput8.lib d3dxof.lib dxguid.lib d3dx8dt.lib winmm.lib d3dx8.lib d3d8.lib kernel32.lib user32.lib oleaut32.lib ole32.lib gdi32.lib advapi32.lib

D3DAppBase.zip - Zip file with a simple demonstration app.

I used this to write the library with, so the source is a bit of a mess. It requires that you download and extract the main library zip file above into the same directory that you extracted this zip file to. The source for the actual program is in app.cpp, like it is for the following example programs too. All the program does is produce a particle fountain and play sound segments through various audio paths, though comes with a few x files and other media as well.



The following are sample programs/utilities I wrote with the D3DAppBase class library:

D3DXViewer


Click to see screen shot


D3DXViewer.zip - Zip file with X file viewer.

This is a simple app for previewing a model in Microsoft X file format (see SDK documentation). All of the code for doing this is in app.cpp which makes use of a number of library classes. The file is specified through the command line so it can be used as a file association. It also requires the library zip file be extracted into its directory.

D3DDDSViewer


Click to see screen shot


D3DDDSViewer.zip - Zip file with DDS file viewer.

This is a simpler viewer for DDS texture files. These files can be in all sorts of pixel formats, contain MIP chains, cube and volume maps, and are an easy way to get texture into an app. All of the code for doing this is in app.cpp which makes use of a number of library classes. The file is specified through the command line so it can be used as a file association. It also requires the library zip file be extracted into its directory.

D3DMD2Viewer


Click to see screen shot


D3DMD2Viewer.zip - Zip file with MD2 file viewer.

This is a simpler viewer for MD2 animated model files. MD2 is the Quake 2 animation format, which is just a sequence of mesh frames as opposed to skeletal animation or the like. It's a simple file format and is simple to use with the provided MD2ModelObject class. All of the code for doing this is in app.cpp which makes use of a number of library classes. The file is specified through the command line so it can be used as a file association. It also requires the library zip file be extracted into its directory.

Links
My small collection of texture, model, and programming resources:


Page maintained by Eric Kerfoot Copyright © 2003-4
Last Updated: July 6th, 2004

Counter