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

32 lines
758 B
C++
Raw Normal View History

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:
VertexInputLayout(
GraphicsDevice* device,
std::vector<D3D11_INPUT_ELEMENT_DESC> const& description) :
_device(device), _description(description){}
virtual ~VertexInputLayout() override{
if (_inputLayout) {
_inputLayout->Release();
_inputLayout = nullptr;
}
}
virtual bool Initialize(ID3DBlob* blob, xna_error_nullarg);
public:
ID3D11InputLayout* _inputLayout{ nullptr };
std::vector<D3D11_INPUT_ELEMENT_DESC> _description{};
GraphicsDevice* _device = nullptr;
};
}
#endif