// Copyright (C) 2026 DarkMatter Productions
//

#ifndef __RENDERER_STARTUP_DIAGNOSTICS_H__
#define __RENDERER_STARTUP_DIAGNOSTICS_H__

#include <signal.h>

typedef enum rendererStartupPhase_e {
	RENDERER_STARTUP_PHASE_IDLE = 0,
	RENDERER_STARTUP_PHASE_R_INIT_OPENGL,
	RENDERER_STARTUP_PHASE_R_CHECK_PORTABLE_EXTENSIONS,
	RENDERER_STARTUP_PHASE_R_ARB2_INIT,
	RENDERER_STARTUP_PHASE_R_RELOAD_ARB_PROGRAMS,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_FULL_UPLOAD,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_SIMPLE_UPLOAD,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_SKIP_FULL_UPLOAD,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_COLOR_MODE,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_FULL_SELECTION,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_SIMPLE_SELECTION,
	RENDERER_STARTUP_PHASE_R_RENDERER_UPLOAD_INIT,
	RENDERER_STARTUP_PHASE_VERTEX_CACHE_INIT,
	RENDERER_STARTUP_PHASE_SET_BACK_END_RENDERER,
	RENDERER_STARTUP_PHASE_READY,
	RENDERER_STARTUP_PHASE_FIRST_ARB2_INTERACTION_HANDOFF,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_DRIVER_BYPASS,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_BYPASS_STATE_RESTORED,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_BYPASS_LIGHT_SCALE,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_BYPASS_LIGHT_SCALE_SKIPPED,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_BYPASS_AMBIENT_RESCUE,
	RENDERER_STARTUP_PHASE_ARB2_INTERACTION_BYPASS_FRAME_TAIL,
	RENDERER_STARTUP_PHASE_COUNT
} rendererStartupPhase_t;

void R_SetRendererStartupPhase( rendererStartupPhase_t phase );
void R_RecordRendererStartupPhase( rendererStartupPhase_t phase );
rendererStartupPhase_t R_GetRendererStartupPhase( void );
const char *R_RendererStartupPhaseName( rendererStartupPhase_t phase );
const char *R_RendererStartupPhaseSignalName( void );

#endif
