From f1cc7822236f72ff7f99476593cd5e39865a69d4 Mon Sep 17 00:00:00 2001 From: kervala Date: Wed, 23 Dec 2015 15:22:06 +0100 Subject: [PATCH] Changed: Need more checks before using getTotalVideoMemory() --HG-- branch : develop --- code/ryzom/client/src/init_main_loop.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/code/ryzom/client/src/init_main_loop.cpp b/code/ryzom/client/src/init_main_loop.cpp index b7383e308..e30894479 100644 --- a/code/ryzom/client/src/init_main_loop.cpp +++ b/code/ryzom/client/src/init_main_loop.cpp @@ -886,6 +886,15 @@ void initMainLoop() { if(ClientCfg.HDEntityTexture) { + // temporary code for debug + sint videoMemory = Driver->getTotalVideoMemory(); + + if (videoMemory < 0) videoMemory = CSystemUtils::getTotalVideoMemory(); + + videoMemory /= 1024; // size in MiB + + nlinfo("Video Memory detected: %d MiB", videoMemory); + // setup "v2 texture" (or 512*512) Driver->setupAsyncTextureLod(ENTITY_TEXTURE_COARSE_LEVEL, ENTITY_TEXTURE_HIGH_LEVEL); // Allow a big cache for them (should be on 512 Mo card only)