Fix OpenGL device initialization and file shaders

This commit is contained in:
2026-03-26 02:07:21 +08:00
parent 10ee1fa3fa
commit c47e871c5a
5 changed files with 310 additions and 42 deletions

View File

@@ -76,12 +76,18 @@ public:
private:
friend class OpenGLSwapChain;
bool AttachWindow(HWND hwnd);
bool ConfigureWindowPixelFormat(HDC hdc);
bool CreateContextForCurrentWindow();
void DestroyOwnedWindow();
HDC GetPresentationDC() const { return m_hdc; }
OpenGLTextureUnitAllocator* GetTextureUnitAllocator() { return m_textureUnitAllocator.get(); }
OpenGLUniformBufferManager* GetUniformBufferManager() { return m_uniformBufferManager.get(); }
void SwapBuffers();
HWND m_hwnd = nullptr;
HWND m_ownedWindow = nullptr;
HDC m_hdc = nullptr;
HGLRC m_hglrc = nullptr;
RHIDeviceInfo m_deviceInfo;