//========================================================================
// GL VertexArrays
//
// AUTHOR:  Gabor Nagy
// DATE:    2024-Oct-20 20:11:59
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//========================================================================
#ifndef _E3D_GLVertexArrays_h
#define _E3D_GLVertexArrays_h


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
extern "C" {
#endif

#define E3dGL_GPU_SKINNING_MAX_JOINTS_PER_VERTEX  4

extern void  E3dPolyGroup_GLFreeRenderData(E3dPolyGroup* PPolyGroup);
extern void  E3dPolyGroup_FreeVertexArrays(E3dPolyGroup* PPolyGroup);
extern int   E3dPolyGroup_GLCreateVertexArray(E3dPolyGroup* PPolyGroup,  const E3dVertex* PVertices, const EIndex PNVertices, const E3dVertexSize PVertexSize);
extern void  E3dPolyGroup_FreeVertexArrays(E3dPolyGroup* PPolyGroup);

extern EIndex  _E3dPolyGroup_GLGetTextureMapperIndex(const E3dVertexGeometry* PVertexGeometry, const E3dPolyGroup* PPolyGroup, const E3dTextureMapper* PTextureMapper);
extern void    _E3dPolyGroup_GetHaveTxTgFlags(const E3dModel* PMOdel, const E3dVertexGeometry* PVertexGeometry, const E3dPolyGroup* PPolyGroup,  EBool* PMappersHaveTxTgFlags);

extern int   E3dPolyGroup_GLCreateVertexArrayExt(E3dPolyGroup* PPolyGroupN,  const E3dVertex* PVertices, const E3dVertexSize PVertexSize, const EIndex PVertices_Count,
  uint8_tListA* PVertexArray, EIndex* PVertexArrayStride,
  EUnsignedIntListA* PTriangleVertexIndices, uint8_t* PTriangleVertexIndicesType, EIndex* PTriangleCount,
  const EBool PForceIndexed, const EBool PCompactIndexedMode, const EBool PAlwaysAddNormals);


#if defined (__cplusplus) && (!(defined (__CPLUSLIBS)))
}	// Close scope of 'extern "C"' declaration
#endif

#endif	// _E3D_GLVertexArrays_h
