//
// Asura_GX_Fog.h
//
// Created by KOR - 29 November 2007
//
// Copyright (C) 2007 Rebellion, All Rights Reserved.
//

#ifdef ASURA_USE_PRAGMA_ONCE
#pragma once
#endif

#ifndef __ASURA_GX_FOG_H__
#define __ASURA_GX_FOG_H__

#include <revolution/gx/gxstruct.h>

const u_int uASURA_GX_FOG_ZMAPPING_SIZE = 256;

class Asura_GX_Fog
{
public:
	static void Initialise();
	static void Shutdown();
	static void RequestUpdateForNewParameters() { s_bNeedsUpdate = true; }
	static void Render();

	static void DisableHardwareFog();
	static void SetHardwareFogFixed(float fAlpha, float fDistance, GXColor& xColour);
	static void SetHardwareFogLinear(float fNear, float fFar, GXColor& xColour);
private:
	static void UpdateForNewParameters();

	static u_short*		s_pusZBuffer;
	static u_char*		s_pucZMappingBuffer;
	static GXTexObj		s_xZTexObj;
	static GXTexObj		s_xZMappingTexObj;

	static bool			s_bNeedsUpdate;
};

#endif//__ASURA_GX_FOG_H__