mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
18 lines
440 B
C++
18 lines
440 B
C++
#include "buffer.h"
|
|
#include "fence.h"
|
|
#include <optional>
|
|
|
|
namespace gl {
|
|
class pbo : private buffer
|
|
{
|
|
std::optional<fence> sync;
|
|
int size = 0;
|
|
bool data_ready;
|
|
|
|
public:
|
|
void request_read(int x, int y, int lx, int ly, int pixsize = 4, GLenum format = GL_RGBA, GLenum type = GL_UNSIGNED_BYTE);
|
|
bool read_data(int lx, int ly, void *data, int pixsize = 4);
|
|
bool is_busy();
|
|
};
|
|
}
|