1
0
mirror of https://github.com/borgesdan/xn65 synced 2024-12-29 21:54:47 +01:00
xn65/framework/platform/constbuffer-dx.hpp

29 lines
649 B
C++
Raw Normal View History

2024-04-12 15:21:00 -03:00
#ifndef XNA_PLATFORM_CONSTBUFFER_DX_HPP
#define XNA_PLATFORM_CONSTBUFFER_DX_HPP
#include "../graphics/constbuffer.hpp"
#include "../common/matrix.hpp"
#include "dxheaders.hpp"
2024-04-24 14:40:14 -03:00
#include <BufferHelpers.h>
2024-04-12 15:21:00 -03:00
namespace xna {
class ConstantBuffer : public IConstantBuffer {
public:
virtual ~ConstantBuffer() override {
if (_buffer) {
_buffer->Release();
_buffer = nullptr;
}
}
virtual bool Initialize(GraphicsDevice& device, xna_error_nullarg) override;
public:
D3D11_BUFFER_DESC _description{};
D3D11_SUBRESOURCE_DATA _subResource{};
ID3D11Buffer* _buffer = nullptr;
DirectX::XMMATRIX _worldViewProjection;
};
}
#endif