///////////////////////////////////////////////////////////////////////////////
//
// File: AVP_Platform_Laser.h
//
// Created by Andrew Southgate 12/11/2007
// 
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//
// Handles rendering of the predators tri-laser thingy
//
///////////////////////////////////////////////////////////////////////////////

#if defined ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#if !defined __AVP_PLATFORM_LASER_H__
#define __AVP_PLATFORM_LASER_H__

#include "Rendering/Asura_Direct3D.h"


class AVP_Platform_Laser_System
{
public:
	static void Initialise();
	static void Shutdown();
	static void Reset();
	static void RenderStart();
	static void SetupLaserParams(AVP_Laser *pxLaser);
	static void RenderLaser(AVP_Laser *pxLaser, const Asura_Vector_3 &xPosition, const Asura_Vector_3 &xRight, const Asura_Vector_3 &xDown, const Asura_Vector_3 &xForward, float fLength);
	static void RenderEnd();

	static void	OnEffectLoaded(class Asura_Direct3D_Effect* pxEffect);
	static void	OnEffectUnloaded(class Asura_Direct3D_Effect* pxEffect);
	static void	CaptureEffect(void);

private:
	static struct IDirect3DVertexDeclaration9*	s_pxLaserVertexDecl;
	static class Asura_Direct3D_Effect*		s_pxLaserEffect;


	static D3DXHANDLE s_xColourHandle;
	static D3DXHANDLE s_xParamsHandle;
	static D3DXHANDLE s_xBeamFadeOffHandle;


	static D3DXHANDLE s_xTimeHandle;
	static D3DXHANDLE s_xOneOverScreenSizeHandle;

	static D3DXHANDLE s_xNoiseTexHandle;
	static D3DXHANDLE s_xSceneTextureHandle;
	static D3DXHANDLE s_xDepthTextureHandle;

	static int		  s_iNoiseTexture;
};

#endif // __AVP_PLATFORM_LASER_H__