2024-04-09 15:15:11 -03:00
|
|
|
#ifndef XNA_PLATFORM_VERTEXINPUT_DX_HPP
|
|
|
|
#define XNA_PLATFORM_VERTEXINPUT_DX_HPP
|
|
|
|
|
|
|
|
#include "../graphics/vertexinput.hpp"
|
|
|
|
#include "dxgi.h"
|
|
|
|
#include "d3d11.h"
|
|
|
|
|
|
|
|
namespace xna {
|
|
|
|
class VertexInputLayout : public IVertexInputLayout {
|
|
|
|
public:
|
2024-04-12 15:21:00 -03:00
|
|
|
VertexInputLayout() = default;
|
|
|
|
|
2024-04-09 15:15:11 -03:00
|
|
|
VertexInputLayout(
|
|
|
|
std::vector<D3D11_INPUT_ELEMENT_DESC> const& description) :
|
2024-04-12 15:21:00 -03:00
|
|
|
_description(description){}
|
2024-04-09 15:15:11 -03:00
|
|
|
|
|
|
|
virtual ~VertexInputLayout() override{
|
|
|
|
if (_inputLayout) {
|
|
|
|
_inputLayout->Release();
|
|
|
|
_inputLayout = nullptr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2024-04-12 15:21:00 -03:00
|
|
|
virtual bool Initialize(GraphicsDevice& device, DataBuffer& blob, xna_error_nullarg);
|
2024-04-09 15:15:11 -03:00
|
|
|
|
|
|
|
public:
|
|
|
|
ID3D11InputLayout* _inputLayout{ nullptr };
|
2024-04-12 15:21:00 -03:00
|
|
|
std::vector<D3D11_INPUT_ELEMENT_DESC> _description{};
|
2024-04-09 15:15:11 -03:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|