 
#ifndef OBJECTH
#define OBJECTH
 
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
 
struct GLI_tdstDataOfElement_;
struct GLI_tdstInternalGlobalValuesFor3dEngine_;
/* For DLL using these function :*/
#include "cpa_expt.h" 
 
#include "gld.h"
#include "GEO.H"
/*#include "GAM\ToolsCPA.h"*/
/*#define C_IndexedTrianglesObject  0xC0DE0001
 
#define C_lDuplicable  1
#define C_lMobile      2 
#define C_lMorphable   4 */
 
extern CPA_EXPORT void 
GLI_xSendObjectToViewportWithLights ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
                                      struct GEO_tdstGeometricObject_ *p_stObj ,
                                      long lDrawModeMask);
 
extern CPA_EXPORT  void 
GLI_xSendObjectToViewport ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
                            struct GEO_tdstGeometricObject_ *p_stObj ,
                            struct GLI_tdstLight_ *p_stLight ,
                            long lDrawModeMask);
 
extern CPA_EXPORT  void 
GLI_vSetDefaultMaterial ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
						  ACP_tdxHandleOfMaterial hMaterial);
 
                                    
 
extern CPA_EXPORT  void
GLI_vCreateObjectsReference();
 
extern CPA_EXPORT  long
GLI_lPickSprites ( struct GLD_tdstViewportAttributes_ *p_stVpt ,
                   struct GEO_tdstGeometricObject_ *p_stObj ,
	          	   MTH2D_tdstVector *p_stMouseCoords,
				   ACP_tdxIndex xNbMaxElements,
				   ACP_tdxIndex *p_xNbElements,
				   struct GLI_tdstDataOfElement_ *d_stDataOfElement,
				   MTH3D_tdstVector *p_stVertexA,
				   ACP_tdxBool bBack);
 
extern CPA_EXPORT  void 
    GLI_vDraw2DSprite ( GLD_tdstViewportAttributes *p_stVpt ,
                       MTH_tdxReal  xXPointA,
                       MTH_tdxReal  xXPointB,
                       MTH_tdxReal  xYPointA,
                       MTH_tdxReal  xYPointB,
                       ACP_tdxHandleOfMaterial hMaterial);
 
extern CPA_EXPORT  void 
    GLI_vDraw2DSpriteWithUV ( GLD_tdstViewportAttributes *p_stVpt ,
                       MTH_tdxReal  xXMin,
                       MTH_tdxReal  xXMax,
                       MTH_tdxReal  xYMin,
                       MTH_tdxReal  xYMax,
                       MTH_tdxReal  xUMin,
                       MTH_tdxReal  xUMax,
                       MTH_tdxReal  xVMin,
                       MTH_tdxReal  xVMax,
                       ACP_tdxHandleOfMaterial hMaterial);
 
extern CPA_EXPORT  void 
    GLI_xSetRLIForNextObjectToDraw ( ISI_tdstColor *p_ListOfRLI,GEO_tdstGeometricObject *p_stObj);
 
/*extern CPA_EXPORT void 
    GLI_vSendPOToViewport ( GLD_tdstViewportAttributes *p_stVpt , PO_tdxHandleToPhysicalObject h_stPhysicalObject , long lDrawModeMask);
extern CPA_EXPORT void 
    GLI_vSendIPOToViewport ( GLD_tdstViewportAttributes *p_stVpt , IPO_tdxHandleToInstanciatedPhysicalObject h_stInstanciablePhysicalObject , long lDrawModeMask );*/
 
void
GLI_vObjectsEndOfDraw();
 
extern CPA_EXPORT void GLI_xComputeLightForObject(GEO_tdstGeometricObject *p_stObj,
                                GEO_tdstColor *Tab_stColor);
 
extern CPA_EXPORT void GLI_vSetGlobalAlpha(float Alpha);
extern CPA_EXPORT float GLI_vGetGlobalAlpha();
 
extern CPA_EXPORT ACP_tdxBool GLI_vAdjustCameraToMirror(
							ACP_tdxHandleOfObject hHandleOfGometricMirror,
						   GEO_tdxHandleToMatrix	hGlobalMatrixOfMirror,
						   GEO_tdxHandleToMatrix	hGlobalMatrixOfCamera,
						   struct GLI_tdstCamera_ *pstCamera,
						   GLD_tdstViewportAttributes *p_stVpt,
						   long lDrawModeMask);

extern CPA_EXPORT void GLI_vDoMaterialSelection(struct GLI_tdstInternalGlobalValuesFor3dEngine_ *p_stGlobaleMT);
 
#ifdef __cplusplus
};
#endif /* __cplusplus */
 
#endif  /* OBJECTH*/
