#pragma once

#include "OpenGLRenderer.h"
#include "ShaderTypes.h"

#include <gl/gl.h>

#include <cstddef>
#include <string>

enum class RenderPassKind
{
	LayerEffect
};

enum class RenderPassOutputTarget
{
	Temporary,
	LayerTemp,
	Composite
};

struct RenderPassDescriptor
{
	RenderPassKind kind = RenderPassKind::LayerEffect;
	RenderPassOutputTarget outputTarget = RenderPassOutputTarget::Composite;
	std::size_t passIndex = 0;
	std::string passId;
	std::string layerId;
	std::string shaderId;
	GLuint layerInputTexture = 0;
	GLuint sourceTexture = 0;
	GLuint sourceFramebuffer = 0;
	GLuint destinationTexture = 0;
	GLuint destinationFramebuffer = 0;
	OpenGLRenderer::LayerProgram* layerProgram = nullptr;
	OpenGLRenderer::LayerProgram::PassProgram* passProgram = nullptr;
	const RuntimeRenderState* layerState = nullptr;
	bool capturePreLayerHistory = false;
	bool captureFeedbackWrite = false;
};
