mirror of
https://github.com/godotengine/godot-angle-static.git
synced 2026-01-04 22:09:59 +03:00
Introduce ConfigParameters test helper struct.
This allows us to more easily compare sets of parameters used in our tests. The config parameters are stuff like the red / gree / blue bits used in an EGL config. Or particular sets of extensions or other EGL options. This will more easily allow us to determine when we need to use a new EGL display instead of reusing a prior. Bug: angleproject:3261 Change-Id: Ia1f0ede988e0b4084fbb4d55097e94fd89ee4899 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/1531535 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: Yuly Novikov <ynovikov@chromium.org>
This commit is contained in:
@@ -69,8 +69,11 @@ WGLWindow::WGLWindow(int glesMajorVersion, int glesMinorVersion)
|
||||
WGLWindow::~WGLWindow() {}
|
||||
|
||||
// Internally initializes GL resources.
|
||||
bool WGLWindow::initializeGL(OSWindow *osWindow, angle::Library *glWindowingLibrary)
|
||||
bool WGLWindow::initializeGL(OSWindow *osWindow,
|
||||
angle::Library *glWindowingLibrary,
|
||||
const ConfigParameters ¶ms)
|
||||
{
|
||||
mConfigParams = params;
|
||||
glWindowingLibrary->getAs("wglGetProcAddress", &gCurrentWGLGetProcAddress);
|
||||
|
||||
if (!gCurrentWGLGetProcAddress)
|
||||
@@ -135,7 +138,7 @@ bool WGLWindow::initializeGL(OSWindow *osWindow, angle::Library *glWindowingLibr
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mWebGLCompatibility.valid() || mRobustResourceInit.valid())
|
||||
if (mConfigParams.webGLCompatibility.valid() || mConfigParams.robustResourceInit.valid())
|
||||
{
|
||||
std::cerr << "WGLWindow does not support the requested feature set." << std::endl;
|
||||
return false;
|
||||
@@ -163,11 +166,11 @@ bool WGLWindow::initializeGL(OSWindow *osWindow, angle::Library *glWindowingLibr
|
||||
|
||||
makeCurrent();
|
||||
|
||||
if (mSwapInterval != -1)
|
||||
if (mConfigParams.swapInterval != -1)
|
||||
{
|
||||
if (_wglSwapIntervalEXT)
|
||||
{
|
||||
if (_wglSwapIntervalEXT(mSwapInterval) == FALSE)
|
||||
if (_wglSwapIntervalEXT(mConfigParams.swapInterval) == FALSE)
|
||||
{
|
||||
std::cerr << "Error setting swap interval." << std::endl;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user