#pragma once #include #include namespace TEN::Renderer { class RenderPipelineState; struct ShaderCompileOptions { std::wstring fileName; std::string functionName; std::string profile; std::string source; }; struct BlendStateOptions { enum BlendFunction { SRC_ADD_DST, SRC_SUBTRACT_DST, DST_SUBTRACT_SRC, MIN, MAX }; enum BlendFactor { ZERO, ONE, SRC_COLOR, INV_SRC_COLOR, SRC_ALPHA, INV_SRC_ALPHA, DST_ALPHA, INV_DST_ALPHA, DST_COLOR, INV_DST_COLOR, ALPHA_SAT, BLEND_FACTOR, INV_BLEND_FACTOR, }; BlendFunction blendFunction; BlendFactor sourceColorFactor; BlendFactor sourceAlphaFactor; BlendFactor destinationColorFactor; BlendFactor destinationAlphaFactor; bool blendingEnabled; }; using Microsoft::WRL::ComPtr; class RenderPipelineState { private: ComPtr inputLayout; ComPtr vertexShader; ComPtr pixelShader; ComPtr blendState; ComPtr depthState; public: RenderPipelineState(ID3D11Device* device, const ShaderCompileOptions& vertexShader, const ShaderCompileOptions& pixelShader, const BlendStateOptions& blendingOptions); }; }