2022-10-03 18:51:34 +05:00
|
|
|
|
|
|
|
#include "buffer.hpp"
|
|
|
|
|
|
|
|
|
|
|
|
namespace hpr::gpu
|
|
|
|
{
|
|
|
|
|
|
|
|
Buffer::Buffer() :
|
|
|
|
Context {DeviceAPI::Unknown},
|
|
|
|
p_type {BufferType::Undefined},
|
|
|
|
p_size {0},
|
|
|
|
p_stride {0}
|
|
|
|
{}
|
|
|
|
|
|
|
|
Buffer::Buffer(DeviceAPI api) :
|
|
|
|
Context {api},
|
|
|
|
p_type {BufferType::Undefined},
|
|
|
|
p_size {0},
|
|
|
|
p_stride {0}
|
|
|
|
{}
|
|
|
|
|
|
|
|
Buffer::~Buffer()
|
|
|
|
{}
|
|
|
|
|
2022-10-05 21:10:51 +05:00
|
|
|
// Member functions
|
|
|
|
|
|
|
|
int Buffer::size() const
|
|
|
|
{
|
|
|
|
return p_size;
|
|
|
|
}
|
|
|
|
|
|
|
|
Buffer::BufferType Buffer::type() const
|
2022-10-03 18:51:34 +05:00
|
|
|
{
|
|
|
|
return p_type;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|