#pragma once #include #include namespace XCEngine { namespace RHI { struct OpenGLDeviceInfo { std::string vendor; std::string renderer; std::string version; int majorVersion; int minorVersion; }; class OpenGLDevice { public: OpenGLDevice(); ~OpenGLDevice(); bool CreateWindow(int width, int height, const char* title, bool enableDebug = false); bool InitializeWithExistingWindow(GLFWwindow* window); void Shutdown(); GLFWwindow* GetWindow() const { return m_window; } const OpenGLDeviceInfo& GetDeviceInfo() const { return m_deviceInfo; } void SwapBuffers(); bool PollEvents(); void SetShouldClose(bool shouldClose); bool ShouldClose() const; private: GLFWwindow* m_window; OpenGLDeviceInfo m_deviceInfo; bool m_initialized; bool m_ownsWindow; }; } // namespace RHI } // namespace XCEngine