//
// Asura_Xbox360_QuadOverlayRenderer.h
//
// Created by KJFL - 03 August 2005
//
// Copyright (C) 2005 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_XBOX360_QUADOVERLAYRENDERER_H__
#define __ASURA_Xbox360_QUADOVERLAYRENDERER_H__

#include "Rendering/Asura_Xbox360_Graphics.h"
#include "Rendering/Asura_Xbox360_Effect_System.h"

class Asura_Overlay_Quad;

class Asura_Xbox360_QuadOverlayRenderer
{
	public:

		static void Initialise( void );
		static void Shutdown( void );

		static void Render( const Asura_Overlay_Quad& xQuad );

		static void RenderEx( const Asura_Overlay_Quad& xQuad , Direct3D_BaseTexture* pxD3DTexture, class Asura_Xbox360_Effect *pxAltEffect=NULL);

		static void Flush( void );

	private:
		enum QuadType
		{
			QT_FLAT_COLOUR,
			QT_GOURAUD_COLOUR,

			MAX_QUAD_TYPES
		};

		static Direct3D_VertexElement const* const	s_apxVertexElements[MAX_QUAD_TYPES];
		static Direct3D_VertexDeclaration*			s_apxVertexDeclarations[MAX_QUAD_TYPES];

		static Asura_Xbox360_Effect*				s_pxEffect;
		static Asura_Xbox360_Effect_System::Handle	s_xSamplerHandle;
		static Asura_Xbox360_Effect_System::Handle	s_xFlatColourHandle;
};

#endif//__ASURA_XBOX360_QUADOVERLAYRENDERER_H__
