//========================================================================
// OpenGL renderers
//
// AUTHOR:  Gabor Nagy
// DATE:    2024-Nov-05 01:25:02
//
// Copyright (C) 1996-2026 by Gabor Nagy. All rights reserved.
//========================================================================
#ifndef _E3D_GL_Rendering_h
#define _E3D_GL_Rendering_h

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

typedef struct
{
	float  Ambient[4], Diffuse[4], Specular[4];
	float  Position[4];
	float  SpotDirection[4];
	float  SpotExponent, SpotCutoffAngle;
	float  ConstAttenuation, LinAttenuation, AttenuationQuadratic;
} E3dGLLight;
EList_t(E3dGLLight);

// Fixed-pipeline OpenGL renderer
//
typedef struct
{
	E3dGPURendererCore;

	EList_s(, E3dGLLight, GLLights);
} E3dOpenGLRenderer;


typedef int  (*E3dDrawShadowPassFunc)(E3dWindow* P3DWindow, E3dScene* PScene, E3dOpenGLRenderer* PRenderer, E3dDrawContext* PDrawContext, const uint32_t PSubCameraID,  E3dRLightInstance* PLightInstance,  const E3dMatrix PWorldToViewerMatrix, const EBool PDrawCamera);
extern E3dDrawShadowPassFunc   E3d_DrawShadowPass;

extern void    E3dRenderer_GLDefineLights(E3dOpenGLRenderer* PRenderer);


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

#endif	// _E3D_GL_Rendering_h
