#pragma once

#include <d3d9.h>
#include <d3dx9.h>

#define SAFE_RELEASE(x) if(x) { x->Release(); x = NULL; }

class GameGraphics
{
	friend class GameImage;
	friend class GameFont;
public:
	GameGraphics(void);
	~GameGraphics(void);

public:
	void Create(HWND hWnd);
	void Destroy();

public:
	void Clear();
	void Present();

	void Begin(); void End();

private:
	IDirect3D9 *m_d3d;
	IDirect3DDevice9 *m_d3dDevice;
	ID3DXSprite *m_d3dSprite;
};