diff options
author | RunitaiLinden <davep@lindenlab.com> | 2023-01-19 09:13:45 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-01-19 09:13:45 -0600 |
commit | 7bd9d21e19b923096ba2b5ea3cbc8be3e13d7aa0 (patch) | |
tree | e96b35f6ae7a1377334e467fc324ec17ac6e49c3 /indra/llwindow | |
parent | 1ff3b1ffa54db0f7aaca543e2565e1ac3087d1e0 (diff) |
Optimizations, decruft, and intel compatibility pass (#53)
SL-18869, SL-18772 Overhaul VBO management, restore occlusion culling, intel compatibility pass, etc
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 36 |
1 files changed, 12 insertions, 24 deletions
diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 7787e2eb26..a195964bb1 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1051,16 +1051,19 @@ BOOL LLWindowWin32::maximize() BOOL success = FALSE; if (!mWindowHandle) return success; - WINDOWPLACEMENT placement; - placement.length = sizeof(WINDOWPLACEMENT); - - success = GetWindowPlacement(mWindowHandle, &placement); - if (!success) return success; + mWindowThread->post([=] + { + WINDOWPLACEMENT placement; + placement.length = sizeof(WINDOWPLACEMENT); - placement.showCmd = SW_MAXIMIZE; + if (GetWindowPlacement(mWindowHandle, &placement)) + { + placement.showCmd = SW_MAXIMIZE; + SetWindowPlacement(mWindowHandle, &placement); + } + }); - success = SetWindowPlacement(mWindowHandle, &placement); - return success; + return TRUE; } BOOL LLWindowWin32::getFullscreen() @@ -1408,14 +1411,6 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO return FALSE; } - if (pfd.cAlphaBits < 8) - { - OSMessageBox(mCallbacks->translateString("MBAlpha"), - mCallbacks->translateString("MBError"), OSMB_OK); - close(); - return FALSE; - } - if (!SetPixelFormat(mhDC, pixel_format, &pfd)) { OSMessageBox(mCallbacks->translateString("MBPixelFmtSetErr"), @@ -1474,7 +1469,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen& size, BO attrib_list[cur_attrib++] = 24; attrib_list[cur_attrib++] = WGL_ALPHA_BITS_ARB; - attrib_list[cur_attrib++] = 8; + attrib_list[cur_attrib++] = 0; U32 end_attrib = 0; if (mFSAASamples > 0) @@ -1705,13 +1700,6 @@ const S32 max_format = (S32)num_formats - 1; return FALSE; } - if (pfd.cAlphaBits < 8) - { - OSMessageBox(mCallbacks->translateString("MBAlpha"), mCallbacks->translateString("MBError"), OSMB_OK); - close(); - return FALSE; - } - mhRC = 0; if (wglCreateContextAttribsARB) { //attempt to create a specific versioned context |