Original Post
Im doing some experimentation with wrapping render calls. What i mean by this is say for example you want to do a simple DIP call where u just rendering the whole lot. The code for this is often monotonous to write albeit there isn't very much to write. But neverless i figure it may be useful to wrap. So im coming up with a prototype class definition of how this class may look. The template T is for the vertex struct. def Now im wondering if this is overkill. For a simple i-wanna-write-a-quick-app-to-test-something scenario this would be useful rite? ace
#ifndef STANDARD_DIP_RENDER
#define STANDARD_DIP_RENDER
#include <d3dx9.h>
template<class T>
class StandardDIPRender
{
public:
StandardDIPRender( LPDIRECT3DDEVICE9 device,
LPDIRECT3DINDEXBUFFER9 indexBuffer,
LPDIRECT3DVERTEXBUFFER9 vertexBuffer,
DWORD fvf,
D3DPRIMITIVETYPE primitiveType
unsigned int primitiveCount);
~StandardDIPRender();
void Call(); // will contain the implementation of the render
private:
LPDIRECT3DDEVICE9 device;
LPDIRECT3DINDEXBUFFER9 ib;
LPDIRECT3DVERTEXBUFFER9 vb;
DWORD fvf;
D3DPRIMITIVETYPE primitive_type;
};
#endif