@cozzie: That's already what I have, now I'm not sure what the correct parameters that I should put here so I can support multiple version of DX:
IRenderer::createVertexBuffer(...);
IRenderer::createIndexBuffer(...);
IRenderer::draw(...);
I would say that you should start by doing a low level abstraction of the one you want your interface to emulate.
Right now I have a "ResourceCreator" class that you can get after you load the library(DLL), This in tern is used to create any type of resource that is supported.
An example of my index buffer's create method(I do need to make alowance for 2byte indices):
/*! This creates the vertex buffer with the specified number of elements and in the specified memory pool.
*
* Parameters:
* Elements : The number of elements of length of sizeof( pIndices[ 0 ] ).
* pIndices : A pointer to the index data to use for creation.
* Topology : How the elements will be use to create the rendering surface.
* Usage : The usage pattern to apply to this resource.
* CPUAccess : What access should the CPU have to this resource.
*/
DLLEXPORT virtual HRESULT Create( const unsigned Elements, const unsigned* pIndices,
const PrimitiveTopology Topology = PrimitiveTopology::TriangleList,
const UsageType Usage = UsageType::Immutable,
const CPUAccess CPUAccess = CPUAccess::None ) = NOT_IMPLEMENTED;
And the vertex buffer:
/*! This creates the vertex buffer with the specified number of elements.
*
* Parameters:
* Elements : The number of elements of length of Description.length().
* Description : The layout of each element in memory.
* pVertices : A pointer to the vertex data to use for creation.
* Usage : The usage pattern to apply to this resource.
* CPUAccess : What access should the CPU have to this resource.
*/
DLLEXPORT virtual HRESULT Create( const unsigned Elements, const Vertex::Layout Description,
const void* pVertices, UsageType Usage = UsageType::Immutable,
const CPUAccess CPUAccess = CPUAccess::None ) = NOT_IMPLEMENTED;
HTH
Ryan.