O'Reilly logo

Character Animation with Direct3D® by Carl Granberg

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Application Framework

Since you’ll be writing a Win32 application to run your game through, you’ll need a class to deal with the main program loop, initialization of the graphics device, and more. For this purpose I’ll use the Application class. Once again, keep in mind that I do a minimum of error checking in this class to keep it light, so for any “advanced” application, I would suggest the DXUT framework as a starting point (accompanying the DirectX SDK). Bearing this in mind, here’s the overview of the Application class:

class Application { public: Application(); ~Application(); HRESULT Init(HINSTANCE hInstance, bool windowed); void Update(float deltaTime); void Render(); void Cleanup(); void Quit(); void DeviceLost(); void DeviceGained(); ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required