- 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
25 lines
695 B
C++
25 lines
695 B
C++
#include "fixtures/OpenGLTestFixture.h"
|
|
#include "XCEngine/RHI/OpenGL/OpenGLDevice.h"
|
|
|
|
using namespace XCEngine::RHI;
|
|
|
|
TEST_F(OpenGLTestFixture, Device_InitializeWithExistingWindow) {
|
|
OpenGLDevice device;
|
|
HWND existingWindow = GetWindow();
|
|
|
|
bool result = device.InitializeWithExistingWindow(existingWindow);
|
|
|
|
ASSERT_TRUE(result);
|
|
}
|
|
|
|
TEST_F(OpenGLTestFixture, Device_GetDeviceInfo_ReturnsValid) {
|
|
OpenGLDevice device;
|
|
device.InitializeWithExistingWindow(GetWindow());
|
|
|
|
const auto& info = device.GetDeviceInfo();
|
|
|
|
EXPECT_FALSE(info.vendor.empty());
|
|
EXPECT_FALSE(info.renderer.empty());
|
|
EXPECT_GE(info.majorVersion, 3);
|
|
EXPECT_GE(info.minorVersion, 0);
|
|
} |