1 class A
2 {
3 static ....; //indices and vertices
4 public:
5 void initDataWithD3D(...); //init the graphics with the static data by d3d
6 }
7
8 ......; //initial the static params and reality functions
9
10
11 ........
12 ........
13 ........
14 A* a = new A();
15 a->initDataWithD3D(...);
16 delete a; //if it is ok ,or i should 'delete a' just before the end of program
17 .......
转载于:https://www.cnblogs.com/YOUEN/archive/2012/01/06/2315060.html