Writing a program framework. Classes and stuff.
Posted: Sat Aug 04, 2007 6:39 am
I'm writing a game framework. I am using my own classes as wrappers around DirectX (and at a later point, OpenGL) classes.
Anyway, say my texture class contains the private member "IDirect3DTexture9 *m_d3dTexture;" (a Direct3D texture). This is defined in my header file which is included in the framework project and also end projects wishing to access my texture class.
But, the problem lies within abstracting my framework away from Direct3D. For an end program to include my texture.h they must have d3d9.h and d3dx9.h on their system (for IDirect3DTexture9) which means they must have the DirectX SDK installed on their system. I want to avoid this. I have virtually every game framework/engine do this (you don't need any DX or OpenGL SDK installed, just the link with the engine's dynamic library).
I do not want to have to convert every DirectX specific member to void * and then refer to them as ((IDirect3DSomeClass)myMember) everywhere in my code.
Anyway, say my texture class contains the private member "IDirect3DTexture9 *m_d3dTexture;" (a Direct3D texture). This is defined in my header file which is included in the framework project and also end projects wishing to access my texture class.
But, the problem lies within abstracting my framework away from Direct3D. For an end program to include my texture.h they must have d3d9.h and d3dx9.h on their system (for IDirect3DTexture9) which means they must have the DirectX SDK installed on their system. I want to avoid this. I have virtually every game framework/engine do this (you don't need any DX or OpenGL SDK installed, just the link with the engine's dynamic library).
I do not want to have to convert every DirectX specific member to void * and then refer to them as ((IDirect3DSomeClass)myMember) everywhere in my code.