17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-28 19:17:28 +01:00

pch migration to modules [wip]

This commit is contained in:
maj00r
2026-09-09 20:35:26 +02:00
parent c3007e3237
commit 3f7960aad5
350 changed files with 5958 additions and 3059 deletions

29
gl/pbo.cppm Normal file
View File

@@ -0,0 +1,29 @@
module;
#include "glad/glad.h"
#include <optional>
export module eu07.gl.pbo;
import eu07.gl.buffer;
import eu07.gl.fence;
export {
namespace gl {
class pbo : public 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();
void* map(GLuint mode, targets target = PIXEL_UNPACK_BUFFER);
void unmap(targets target = PIXEL_UNPACK_BUFFER);
};
}
} // export