//*******************************************************************
//
// File: Asura_Platform_Botanical_Game_Render_Instance.h
//
// Created: 15 December 2006 DLH
//
// Description: 
//
//*******************************************************************

#ifndef __ASURA_PLATFORM_BOTANICAL_GAME_RENDER_INSTANCE_H__
#define __ASURA_PLATFORM_BOTANICAL_GAME_RENDER_INSTANCE_H__

// other libraries
#include "Core/Asura_HalfFloat.h"
#include "Core/Asura_Maths.h"

// internal dependencies

// forward declarations

//*******************************************************************
// Constants
//*******************************************************************


//*******************************************************************
// Class Definitions
//*******************************************************************

class Asura_Platform_BGR_Instance
{
public:
	bool IsVisible() const { return m_bVisible; }

	// This struct is what's copied into the instance buffer
	struct RenderData
	{
		Asura_HalfFloat m_axTransformMatrix[12];
		Asura_HalfFloat m_axRedSH[4];
		Asura_HalfFloat m_axGreenSH[4];
		Asura_HalfFloat m_axBlueSH[4];
		float m_fAlpha;
		float m_fScale;
		float m_afBone[3];
	} m_xRenderData;

	// Float position to avoid casting halves to floats CPU-side for frustum test
	Asura_Vector_3	m_xPosition;
	mutable bool	m_bVisible;		//BW squeezed this in and changed module index to a short
	bool			m_bSparePadding;
	short			m_sModuleIndex; //BW placed last so it can run with old data! note endianness.
};

//*******************************************************************
// Inline Function Definitions
//*******************************************************************


//*******************************************************************
//
// (c) 2006 Rebellion
//
// Warning: This computer program is protected by copyright law and 
// international treaties. Unauthorized reproduction or distribution
// of this program, or any portion of it, may result in severe civil and
// criminal penalties, and will be prosecuted to the maximum extent 
// possible under the law.
//
//*******************************************************************

#endif // __ASURA_PLATFORM_BOTANICAL_GAME_RENDER_INSTANCE_H__
