RHI: Internalize OpenGL-specific methods in OpenGLDevice
- Remove GetTextureUnitAllocator/GetUniformBufferManager from public interface - Remove SwapBuffers from public interface (friend OpenGLSwapChain can still access) - Add MakeContextCurrent() and GetNativeContext() public methods - Update integration tests to use MakeContextCurrent() instead of wglMakeCurrent - Update RenderDoc calls to use GetNativeContext() instead of GetGLContext() - Remove Device_SwapBuffers_NoErrors test (SwapBuffers no longer public) - Mark Priority 7 as completed in RHI_Design_Issues.md
This commit is contained in:
@@ -259,6 +259,13 @@ void OpenGLDevice::Shutdown() {
|
||||
m_initialized = false;
|
||||
}
|
||||
|
||||
bool OpenGLDevice::MakeContextCurrent() {
|
||||
if (m_hdc && m_hglrc) {
|
||||
return ::wglMakeCurrent(m_hdc, m_hglrc) == TRUE;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
void OpenGLDevice::SwapBuffers() {
|
||||
if (m_hdc) {
|
||||
::SwapBuffers(m_hdc);
|
||||
|
||||
Reference in New Issue
Block a user