use PBO for timelapse data read
This commit is contained in:
30
src/rtt.h
30
src/rtt.h
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user