#ifndef __LUXINIA_REFTYPES_H__
#define __LUXINIA_REFTYPES_H__

#ifdef __cplusplus
extern "C" {
#endif

typedef enum luxiClassType_e {
	LUXI_CLASS_ANY = -1,				//
	LUXI_CLASS_ERROR = 0,				//
	LUXI_CLASS_BOOLEAN,					//	
	LUXI_CLASS_INT,						//	
	LUXI_CLASS_FLOAT,					//	
	LUXI_CLASS_DOUBLE,					//	
	LUXI_CLASS_STRING,					//	null terminated ANSI 8-bit char string
	LUXI_CLASS_BINSTRING,				//  binary strings
	LUXI_CLASS_CHAR,					//	single 8-bit char
	LUXI_CLASS_POINTER,					//  
	LUXI_CLASS_FUNCTION,				//	

	// WRAPPER with PubArray_t (order sensitive!)
	LUXI_CLASS_ARRAY_POINTER,			//	void**
	LUXI_CLASS_ARRAY_STRING,			//	char**
	LUXI_CLASS_ARRAY_INT,				//	int*
	LUXI_CLASS_ARRAY_FLOAT,				//	float*
	LUXI_CLASS_ARRAY_BOOLEAN,			//	bool8*

	// INTERNAL
	LUXI_CLASS_CLASS,					//	static, class definitions
	
	LUXI_CLASS_REFLIB,					//  static, reference library functions
	LUXI_CLASS_FILELOADER,				//	static

	// MATH
	LUXI_CLASS_MATH,					//	group
	LUXI_CLASS_MATRIX44,				//	user luxiRmatrix4x4
										//
	LUXI_CLASS_STATICARRAY,				//	group
	LUXI_CLASS_INTARRAY,				//	user luxiRintarray
	LUXI_CLASS_FLOATARRAY,				//	user luxiRfloatarray
										//
	LUXI_CLASS_SCALARARRAY,				//	user luxiRscalararray (supercedes staticarray and subclasses)
	LUXI_CLASS_SCALARTYPE,				//	user enum
	LUXI_CLASS_SCALAROP,				//	user enum
	
	// RENDERINTERFACE
	LUXI_CLASS_RENDERINTERFACE,			//	group
										//
	LUXI_CLASS_TECHNIQUE,				//	user enum
	LUXI_CLASS_VERTEXTYPE,				//	user enum
	LUXI_CLASS_MESHTYPE,				//	user enum
	LUXI_CLASS_TEXTYPE,					//	user enum
	LUXI_CLASS_TEXDATATYPE,				//	user enum
	LUXI_CLASS_BLENDMODE,				//	user enum
	LUXI_CLASS_OPERATIONMODE,			//	user enum
	LUXI_CLASS_COMPAREMODE,				//	user enum
	LUXI_CLASS_LOGICMODE,				//	user enum
	LUXI_CLASS_PRIMITIVETYPE,			//	user enum
	LUXI_CLASS_BUFFERTYPE,				//	user enum
	LUXI_CLASS_BUFFERHINT,				//	user enum
	LUXI_CLASS_BUFFERMAPPING,			//	user enum

										//
	LUXI_CLASS_TEXCOMBINER,				//	group
	LUXI_CLASS_TEXCOMBINER_CFUNC,		//	user enum
	LUXI_CLASS_TEXCOMBINER_AFUNC,		//	user enum
	LUXI_CLASS_TEXCOMBINER_SRC,			//	user enum
	LUXI_CLASS_TEXCOMBINER_OP,			//	user enum
										//
	LUXI_CLASS_RENDERFLAG,				//	interface
	LUXI_CLASS_RENDERSURF,				//	interface
	LUXI_CLASS_RENDERSTENCIL,			//	interface
	LUXI_CLASS_MATSURF,					//	group/interface
										//
										// order IMPORTANT !! (gl_render sizeof array)
	LUXI_CLASS_RCMD,					//	user luxiRrcmd
	LUXI_CLASS_RCMD_CLEAR,				//	user luxiRrcmdclear
	LUXI_CLASS_RCMD_STENCIL,			//	user luxiRrcmdstencil
	LUXI_CLASS_RCMD_DEPTH,				//	user luxiRrcmddepth
	LUXI_CLASS_RCMD_LOGICOP,			//	user luxiRrcmdlogicop
	LUXI_CLASS_RCMD_FORCEFLAG,			//	user luxiRrcmdforceflag
	LUXI_CLASS_RCMD_IGNOREFLAG,			//	user luxiRrcmdignoreflag
	LUXI_CLASS_RCMD_BASESHADERS,		//	user luxiRrcmdshaders
	LUXI_CLASS_RCMD_BASESHADERS_OFF,	//	user luxiRrcmdshadersoff
	LUXI_CLASS_RCMD_IGNOREEXTENDED,		//	user luxiRrcmdignore
	LUXI_CLASS_RCMD_COPYTEX,			//	user luxiRrcmdcopytex
	LUXI_CLASS_RCMD_DRAWMESH,			//	user luxiRrcmddrawmesh
	LUXI_CLASS_RCMD_DRAWBACKGROUND,		//	user luxiRrcmddrawbg
	LUXI_CLASS_RCMD_DRAWDEBUG,			//	user luxiRrcmddrawdbg
	LUXI_CLASS_RCMD_DRAWLAYER,			//	user luxiRrcmddrawlayer
	LUXI_CLASS_RCMD_DRAWPARTICLES,		//	user luxiRrcmddrawprt
	LUXI_CLASS_RCMD_DRAWL2D,			//	user luxiRrcmddrawl2d
	LUXI_CLASS_RCMD_DRAWL3D,			//	user luxiRrcmddrawl3d
	LUXI_CLASS_RCMD_GENMIPMAPS,			//	user luxiRrcmdmipmaps
	LUXI_CLASS_RCMD_READPIXELS,			//	user luxiRrcmdreadpixels
	LUXI_CLASS_RCMD_R2VB,				//	user luxiRrcmdr2vb

										// all RCMDs >= RCMD_FBO will be used in FBO_CHECK
	LUXI_CLASS_RCMD_FBO_BIND,			//	user luxiRrcmdfbobind		
	LUXI_CLASS_RCMD_FBO_OFF,			//	user luxiRrcmdfbooff
	LUXI_CLASS_RCMD_FBO_TEXASSIGN,		//	user luxiRrcmdfbotex
	LUXI_CLASS_RCMD_FBO_RBASSIGN,		//	user luxiRrcmdfborb
	LUXI_CLASS_RCMD_FBO_DRAWBUFFERS,	//	user luxiRrcmdfbodrawto
	LUXI_CLASS_RCMD_FBO_READBUFFER,		//	user luxiRrcmdfboreadfrom
	LUXI_CLASS_RCMD_BUFFER_BLIT,		//	user luxiRrcmdfboblit
										//
	LUXI_CLASS_INDEXARRAY,				//	interface
	LUXI_CLASS_VERTEXARRAY,				//	interface
	LUXI_CLASS_MATOBJECT,				//	interface
										//
	LUXI_CLASS_MATAUTOCONTROL,			//	user luxiRmatautocontrol
	LUXI_CLASS_RENDERBUFFER,			//	user luxiRrenderbuffer
	LUXI_CLASS_RENDERFBO,				//	user luxiRrenderfbo
	LUXI_CLASS_VIDBUFFER,				//	user luxiRvidbuffer
	LUXI_CLASS_RENDERMESH,				//	user luxiRrendermesh
	LUXI_CLASS_CGPARAM,					//	user ptr (CGparameter)



	// OTHER/SYSTEM
	LUXI_CLASS_CONSOLE,					//	static
	LUXI_CLASS_RESDATA,					//	static
	LUXI_CLASS_RESCHUNK,				//	user ptr (ResChunk_t*)
	LUXI_CLASS_WINDOW,					//	static
	LUXI_CLASS_SYSTEM,					//	static
	LUXI_CLASS_INPUT,					//	static
	LUXI_CLASS_CAPABILITY,				//	static
	LUXI_CLASS_PGRAPH,					//	static / user int
	LUXI_CLASS_RENDERDEBUG,				//	static
	LUXI_CLASS_RENDERSYS,				//	static
	LUXI_CLASS_VISTEST,					//	static

	// SOUND
	LUXI_CLASS_SOUNDNODE,				//	user luxiRsoundnode
	LUXI_CLASS_SOUNDLISTENER,			//  static
	LUXI_CLASS_SOUNDCAPTURE,			//  static
	LUXI_CLASS_MUSIC,					//  static

	// SPATIAL
	LUXI_CLASS_SPATIALNODE,				//	group
	LUXI_CLASS_SCENENODE,				//	user luxiRactornode
	LUXI_CLASS_ACTORNODE,				//	user luxiRscenenode

	// RESOURCES
	LUXI_CLASS_RESOURCE,				//	group
	LUXI_CLASS_SOUND,					//	user luxiRIDsound
	LUXI_CLASS_GPUPROG,					//	user luxiRIDgpuprog
	LUXI_CLASS_ANIMATION,				//	user luxiRIDanimation
	LUXI_CLASS_TEXTURE,					//	user luxiRIDtexture
	LUXI_CLASS_MODEL,					//	user luxiRIDmodel
	LUXI_CLASS_PARTICLECLOUD,			//	user luxiRIDprtcloud
	LUXI_CLASS_MATERIAL,				//	user luxiRIDmaterial
	LUXI_CLASS_SHADER,					//	user luxiRIDshader
	LUXI_CLASS_PARTICLESYS,				//	user luxiRIDprtsys
	LUXI_CLASS_TBTERRAIN,				//	user luxiRIDtbterrain
										//
	LUXI_CLASS_RESSUBID,				//	group (16 bit hostid, 16 bit subid)
	LUXI_CLASS_SHADERPARAMID,			//	user int
	LUXI_CLASS_MATCONTROLID,			//	user int
	LUXI_CLASS_MATTEXCONTROLID,			//	user int
	LUXI_CLASS_MATSHDCONTROLID,			//	user int
	LUXI_CLASS_PARTICLEFORCEID,			//	user int
	LUXI_CLASS_MESHID,					//	user int
	LUXI_CLASS_SKINID,					//	user int
	LUXI_CLASS_BONEID,					//	user int
	LUXI_CLASS_TRACKID,					//	user int

	LUXI_CLASS_PARTICLE,				//	user ptr



	// list3d
	LUXI_CLASS_L3D_LIST,				//	group
	LUXI_CLASS_L3D_SET,					//	user int
	LUXI_CLASS_L3D_LAYERID,				//	user int
	LUXI_CLASS_L3D_BATCHBUFFER,			//	user luxiRl3dbatchbuffer
										//
	LUXI_CLASS_L3D_NODE,				//	user luxiRl3dnode
	LUXI_CLASS_L3D_TEXT,				//	user luxiRl3dtext
	LUXI_CLASS_L3D_PROJECTOR,			//	user luxiRl3dprojector
	LUXI_CLASS_L3D_LIGHT,				//	user luxiRl3dlight
	LUXI_CLASS_L3D_TBTERRAIN,			//	user luxiRl3dtbterrain
	LUXI_CLASS_L3D_PGROUP,				//	user luxiRl3dpgroup
	LUXI_CLASS_L3D_PEMITTER,			//	user luxiRl3dpemitter
	LUXI_CLASS_L3D_MODEL,				//	user luxiRl3dmodel
	LUXI_CLASS_L3D_SHADOWMODEL,			//	user luxiRl3dshadowmodel
	LUXI_CLASS_L3D_LEVELMODEL,			//	user luxiRl3dlevelmodel
	LUXI_CLASS_L3D_PRIMITIVE,			//	user luxiRl3dprimitive
	LUXI_CLASS_L3D_TRAIL,				//	user luxiRl3dtrail
	LUXI_CLASS_L3D_CAMERA,				//	user luxiRl3dcamera
	
	LUXI_CLASS_L3D_VIEW,				//	user luxiRl3dview
	LUXI_CLASS_FRUSTUMOBJECT,			//  user luxiRfrustumobject
	LUXI_CLASS_SKYBOX,					//	user luxiRskybox
	LUXI_CLASS_TRAILPOINT,				//	user ptr
	LUXI_CLASS_BONECONTROL,				//	user luxiRbonecontrol
	LUXI_CLASS_MORPHCONTROL,			//	user luxiRmorphcontrol
	

	// list2d
	LUXI_CLASS_L2D_LIST,				//	group
	LUXI_CLASS_L2D_NODE,				//	user luxiRl2dnode
	LUXI_CLASS_L2D_FLAG,				//	user luxiRl2dflag
	LUXI_CLASS_L2D_L3DLINK,				//	user luxiRl2dnode3d
	LUXI_CLASS_L2D_IMAGE,				//	user luxiRl2dimage
	LUXI_CLASS_L2D_TEXT,				//	user luxiRl2dtext
	LUXI_CLASS_L2D_L3DVIEW,				//	user luxiRl2dview3d

	// STANDALONE
	LUXI_CLASS_FONTSET,					//	user luxiRfontset
	LUXI_CLASS_TERRAINDECAL,			//	user luxiRterraindecal


	// LUA related
	LUXI_CLASS_LUACORE,
	LUXI_CLASS_LUAFUNCTION,

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

	// ODE
	LUXI_CLASS_ODE,						//	group
	LUXI_CLASS_PCOLLRESULT,				//	collision result
	LUXI_CLASS_PWORLD,					//	group
	LUXI_CLASS_PCOLLIDER,				//  user ref - all following
	LUXI_CLASS_PJOINT,					//
	LUXI_CLASS_PJOINTGROUP,				//
	LUXI_CLASS_PSPACE,					//
	LUXI_CLASS_PSPACESIMPLE,			//
	LUXI_CLASS_PSPACEQUAD,				//
	LUXI_CLASS_PSPACEHASH,				//
	LUXI_CLASS_PGEOM,					//
	LUXI_CLASS_PBODY,					//
	LUXI_CLASS_PGEOMSPHERE,				//
	LUXI_CLASS_PGEOMBOX,				//
	LUXI_CLASS_PGEOMCUBE,				//
	LUXI_CLASS_PGEOMCYLINDER,			//
	LUXI_CLASS_PGEOMCONE,				//
	LUXI_CLASS_PGEOMTERRAIN,			//
	LUXI_CLASS_PGEOMTERRAINDATA,		//
	LUXI_CLASS_PGEOMCCYLINDER,			//
	LUXI_CLASS_PGEOMRAY,				//
	LUXI_CLASS_PGEOMPLANE,				//
	LUXI_CLASS_PGEOMTRANSFORM,			//
	LUXI_CLASS_PGEOMTRIMESH,			//
	LUXI_CLASS_PGEOMTRIMESHDATA,		//
	LUXI_CLASS_PJOINTBALL,				//
	LUXI_CLASS_PJOINTHINGE,				//
	LUXI_CLASS_PJOINTSLIDER,			//
	LUXI_CLASS_PJOINTCONTACT,			//
	LUXI_CLASS_PJOINTUNIVERSAL,			//
	LUXI_CLASS_PJOINTHINGE2,			//
	LUXI_CLASS_PJOINTFIXED,				//
	LUXI_CLASS_PJOINTAMOTOR,			//

	LUXI_CLASS_COUNT,


	LUXI_CLASS_MAX = 256,
	LUXI_CLASS_FORCE_DWORD = 0x7FFFFFFF,
} luxiClassType;

#ifdef __cplusplus
}
#endif

#endif

