//////////////////////////////////////////////////////////////////////////////
//
// AVP_Platform_Stencil_Setup.h
//
// Author : Andrew Southgate
// Date   : 2/5/2008 
//
// Copyright (c) 2008 Rebellion. All rights reserved.
//
//////////////////////////////////////////////////////////////////////////////

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif   // ASURA_USE_PRAGMA_ONCE

#ifndef AVP_PLATFORM_STENCIL_SETUP_H__
#define AVP_PLATFORM_STENCIL_SETUP_H__

#include "Rendering/Asura_PS3_Graphics.h"
#include "Rendering/Asura_PS3_RenderingStates.h"

#include "FSFX/AVP_FSFX.h"

enum {
	AVP_STENCIL_BIT_CLOAK = ASURA_STENCIL_BIT_FIRST_PROJECT_SPECIFIC,
	
	AVP_STENCIL_BIT_VISION_FIRST,
// 	AVP_STENCIL_BIT_VISION_ALIEN = AVP_STENCIL_BIT_VISION_FIRST,
// 	AVP_STENCIL_BIT_VISION_HOT,
// 	AVP_STENCIL_BIT_VISION_TECH,
// 	AVP_STENCIL_BIT_VISION_HOLOGRAM,
	AVP_STENCIL_BIT_VISION_LAST = (AVP_STENCIL_BIT_VISION_FIRST + NUM_AVP_MATERIAL_RESPONSE_PROJECT_INDEXES - 1),
	
	AVP_STENCIL_BIT_FIRST_UNUSED
};
#define AVP_STENCIL_MASK_CLOAK				(1<<AVP_STENCIL_BIT_CLOAK) 
#define AVP_STENCIL_MASK_VISION				(AVP_MATERIAL_RESPONSE_PROJECT_FLAG_ALLUSED << AVP_STENCIL_BIT_VISION_FIRST)


class AVP_PlatformStencilSetup
{
public:
	static void MaterialContextCallback(u_int uPrimaryContext, u_int uSecondaryContext);
	static void SetTestFunction( ASURA_PS3_STENCIL_FUNCTION uFunction, u_int uRef, u_int uMask );
	static void ResetTestFunction( void );

private:
	static ASURA_PS3_STENCIL_FUNCTION	s_uFunction;
	static u_int						s_uTestRef;
	static u_int						s_uTestMask;
};


#endif // AVP_PLATFORM_STENCIL_SETUP_H__



