diff options
| author | Miles Macklin <[email protected]> | 2017-06-09 13:41:15 +1200 |
|---|---|---|
| committer | Miles Macklin <[email protected]> | 2017-06-09 13:41:15 +1200 |
| commit | 688b5f42e9bfe498d7af7075d4d8f4429867f3a3 (patch) | |
| tree | 7e0d0e7c95298f0418723abd92f61ac6e16b055e /demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h | |
| parent | Update README.md (diff) | |
| download | flex-688b5f42e9bfe498d7af7075d4d8f4429867f3a3.tar.xz flex-688b5f42e9bfe498d7af7075d4d8f4429867f3a3.zip | |
1.2.0.beta.11.2.0.beta.1
Diffstat (limited to 'demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h')
| -rw-r--r-- | demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h b/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h new file mode 100644 index 0000000..96d326b --- /dev/null +++ b/demo/d3d12/fluidEllipsoidRenderPipelineD3D12.h @@ -0,0 +1,60 @@ +/* +* Copyright (c) 2008-2016, NVIDIA CORPORATION. All rights reserved. +* +* NVIDIA CORPORATION and its licensors retain all intellectual property +* and proprietary rights in and to this software, related documentation +* and any modifications thereto. Any use, reproduction, disclosure or +* distribution of this software and related documentation without an express +* license agreement from NVIDIA CORPORATION is strictly prohibited. +*/ + +#ifndef FLUID_ELLIPSOID_RENDER_PIPELINE_D3D12_H +#define FLUID_ELLIPSOID_RENDER_PIPELINE_D3D12_H + +#include <DirectXMath.h> +#include "RenderStateD3D12.h" +#include "../d3d/renderParamsD3D.h" +#include "meshRenderer.h" + +#include <NvCoDx12RenderTarget.h> + +namespace FlexHlsl { +struct FluidShaderConst; +} // namespace FlexHlsl + +namespace FlexSample { +using namespace nvidia; + +struct FluidEllipsoidRenderPipelineD3D12: public RenderPipeline +{ + //NV_CO_DECLARE_POLYMORPHIC_CLASS(FluidEllipsoidRenderPipelineD3D12, RenderPipeline); +public: + typedef RenderPipeline Parent; + + enum PipelineStateType + { + PIPELINE_NORMAL, + PIPELINE_STATE_COUNT_OF, + }; + + FluidEllipsoidRenderPipelineD3D12(); + + /// Initialize + int initialize(const RenderStateD3D12& state, const std::wstring& shadersDir, NvCo::Dx12RenderTarget* renderTarget); + /// Do the binding + virtual int bind(const void* paramsIn, const void* platformState) override; + virtual int draw(const RenderAllocation& alloc, size_t sizeOfAlloc, const void* platformState) override; + + /// Convert into a single pipeline state type + static PipelineStateType getPipelineStateType(FluidDrawStage stage, FluidRenderMode mode, FluidCullMode cull) { return PIPELINE_NORMAL; } + + protected: + + int _initPipelineState(const RenderStateD3D12& state, FrontWindingType winding, NvCo::Dx12RenderTarget* renderTarget, PipelineStateType pipeType, ID3D12RootSignature* signiture, D3D12_GRAPHICS_PIPELINE_STATE_DESC& psoDesc); + + PipelineStateD3D12 m_states[PIPELINE_STATE_COUNT_OF]; +}; + +} // namespace FlexSample + +#endif
\ No newline at end of file |