16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-22 00:09:18 +02:00

pbo changes, trainingcard remarks

This commit is contained in:
milek7
2019-03-31 14:02:43 +02:00
parent a8a0cbb9b3
commit 891fe7ddee
6 changed files with 23 additions and 7 deletions

View File

@@ -1,9 +1,11 @@
#pragma once
#include "buffer.h"
#include "fence.h"
#include <optional>
namespace gl {
class pbo : private buffer
class pbo : public buffer
{
std::optional<fence> sync;
int size = 0;
@@ -13,5 +15,8 @@ namespace gl {
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();
void* map(GLuint mode, targets target = PIXEL_UNPACK_BUFFER);
void unmap(targets target = PIXEL_UNPACK_BUFFER);
};
}