#ifndef _COBJBLITDIRECTX_H_
#define _COBJBLITDIRECTX_H_

#include "lib2Dconf.h"

#ifdef USE_DIRECTX

#include "CObjBuffer.h"
#include <windows.h>
#include <ddraw.h>

// Remarque préliminaire:Pour le moment on utilise 
// DirectDraw et non Direct3D


class CObjBufferDirectX: public CObjBuffer
{
private:
	LPDIRECTDRAW4               lpDD;        // DirectDraw object
	LPDIRECTDRAWSURFACE4        lpBackbuffer;// DirectDraw primary surface
	LPDIRECTDRAWCLIPPER         lpClipper;

public:
	CObjBufferDirectX(HWND hwnd);
	virtual ~CObjBufferDirectX();
	
	int  GetId();
	void Blit(int dx,int dy,Layer *source);
	void Clear(int dx1,int dy1,int dx2,int dy2,int bckcolor);
	int  CreateScolBuffer(mmachine m,int ndxchannel,int idcont);
};

#endif

#endif
