mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
use pbo for picking buffers, restore picking for scenery nodes
This commit is contained in:
17
gl/pbo.h
Normal file
17
gl/pbo.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#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);
|
||||
bool read_data(int lx, int ly, uint8_t *data);
|
||||
bool is_busy();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user