From 8fae5d49bf211fbbd58511442f91e09e8c4c0458 Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Fri, 7 Jan 2011 18:24:35 -0500 Subject: testing: adding glFlush() each frame for performance testing --- indra/llwindow/llwindowmacosx.cpp | 1 + indra/llwindow/llwindowsdl.cpp | 3 +++ indra/llwindow/llwindowwin32.cpp | 1 + 3 files changed, 5 insertions(+) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index affd7276cc..fa8ba7bafa 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1273,6 +1273,7 @@ BOOL LLWindowMacOSX::setSize(const LLCoordScreen size) void LLWindowMacOSX::swapBuffers() { + glFlush(); aglSwapBuffers(mContext); } diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index b65287715c..80566b40c0 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -984,7 +984,10 @@ BOOL LLWindowSDL::setSize(const LLCoordScreen size) void LLWindowSDL::swapBuffers() { if (mWindow) + { + glFlush(); SDL_GL_SwapBuffers(); + } } U32 LLWindowSDL::getFSAASamples() diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index ab089081e6..e457e76f55 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2858,6 +2858,7 @@ BOOL LLWindowWin32::resetDisplayResolution() void LLWindowWin32::swapBuffers() { + glFlush(); SwapBuffers(mhDC); } -- cgit v1.2.3 From d1683bd65ae2797de9d92658d720b81c3be80fff Mon Sep 17 00:00:00 2001 From: "Nyx (Neal Orman)" Date: Thu, 13 Jan 2011 13:46:00 -0500 Subject: glFlush != glFinish. doh. --- indra/llwindow/llwindowmacosx.cpp | 2 +- indra/llwindow/llwindowsdl.cpp | 2 +- indra/llwindow/llwindowwin32.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index fa8ba7bafa..db90aaf52a 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -1273,7 +1273,7 @@ BOOL LLWindowMacOSX::setSize(const LLCoordScreen size) void LLWindowMacOSX::swapBuffers() { - glFlush(); + glFinish(); aglSwapBuffers(mContext); } diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index 80566b40c0..e41aa9820f 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -985,7 +985,7 @@ void LLWindowSDL::swapBuffers() { if (mWindow) { - glFlush(); + glFinish(); SDL_GL_SwapBuffers(); } } diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index e457e76f55..aba0dc43eb 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -2858,7 +2858,7 @@ BOOL LLWindowWin32::resetDisplayResolution() void LLWindowWin32::swapBuffers() { - glFlush(); + glFinish(); SwapBuffers(mhDC); } -- cgit v1.2.3 From 13e152c92d0bd1bf224a67d64d0c747b8d28e426 Mon Sep 17 00:00:00 2001 From: Xiaohong Bao Date: Wed, 3 Aug 2011 14:54:53 -0600 Subject: fix for SH-2177: Second Life Crashes On Startup in Advanced Mode -- I have reinstalled SL, Clear Caches -- Nothing Works --- indra/llwindow/llwindowwin32.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 551d487cc8..1239e2d40b 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -1172,8 +1172,39 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO // First we try and get a 32 bit depth pixel format BOOL result = wglChoosePixelFormatARB(mhDC, attrib_list, NULL, 256, pixel_formats, &num_formats); + + while(!result && mFSAASamples > 0) + { + llwarns << "FSAASamples: " << mFSAASamples << " not supported." << llendl ; + + mFSAASamples /= 2 ; //try to decrease sample pixel number until to disable anti-aliasing + if(mFSAASamples < 2) + { + mFSAASamples = 0 ; + } + + if (mFSAASamples > 0) + { + attrib_list[end_attrib + 3] = mFSAASamples; + } + else + { + cur_attrib = end_attrib ; + end_attrib = 0 ; + attrib_list[cur_attrib++] = 0 ; //end + } + result = wglChoosePixelFormatARB(mhDC, attrib_list, NULL, 256, pixel_formats, &num_formats); + + if(result) + { + llwarns << "Only support FSAASamples: " << mFSAASamples << llendl ; + } + } + if (!result) { + llwarns << "mFSAASamples: " << mFSAASamples << llendl ; + close(); show_window_creation_error("Error after wglChoosePixelFormatARB 32-bit"); return FALSE; -- cgit v1.2.3 From 7e5be23686b4eefc2a7e161dcac41ec786484114 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 17 Aug 2011 14:43:39 -0400 Subject: add proper license headers to files that did not have them --- indra/llwindow/GL/glh_extensions.h | 4 ++++ indra/llwindow/GL/glh_genext.h | 3 +++ 2 files changed, 7 insertions(+) (limited to 'indra/llwindow') diff --git a/indra/llwindow/GL/glh_extensions.h b/indra/llwindow/GL/glh_extensions.h index b936b5d307..d89d85930b 100644 --- a/indra/llwindow/GL/glh_extensions.h +++ b/indra/llwindow/GL/glh_extensions.h @@ -1,5 +1,7 @@ /* * glh_extensions.h + * $LicenseInfo:firstyear=2006&license=mit$ (mit used here to satisfy validity checker) + * Copyright (C) 2006, NVIDIA * From nVidia Corporation, downloaded 2006-12-18 from: * http://developer.nvidia.com/attach/8196 * ("NVParse Library with Source (.zip) (2390 KB)") @@ -8,6 +10,8 @@ * "The files bison.exe, bison.simple, and flex.exe are covered by * the GPL. All other files in this distribution can be used however * you want." + * $/LicenseInfo$ + */ #ifndef GLH_EXTENSIONS diff --git a/indra/llwindow/GL/glh_genext.h b/indra/llwindow/GL/glh_genext.h index 8d42025198..cd5d1604a8 100644 --- a/indra/llwindow/GL/glh_genext.h +++ b/indra/llwindow/GL/glh_genext.h @@ -1,5 +1,7 @@ /* * glh_genext.h + * $LicenseInfo:firstyear=2008&license=mit$ (mit used here to satisfy validity checker) + * Copyright (C) 2008, NVIDIA * From nVidia Corporation, downloaded 2006-12-18 from: * http://developer.nvidia.com/attach/8196 * ("NVParse Library with Source (.zip) (2390 KB)") @@ -8,6 +10,7 @@ * "The files bison.exe, bison.simple, and flex.exe are covered by * the GPL. All other files in this distribution can be used however * you want." + * $/LicenseInfo$ */ /* File generated by extgen.cpp -- do not modify */ -- cgit v1.2.3