use PBO for timelapse data read
This commit is contained in:
19
src/image.h
19
src/image.h
@@ -38,7 +38,7 @@ public:
|
||||
{
|
||||
std::copy(data, data + size(), m_data.get());
|
||||
}
|
||||
void destroy()
|
||||
virtual void destroy()
|
||||
{
|
||||
width = 0;
|
||||
height = 0;
|
||||
@@ -56,3 +56,20 @@ public:
|
||||
bool read(BinaryStreamReader& r) override;
|
||||
void write(BinaryStreamWriter& w) const override;
|
||||
};
|
||||
|
||||
class ImageRef : public Image
|
||||
{
|
||||
public:
|
||||
~ImageRef()
|
||||
{
|
||||
m_data.release();
|
||||
}
|
||||
virtual void destroy() override
|
||||
{
|
||||
width = 0;
|
||||
height = 0;
|
||||
comp = 0;
|
||||
file_base = file_name = file_ext = "";
|
||||
m_data.release();
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user