12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- #pragma once
- #include "Shader.h"
- #include "DX12Buffer.h"
- struct ID3D12Device;
- struct ID3D12GraphicsCommandList;
- struct D3D12_INPUT_ELEMENT_DESC;
- struct D3D12_ROOT_PARAMETER1;
- struct D3D12_CONSTANT_BUFFER_VIEW_DESC;
- namespace Framework
- {
- class DX12Shader : public Shader
- {
- protected:
- ID3D12Device* device;
- DX12CopyCommandQueue* copy;
- DX12DirectCommandQueue* direct;
- unsigned char* shaderByteBuffer;
- int byteBufferSize;
- public:
- DX12Shader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
- virtual ~DX12Shader();
-
-
-
-
-
- virtual bool erstelleConstBuffer( int size, int index ) override;
-
-
-
-
-
- bool setCompiledByteArray( unsigned char* bytes, int length ) override;
-
-
- void benutzeShader() override;
-
- unsigned char* getCompiledShader() const;
-
- int getCompiledLength() const;
-
-
-
- virtual void getViewDesc( int index, D3D12_CONSTANT_BUFFER_VIEW_DESC& view );
- };
- class DX12PixelShader : public DX12Shader
- {
- public:
- DX12PixelShader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
- };
- class DX12VertexShader : public DX12Shader
- {
- private:
- D3D12_INPUT_ELEMENT_DESC* inputLayout;
- int inputLayoutSize;
- public:
-
- DX12VertexShader( ID3D12Device* device, DX12CopyCommandQueue* copy, DX12DirectCommandQueue* direct );
-
- ~DX12VertexShader();
-
-
-
-
-
- bool erstelleInputLayout( D3D12_INPUT_ELEMENT_DESC* descArray, int anz );
-
- int getInputLayoutSize() const;
-
- D3D12_INPUT_ELEMENT_DESC* zInputLayout() const;
- };
- }
|