2024-05-20 09:09:08 -03:00
|
|
|
#ifndef XNA_GRAPHICS_BUFFER_HPP
|
|
|
|
#define XNA_GRAPHICS_BUFFER_HPP
|
|
|
|
|
|
|
|
#include "../default.hpp"
|
|
|
|
#include "gresource.hpp"
|
|
|
|
|
|
|
|
namespace xna {
|
|
|
|
class ConstantBuffer : public GraphicsResource {
|
|
|
|
public:
|
|
|
|
ConstantBuffer();
|
|
|
|
ConstantBuffer(sptr<GraphicsDevice> const&);
|
2024-05-23 09:46:11 -03:00
|
|
|
~ConstantBuffer() override;
|
2024-05-20 09:09:08 -03:00
|
|
|
bool Initialize(xna_error_nullarg);
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
|
|
};
|
2024-05-20 09:32:34 -03:00
|
|
|
|
|
|
|
class DataBuffer : public GraphicsResource {
|
|
|
|
public:
|
|
|
|
DataBuffer();
|
|
|
|
DataBuffer(sptr<GraphicsDevice> const&);
|
2024-05-23 09:46:11 -03:00
|
|
|
~DataBuffer() override;
|
2024-05-20 09:32:34 -03:00
|
|
|
bool Initialize(xna_error_nullarg);
|
|
|
|
|
2024-05-21 14:20:37 -03:00
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
|
|
};
|
|
|
|
|
|
|
|
class IndexBuffer : public GraphicsResource {
|
|
|
|
public:
|
|
|
|
IndexBuffer();
|
|
|
|
IndexBuffer(sptr<GraphicsDevice> const&);
|
2024-05-23 09:46:11 -03:00
|
|
|
~IndexBuffer() override;
|
2024-05-21 14:20:37 -03:00
|
|
|
|
|
|
|
template <typename T>
|
|
|
|
bool Initialize(std::vector<T> const& data, xna_error_nullarg);
|
|
|
|
bool Apply(xna_error_nullarg);
|
|
|
|
|
2024-05-20 09:32:34 -03:00
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
|
|
};
|
2024-05-23 15:32:50 -03:00
|
|
|
|
|
|
|
class VertexBuffer : public GraphicsResource {
|
|
|
|
public:
|
|
|
|
VertexBuffer();
|
|
|
|
VertexBuffer(sptr<GraphicsDevice> const&);
|
|
|
|
~VertexBuffer();
|
|
|
|
template <typename T>
|
|
|
|
bool Initialize(std::vector<T> const& data, xna_error_nullarg);
|
|
|
|
bool Apply(xna_error_nullarg);
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
|
|
};
|
2024-05-23 16:43:07 -03:00
|
|
|
|
|
|
|
class VertexInputLayout : public GraphicsResource {
|
|
|
|
public:
|
|
|
|
VertexInputLayout();
|
|
|
|
VertexInputLayout(sptr<GraphicsDevice> const&);
|
|
|
|
~VertexInputLayout();
|
|
|
|
|
|
|
|
bool Initialize(DataBuffer& blob, xna_error_nullarg);
|
|
|
|
|
|
|
|
public:
|
|
|
|
struct PlatformImplementation;
|
|
|
|
uptr<PlatformImplementation> impl = nullptr;
|
|
|
|
};
|
2024-05-20 09:09:08 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|