• Advertisement
  • entries
    422
  • comments
    1540
  • views
    489621

The backend comes together..

Sign in to follow this  

56 views

This post contains proof of my being productive. Just for a change.



So, the above screenshot is of my per-pixel diffuse+normal+specular rendering using a Blinn-Phong model. Well, okay, it isn't yet - but it will be [grin]

I spent the last day or so hooking up the XML system I discussed a few entries back with the D3D9 effects system and my other rendering code.

I'm quite pleased with hows its worked out as I've effectively made the tile rendering for the game entirely data driven. The tileset XML specifies an effect file and an entry point and then a list of textures.

The code uses TinyXML to pull out all the details, it then loads the effect file and checks that the entry point exists. It then enumerates all texture2D parameters and looks for a usage annotation:

texture2D myTexture < string usage = "diffuse"; >;

If the usage matches with the tag used in the XML then the D3DXHANDLE is stored for later use.

Throughout the entire process an XML log file is kept up to date with warnings/errors about parsing of the data (I would show the log, but it seems GDNet blocks .xsl files [rolleyes]). The loading code clocks up over 500 lines or so - most of it is stuff to handle the case where the data is incorrect. I figure thats important for any data-driven architecture.

The above screenshot obviously isn't that impressive - but the application now provides pretty much all the information required for a wide array of effects, which should make it fairly flexible. The above image is rendering with 3 inputs - diffuse/normal/specular, it's just not doing any interesting calculations yet.

Hopefully next time I'll actually have it doing those interesting calculations [wink]

In other news..

Found out today that I've got an invite to a conference call with the DX team next week. Get to have a chat with them (and other MVP's) about the D3D10 tech previews, which should be interesting - looking forward to that. Guess that does mean I need to clock up some hours with the API though - I haven't really had much time with the December CTP due to university exams.
Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Advertisement