Thursday, 11 February 2010

DirectX App framework

I'm very much enjoying DirectX at the moment. This week I had to port the D3D tutorials that come with the SDK into a class-based application framework, which I will be building upon in future weeks.

To achieve this I had to understand what it meant to have a 'LostDevice' and how to reset it. Here is a picture of the mesh loader in my framework.



This particular tutorial was loaded in my project from the WinMain() function with this line of code.

Meshes app(hInstance, "Meshes - Thomas Marsh", D3DDEVTYPE_HAL, D3DCREATE_HARDWARE_VERTEXPROCESSING);

gd3dApp = &app;

return gd3dApp->run();

0 comments:

Post a Comment