Sunday, 28 October 2012

Step One

After doing some milling around on Google yesterday I saw that this book (and previous versions) was quite popular among students and veterans of DirectX as an introduction. I had a hankering for some programming and didn't want to wait for it to be delivered so I set to work trying to find a copy in London.

I got lucky and found a Foyle's near Tottenham Court Road had one left in stock so I reserved it and went to collect it. The guy at the store said he'd never encountered someone so desperate to buy a book on programming on a Saturday afternoon. I had a look around for some books on Boost while I was there but the only one I found didn't seem like a particularly useful one.



Installing DirectX

The book directs you in installing DirectX and getting an example program from Chapter 6 up and running. I immediately encountered problems installing the DirectX SDK on to my machine. Installation kept failing at the last hurdle, Googling around gave me the answer. Turns out I had a later version of one of the VC++ 2010 Redistributable than the SDK recognised (either from my IDE or perhaps a game I installed through Steam). I got around this by removing the Redistributable, installing the SDK and then reinstalling the Redistributable.

I was set to go, launching my IDE, setting linker options and search paths and seeing that Intellesense recognised the libraries I included. Copying the files from the "Box" example from chapter 6 into my project and attempting the compile threw up a few errors. I expected this to happen after having installed Windows 8 and VS2012. The first error was unrelated to my system, it was simply that the character encoding was expecting Unicode and this was easily rectified. The second issue was more frustrating. Compiling was giving an error, a conflicting value in some definition within a library file included as sample code in the DX SDK. In order to fix this I recompiled the library's project under VS2012 and copied the new files over the old one; success!

Only one more issue surfaced and it was with something I was altogether unfamiliar with, the Shader used in the example. There was something about the compiler being unable to find an entrypoint for a .fx file within my project. Frank Luna's forum held the answer to this particular problem, which was to define the entry point as 'VS' rather than 'main'.

The fruits of all this? A successful compilation of the test project, DirectX here I come!


Welcome to my Blog

Reason for the Blog

I'm creating a blog to document my learning in anything related to software development. I'm a recent Electronic Engineering graduate, currently working as an Application Support Engineer, working mainly with PHP, MySQL and XML.

I'm aspiring to be a C++ developer and so am taking the first steps in teaching myself anything that interests me around this language. I would call my current level of skill in C++ intermediate, having studied and used it during my degree. In the immediate future I will be looking into DirectX 11 and the Boost libraries and hope to be able to use these two in tandem to recreate some simple games and hopefully from there move on to creating a few original games.

Next Steps

I will shortly be writing a small introductory post about the book I recently purchased to teach myself DirectX and the overcoming of some initial set-up difficulties.