/* -----------------------------------------------------------------------------
	GSFramework
	Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
------------------------------------------------------------------------------*/


#ifndef	__GPUTYPES__
#define	__GPUTYPES__


#if	 __PLATFORM_ANDROID_NDK__ || __PLATFORM_IOS__
//#define	EGL_HALF_FLOAT_SUPPORT
#endif

#ifdef	EGL_HALF_FLOAT_SUPPORT
typedef	unsigned short	hfloat;
#define	EGL_HFLOAT	GL_HALF_FLOAT_OES
#else
typedef	float	hfloat;
#define	EGL_HFLOAT	GL_FLOAT
#endif

namespace GS {
	namespace GPU {
		namespace Types {

enum	ValueType
{
	ValueByte,
	ValueUByte,
	ValueShort,
	ValueUShort,
	ValueFloat,
	ValueHalfFloat,

	ValueLast
};

enum	PrimitiveType
{
	PrimitiveLine,
	PrimitiveTriangle,

	PrimitiveLast
};

		/// Convert float to half-float.
		hfloat	FloatToHFloat(float f);
		/// Convert float to half-float.
		float	HFloatToFloat(hfloat hf);

		} // Types
	} // Types
} // GS


#endif	// __GPUTYPES__
