diff options
Diffstat (limited to 'indra/llwindow/llwindowsdl.cpp')
-rw-r--r-- | indra/llwindow/llwindowsdl.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/indra/llwindow/llwindowsdl.cpp b/indra/llwindow/llwindowsdl.cpp index e3af20c090..00a467b5be 100644 --- a/indra/llwindow/llwindowsdl.cpp +++ b/indra/llwindow/llwindowsdl.cpp @@ -1197,6 +1197,12 @@ F32 LLWindowSDL::getPixelAspectRatio() return pixel_aspect; } +U32 LLWindowSDL::getAvailableVRAMMegabytes() +{ + static const U32 mb = 1024*1024; + static const U32 total_factor = 2; + return gGLManager.mVRAM - (LLImageGL::getTextureBytesAllocated() * total_factor/mb); +} // This is to support 'temporarily windowed' mode so that // dialogs are still usable in fullscreen. |