diff options
author | Logan Dethrow <log@lindenlab.com> | 2011-09-09 14:20:19 -0400 |
---|---|---|
committer | Logan Dethrow <log@lindenlab.com> | 2011-09-09 14:20:19 -0400 |
commit | 8a952e42e97cfb286192aba0fbfc43986912cd29 (patch) | |
tree | 6aa00aad42189239aa81972328e057afc215bf7d /indra/llwindow | |
parent | c47b398b75fcdbb479ad9ad2765014c5fa338df7 (diff) | |
parent | 89b9800579a37fbbdfca7789716a2d012d96cfa5 (diff) |
Removed some spurious newlines that I introduced into CMakeLists.txt.
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/GL/glh_extensions.h | 4 | ||||
-rw-r--r-- | indra/llwindow/GL/glh_genext.h | 3 | ||||
-rw-r--r-- | indra/llwindow/llwindowwin32.cpp | 31 |
3 files changed, 38 insertions, 0 deletions
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 */ 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; |