Creating device-dependent resources

In this recipe, we will see how the included sample framework deals with the initialization of device-dependent Direct3D resources and how our custom classes can make use of this throughout this book.

Getting ready

We continue from where we left off in the Using the sample rendering framework recipe.

How to do it…

We will review the base class's implementation of the CreateDeviceDependentResources function, and then look at how to implement overrides within the descending classes.

  1. The following protected virtual D3DApplicationBase.CreateDeviceDependentResources implementation is assigned as an event-handler to the DeviceManager.OnInitialize event.
    protected virtual void CreateDeviceDependentResources(DeviceManager ...

Get Direct3D Rendering Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.