From 2184d13ef4d0fb9131dae97f20d75d3829bb6047 Mon Sep 17 00:00:00 2001 From: kervala Date: Fri, 6 Nov 2015 15:48:48 +0100 Subject: [PATCH] Fixed: Compilation errors when constant not defined --- code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp index 1a660f9c7..ba755b958 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1781,13 +1781,19 @@ void registerGlExtensions(CGlExtensions &ext) // GPU_MEMORY_INFO_EVICTED_MEMORY_NVX; GLint nDedicatedMemoryInKB = 0; +#ifdef GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &nDedicatedMemoryInKB); +#endif GLint nTotalMemoryInKB = 0; +#ifdef GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &nTotalMemoryInKB); +#endif GLint nCurAvailMemoryInKB = 0; +#ifdef GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &nCurAvailMemoryInKB); +#endif nlinfo("Memory: total: %d available: %d dedicated: %d", nTotalMemoryInKB, nCurAvailMemoryInKB, nDedicatedMemoryInKB); }