
#ifndef __GLARE_H__
#define __GLARE_H__

//--------------------
// 組み込みファイル名
//--------------------
#include "shader.h"
#include "nn.h"

//-
//
//-
class CGlare : public CShader{
private:
	D3DXHANDLE			m_invAspectPS;
	D3DXHANDLE			m_invIntensityTexSizePS;

	LPDIRECT3DTEXTURE9	m_pTexture;

	Float				m_aspect;

private:
	CGlare();
	~CGlare();

public:
	static CGlare *allocate(void);
	static void   dispose(CGlare *&glare);

public:
	void	init(LPDIRECT3DDEVICE9 pD3DDev);

public:
	int		buildShader(LPDIRECT3DDEVICE9 pD3DDev, const char *pPixelProfile);

public:
	void	setAspect(Float asp) {m_aspect=asp;}

private:
	void	drawGlare(LPDIRECT3DDEVICE9 pD3DDev, LPDIRECT3DTEXTURE9 pTexture);
public:
	void	renderGlareTexture(LPDIRECT3DDEVICE9 pD3DDev, LPDIRECT3DTEXTURE9 pTexture);
	void	drawGlareTexture(LPDIRECT3DDEVICE9 pD3DDev);

public:
	LPDIRECT3DTEXTURE9	getTexture(void) const {return(m_pTexture);}
};

#endif	// ifndef __GLARE_H__
