use PBO for timelapse data read

This commit is contained in:
2019-11-05 18:25:25 +01:00
parent 4b6316bf68
commit 52ad58aec4
8 changed files with 212 additions and 9 deletions

View File

@@ -1,6 +1,36 @@
#pragma once
#include "image.h"
struct PBO
{
// copy
PBO(const PBO&) = delete;
PBO& operator=(const PBO&) = delete;
// move
PBO(PBO&& other) noexcept;
PBO& operator=(PBO&&) noexcept;
// default
PBO() noexcept = default;
~PBO() noexcept;
GLuint buffer_id = 0;
GLenum bound_slot = 0;
GLubyte* mapped_ptr = nullptr;
int width = 0;
int height = 0;
bool create() noexcept;
bool create(class RTT& rtt) noexcept;
void destroy() noexcept;
/*
void bind_read() noexcept;
void unbind() noexcept;
*/
uint8_t* map() noexcept;
void unmap() noexcept;
};
class RTT
{
int w = 0;