17
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-10-18 03:19:19 +02: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

45
gl/query.cppm Normal file
View File

@@ -0,0 +1,45 @@
module;
#include "glad/glad.h"
#include <cstdint>
#include <optional>
export module eu07.gl.query;
import eu07.gl.object;
export {
namespace gl
{
class query : public object
{
public:
enum targets
{
SAMPLES_PASSED = 0,
ANY_SAMPLES_PASSED,
ANY_SAMPLES_PASSED_CONSERVATIVE,
PRIMITIVES_GENERATED,
TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN,
TIME_ELAPSED
};
private:
targets target;
thread_local static query* active_queries[6];
protected:
GLenum glenum_target(targets target);
public:
query(targets target);
~query();
void begin();
void end();
std::optional<int64_t> result();
};
}
} // export