1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- #pragma once
- #include "Betriebssystem.h"
- #include "ReferenceCounter.h"
- #ifdef WIN32
- struct ID3D11Buffer;
- struct D3D11_BUFFER_DESC;
- struct ID3D11ShaderResourceView;
- struct ID3D11Device;
- struct ID3D11DeviceContext;
- #endif
- namespace Framework
- {
- class DX12CopyCommandQueue;
- class DX12DirectCommandQueue;
-
- class DXBuffer : public virtual ReferenceCounter
- {
- protected:
- void* data;
- bool changed;
- int len;
- int elLen;
- public:
-
-
-
-
- DLLEXPORT DXBuffer(int eLen);
-
- DLLEXPORT virtual ~DXBuffer();
-
-
- DLLEXPORT void setChanged();
-
-
- DLLEXPORT void setLength(int len);
-
-
- DLLEXPORT void setData(void* data);
-
- DLLEXPORT virtual void copieren(int byteCount = -1) = 0;
-
- DLLEXPORT int getElementLength() const;
-
- DLLEXPORT int getElementAnzahl() const;
- };
- #ifdef WIN32
-
- class DX11Buffer : public DXBuffer
- {
- protected:
- D3D11_BUFFER_DESC* description;
- ID3D11Buffer* buffer;
- ID3D11Device* device;
- ID3D11DeviceContext* context;
- public:
-
-
- DLLEXPORT DX11Buffer(int eSize,
- ID3D11Device* device,
- ID3D11DeviceContext* context,
- int bindFlags);
-
- DLLEXPORT virtual ~DX11Buffer();
-
- DLLEXPORT void copieren(int byteCount = -1) override;
-
- DLLEXPORT ID3D11Buffer* zBuffer() const;
- };
-
-
- class DX11StructuredBuffer : public DX11Buffer
- {
- private:
- ID3D11ShaderResourceView* view;
- public:
-
-
- DLLEXPORT DX11StructuredBuffer(
- int eSize, ID3D11Device* device, ID3D11DeviceContext* context);
-
- DLLEXPORT virtual ~DX11StructuredBuffer();
-
- DLLEXPORT void copieren(int byteCount = -1) override;
-
- DLLEXPORT operator ID3D11ShaderResourceView*() const;
- };
- #endif
- }
|