1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192 |
- #pragma once
- #include "DX12Buffer.h"
- #include "Shader.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;
- };
- }
|