Lego House in Direct3D 9

I made this project in January to model and render a Lego model, coded from scratch in C++ and DirectX 9.0c, with the invaluable assistance of Luna’s book, Introduction to 3D Game Programming with DirectX 9.0c: A Shader Approach.

Bricks are procedurally generated from a custom text file that specifies the size, position and colour of each brick.

Phong shading was used as the lighting model, implemented using a pixel shader. There is only one directional light in the scene.

Download the Visual Studio project (89Kb) (build with x86 Debug/Release configuration): 
https://onedrive.live.com/redir?resid=56CD19EB372DF550!1218&authkey=!AC0hjMKlGn9EK9g&ithint=file%2czip

Git repository:
https://bitbucket.org/handyj443/graphics-assignment-1-lego/

How to open Introduction to 3D Game Programming With DirectX 9.0c: A Shader Approach sample projects with Visual Studio 2013

Frank Luna’s DirectX 9.0c book is excellent, but it can be a pain trying to build the code samples using the latest versions of Visual Studio. Here’s what I did to get it working with Visual Studio 2013 on Windows 7:

First, ensure you have installed the DirectX SDK (June 2010): https://www.microsoft.com/en-gb/download/details.aspx?id=6812

Then add the following directories to your project in Project Properties:

Add the following to C/C++ > General > Additional Include Directories:
$(DXSDK_DIR)Include;C:\Program Files %28×86%29\Microsoft DirectX SDK %28June 2010%29\Include;%(AdditionalIncludeDirectories)

Add the following to Linker > General > Additional Library Directories:
$(DXSDK_DIR)Lib\x86;%(AdditionalLibraryDirectories)

In Linker > Input > Additional Dependencies, change dxerr9.lib to dxerr.lib.

Finally, in the source code, change dxerr9.h to dxerr.h. The project should now compile.