Add OpenGLFence

This commit is contained in:
2026-03-16 18:48:12 +08:00
parent 377f43260b
commit aee4ae88db
3 changed files with 75 additions and 0 deletions

View File

@@ -0,0 +1,30 @@
#pragma once
#include <GLFW/glfw3.h>
#include <cstdint>
namespace XCEngine {
namespace RHI {
class OpenGLFence {
public:
OpenGLFence();
~OpenGLFence();
bool Initialize();
void Shutdown();
void Signal();
void Wait();
void Reset();
bool IsSignaled() const;
private:
unsigned int m_fence;
int64_t m_fenceValue;
bool m_signaled;
};
} // namespace RHI
} // namespace XCEngine