Files
XCEngine/engine/src/RHI/OpenGL/OpenGLCommandQueue.cpp

47 lines
968 B
C++
Raw Normal View History

#include "XCEngine/RHI/OpenGL/OpenGLCommandQueue.h"
#include "XCEngine/RHI/RHIFence.h"
#include <glad/glad.h>
namespace XCEngine {
namespace RHI {
OpenGLCommandQueue::OpenGLCommandQueue() {
}
OpenGLCommandQueue::~OpenGLCommandQueue() {
Shutdown();
}
void OpenGLCommandQueue::Shutdown() {
}
void OpenGLCommandQueue::ExecuteCommandLists(uint32_t count, void** lists) {
}
void OpenGLCommandQueue::Signal(RHIFence* fence, uint64_t value) {
if (fence) {
fence->Signal(value);
}
glFlush();
}
void OpenGLCommandQueue::Wait(RHIFence* fence, uint64_t value) {
}
uint64_t OpenGLCommandQueue::GetCompletedValue() {
return 0;
}
void OpenGLCommandQueue::WaitForIdle() {
glFinish();
}
uint64_t OpenGLCommandQueue::GetTimestampFrequency() const {
GLint64 frequency = 0;
glGetInteger64v(GL_TIMESTAMP, &frequency);
return frequency > 0 ? static_cast<uint64_t>(frequency) : 1000000000;
}
} // namespace RHI
} // namespace XCEngine