Add OpenGLFence
This commit is contained in:
30
engine/include/XCEngine/RHI/OpenGL/OpenGLFence.h
Normal file
30
engine/include/XCEngine/RHI/OpenGL/OpenGLFence.h
Normal 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
|
||||
Reference in New Issue
Block a user