XNA Creators Club Online
Page 1 of 1 (2 items)
Sort Posts: Previous Next

DX10 Code Organization

Last post 21/10/2009 3:55 by legalize. 1 replies.
  • 15/10/2009 3:32

    DX10 Code Organization

    Hey everyone,

    I'm just getting into DirectX starting with 10.0, and have been going through a whackload of tutorials both on and offline.  The one thing I've been noticing is a total lack of structure in all of these tutorials, where everything is thrown into the winMain.cpp.  I thought about creating a manager class to handle the Direct3D initialization, and rendering and what not, but I'm not quite sure if this is the best way to go.

    I just wondering what kind of practices you seasoned vets use when setting up your projects.

    Thanks folks.


  • 21/10/2009 3:55 In reply to

    Re: DX10 Code Organization

    Definately organize your code into objects following Single Responsibility Principle and other good OOP design principles.

    Unfortunately the SDK abandoned an object-oriented sample framework some time ago and gave us programming 3D graphics from a 1990 perspective of global variables, global functions and callbacks. The SDK samples have not been anything to use as a good example for your own code for some time.

Page 1 of 1 (2 items) Previous Next