#include "Metal/Metal.hpp"
#include "math3d.h"
#include "filesystem.h"
#include "rendering.h"
#include "tier0/lib.h"
#include "tier1/utlvector.h"
#include "tier0/platform.h"
#include "rendering.h"

mat4 g_cameraView;

IStorageBuffer *IRenderer::CreateStorageBuffer( uint32_t uSize )
{
}

IUniformBuffer *IRenderer::CreateUniformBuffer( uint32_t uSize )
{
}


IVertexBuffer *IRenderer::CreateVertexBuffer( uint32_t uSize )
{
}

IIndexBuffer *IRenderer::CreateIndexBuffer( uint32_t uSize )
{
}


IImage *IRenderer::CreateImage( EImageFormat format, uint32_t usage, uint32_t nWidth, uint32_t nHeight, uint32_t nSamples )
{

};
void IRenderer::DestroyBuffer( IBuffer *pBuffer )
{

}

void IRenderer::DestroyImage( IImage *pImage )
{

}



void IRenderer::SetConstants( uint32_t nSize, uint32_t nOffset, void *pData )
{

}

void IRenderer::Barrier( EBarrierStage stageIn, uint32_t stageOut, CUtlVector<BufferBarrier_t> buffers, CUtlVector<ImageBarrier_t> images )
{

}

void IRenderer::BindData( uint32_t binding, IBuffer *pBuffer, IImage* pImage)
{

}



void IRenderer::BindPipeline( IPipeline *pPipeline )
{

}


void IRenderer::Begin( uint32_t nWidth, uint32_t nHeight, CUtlVector<RenderingColorAttachment_t> attachments, RenderingDepthAttachment_t depth )
{

}

void IRenderer::ResetState()
{

}

void IRenderer::SetDepthMode( EDepthMode mode )
{

}

void IRenderer::Draw( IVertexBuffer *pVertex, IIndexBuffer *pIndex )
{

}

void IRenderer::End()
{
}



IGraphicsPipeline *IRenderer::CreateGraphicsPipeline(
	CUtlVector<Shader_t> shaders,
	CUtlVector<ShaderInput_t> inputs,
	uint32_t nConstantsSize,
	CUtlVector<EImageFormat> outputFormats
)
{

};


CUtlVector<RenderingStep_t> g_StepPrepass;
CUtlVector<RenderingStep_t> g_StepMeshRendering;
CUtlVector<RenderingStep_t> g_StepShading;
CUtlVector<RenderingStep_t> g_StepPostProcessing;
CUtlVector<RenderingStep_t> g_StepUI;

CRenderingStep::CRenderingStep()
{

}

CRenderingStep::CRenderingStep(const char *szStepName, CreateRenderStepFn pfn)
{

}
	
CPrepassRenderingStep::CPrepassRenderingStep(const char *szStepName, CreateRenderStepFn pfn)
{
	g_StepPrepass.AppendTail({pfn(), szStepName});
}

CMeshRenderingStep::CMeshRenderingStep(const char *szStepName, CreateRenderStepFn pfn)
{
	g_StepMeshRendering.AppendTail({pfn(), szStepName});
}

CShadingRenderingStep::CShadingRenderingStep(const char *szStepName, CreateRenderStepFn pfn)
{
	g_StepShading.AppendTail({pfn(), szStepName});
}

CPostProcessingRenderingStep::CPostProcessingRenderingStep(const char *szStepName, CreateRenderStepFn pfn)
{
	g_StepPostProcessing.AppendTail({pfn(), szStepName});
}

CUIRenderingStep::CUIRenderingStep(const char *szStepName, CreateRenderStepFn pfn)
{
	g_StepUI.AppendTail({pfn(), szStepName});
}

