#ifndef __LUXINIA_REFTYPES_H__
#define __LUXINIA_REFTYPES_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef enum ClassType_e {
	CLASS_ANY = -1,					//
	CLASS_ERROR = 0,				//
	CLASS_BOOLEAN,					//	lua
	CLASS_INT,						//	lua
	CLASS_FLOAT,					//	lua
	CLASS_DOUBLE,					//  lua
	CLASS_STRING,					//	lua
	CLASS_BINSTRING,				// special type for getting binary strings
	CLASS_CHAR,						//	lua

	CLASS_REFLIB,					// reference library functions
	CLASS_POINTER,					//  lua light userdata
	CLASS_LUATABLE,
	CLASS_FUNCTION,					//
	CLASS_FUNCTIONINFO,				//
	CLASS_USERDATA,					//
									//
	CLASS_SPATIALNODE,				//	group
									//
	CLASS_TECHNIQUE,				//	user enum
	CLASS_VERTEXTYPE,				//	user enum
	CLASS_TEXTYPE,					//	user enum
	CLASS_TEXDATATYPE,				//	user enum
									//
	CLASS_MATH,						//	group
	CLASS_MATRIX44,					//	user ref
									//
	CLASS_CLASS,					//
	CLASS_FILELOADER,
	CLASS_RENDERINTERFACE,			//	interface
									//
	CLASS_CAPABILITY,				//	static
	CLASS_PGRAPH,					//	static / user int
	CLASS_FONTSET,					//	user ref
									//
	CLASS_RENDERFLAG,				//	interface
	CLASS_RENDERSURF,				//	interface
	CLASS_RENDERSTENCIL,			//	interface
	CLASS_MATSURF,					//	group
	CLASS_RENDERDEBUG,				//	static
	CLASS_RENDERSYS,				//	static
	CLASS_VISTEST,					//	static
	CLASS_BLENDMODE,				//	user enum
	CLASS_OPERATIONMODE,			//	user enum
	CLASS_COMPAREMODE,				//	user enum
	CLASS_PRIMITIVETYPE,			//	user enum
	CLASS_CONSOLE,					//	static
	CLASS_RESDATA,					//	static
	CLASS_RESCHUNK,					//	user ptr
	CLASS_WINDOW,					//	static
	CLASS_SYSTEM,					//	static
	CLASS_INPUT,					//	static
	CLASS_TEXCOMBINER,				//	group
	CLASS_TEXCOMBINER_CFUNC,		//	user enum
	CLASS_TEXCOMBINER_AFUNC,		//	user enum
	CLASS_TEXCOMBINER_SRC,			//	user enum
	CLASS_TEXCOMBINER_OP,			//	user enum
	CLASS_RENDERBUFFER,				//	user ref
	CLASS_RENDERFBO,				//	user ref
	CLASS_CGPARAM,					//	user ptr
									//
	CLASS_SOUNDCAPTURE,				//
									//
	CLASS_SOUNDNODE,				//	user ref
	CLASS_SOUNDLISTENER,			//
	CLASS_SCENENODE,				//	user ref
	CLASS_ACTORNODE,				//	user ref
	CLASS_ODE,						//	group
	CLASS_PWORLD,					//	group
	CLASS_PCOLLIDER,				//
	CLASS_PJOINT,					//
	CLASS_PJOINTGROUP,				//
	CLASS_PSPACE,					//
	CLASS_PSPACESIMPLE,				//
	CLASS_PSPACEQUAD,				//
	CLASS_PSPACEHASH,				//
	CLASS_PGEOM,					//
	CLASS_PBODY,					//
	CLASS_PGEOMSPHERE,				//
	CLASS_PGEOMBOX,					//
	CLASS_PGEOMCUBE,				//
	CLASS_PGEOMCYLINDER,			//
	CLASS_PGEOMCONE,				//
	CLASS_PGEOMTERRAIN,				//
	CLASS_PGEOMTERRAINDATA,			//
	CLASS_PGEOMCCYLINDER,			//
	CLASS_PGEOMRAY,					//
	CLASS_PGEOMPLANE,				//
	CLASS_PGEOMTRANSFORM,			//
	CLASS_PGEOMTRIMESH,				//
	CLASS_PGEOMTRIMESHDATA,			//
	CLASS_PJOINTBALL,				//
	CLASS_PJOINTHINGE,				//
	CLASS_PJOINTSLIDER,				//
	CLASS_PJOINTCONTACT,			//
	CLASS_PJOINTUNIVERSAL,			//
	CLASS_PJOINTHINGE2,				//
	CLASS_PJOINTFIXED,				//
	CLASS_PJOINTAMOTOR,				//
									//
	CLASS_STATICARRAY,				//	group
	CLASS_INTARRAY,					//	user ref
	CLASS_FLOATARRAY,				//	user ref

	CLASS_SCALARARRAY,				//	user ref (supercedes staticarray and subclasses)
	CLASS_SCALARTYPE,				//	user enum
	CLASS_SCALAROP,					//	user enum

	// order IMPORTANT !! (gl_render sizeof array)
	CLASS_RCMD,						//	user ref
	CLASS_RCMD_CLEAR,				//	user ref
	CLASS_RCMD_STENCIL,				//	user ref
	CLASS_RCMD_DEPTH,				//	user ref
	CLASS_RCMD_FORCEFLAG,			//	user ref
	CLASS_RCMD_IGNOREFLAG,			//	user ref
	CLASS_RCMD_BASESHADERS,			//	user ref
	CLASS_RCMD_BASESHADERS_OFF,		//	user ref
	CLASS_RCMD_IGNOREEXTENDED,		//	user ref
	CLASS_RCMD_COPYTEX,				//	user ref
	CLASS_RCMD_DRAW2DMESH,			//	user ref
	CLASS_RCMD_DRAWBACKGROUND,		//	user ref
	CLASS_RCMD_DRAWLAYER,			//	user ref
	CLASS_RCMD_DRAWPARTICLES,		//	user ref
	CLASS_RCMD_DRAWL2D,				//	user ref
	CLASS_RCMD_DRAWL3D,				//	user ref
	CLASS_RCMD_GENMIPMAPS,			//	user ref
	CLASS_RCMD_FBO_BIND,			//	user ref		// all RCMDs >= RCMD_FBO will be used in FBO_CHECK
	CLASS_RCMD_FBO_OFF,				//	user ref
	CLASS_RCMD_FBO_TEXASSIGN,		//	user ref
	CLASS_RCMD_FBO_RBASSIGN,		//	user ref
	CLASS_RCMD_FBO_DRAWBUFFERS,		//	user ref
	CLASS_RCMD_BUFFER_BLIT,			//	user ref


	// resources
	CLASS_RESSUBID,					//	user int
	CLASS_RESOURCE,					//	group
	CLASS_SOUND,					//	user int
	CLASS_MUSIC,					//  user int
	CLASS_GPUPROG,					//	user int
	CLASS_ANIMATION,				//	user int
	CLASS_TRACKID,					//	user int
	CLASS_TEXTURE,					//	user int
	CLASS_MODEL,					//	user int
	CLASS_MESHID,					//	user int
	CLASS_SKINID,					//	user int
	CLASS_INDEXARRAY,				//	interface
	CLASS_VERTEXARRAY,				//	interface
	CLASS_BONEID,					//	user int
	CLASS_BONECONTROL,				//	user ref
	CLASS_MORPHCONTROL,				//	user ref
	CLASS_TRAILPOINT,				//	user ptr
	CLASS_PARTICLECLOUD,			//	user int
	CLASS_PARTICLEFORCEID,			//	user int
	CLASS_PARTICLE,					//	user ptr
	CLASS_PARTICLESYS,				//	user int
	CLASS_TBTERRAIN,				//	user int
	CLASS_TERRAINDECAL,				//	user ref
	CLASS_SHADERPARAMID,			//	user int
	CLASS_MATCONTROLID,				//	user int
	CLASS_MATTEXCONTROLID,			//	user int
	CLASS_MATSHDCONTROLID,			//	user int
	CLASS_MATERIAL,					//	user int
	CLASS_MATOBJECT,				//	interface
	CLASS_MATAUTOCONTROL,			//	user ref
	CLASS_SHADER,					//	user int

	// enviro
	CLASS_SKYBOX,					//	user ref

	// list3d
	CLASS_L3D_LIST,					//	group
	CLASS_L3D,						//	user ref
	CLASS_L3D_TEXT,					//	user ref
	CLASS_L3D_PROJECTOR,			//	user ref
	CLASS_L3D_LIGHT,				//	user ref
	CLASS_L3D_TBTERRAIN,			//	user ref
	CLASS_L3D_PGROUP,				//	user ref
	CLASS_L3D_PEMITTER,				//	user ref
	CLASS_L3D_MODEL,				//	user ref
	CLASS_L3D_SHADOWMODEL,			//	user ref
	CLASS_L3D_LEVELMODEL,			//	user ref
	CLASS_L3D_PRIMITIVE,			//	user ref
	CLASS_L3D_TRAIL,				//	user ref
	CLASS_L3D_VIEW,					//	user ref
	CLASS_L3D_CAMERA,				//	user ref
	CLASS_L3D_SET,					//	user int
	CLASS_L3D_LAYERID,				//	user int
	CLASS_L3D_BATCHBUFFER,			//	user ref

	// list2d
	CLASS_L2D_LIST,					//	group
	CLASS_L2D,						//	user ref
	CLASS_L2D_FLAG,					//	user ref
	CLASS_L2D_L3DLINK,				//	user ref
	CLASS_L2D_IMAGE,				//	user ref
	CLASS_L2D_TEXT,					//	user ref

	// LUA related
	CLASS_LUACORE,
	CLASS_LUAFUNCTION,

	CLASS_TEST, // testing purpose class, probably useful for unit tests
	 // only for debug compile

	CLASS_COUNT
} ClassType_t;

#ifdef __cplusplus
}
#endif

#endif

