mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Fixed: Compilation errors when constant not defined
This commit is contained in:
parent
72e707bbe0
commit
2184d13ef4
1 changed files with 6 additions and 0 deletions
|
@ -1781,13 +1781,19 @@ void registerGlExtensions(CGlExtensions &ext)
|
||||||
// GPU_MEMORY_INFO_EVICTED_MEMORY_NVX;
|
// GPU_MEMORY_INFO_EVICTED_MEMORY_NVX;
|
||||||
|
|
||||||
GLint nDedicatedMemoryInKB = 0;
|
GLint nDedicatedMemoryInKB = 0;
|
||||||
|
#ifdef GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX
|
||||||
glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &nDedicatedMemoryInKB);
|
glGetIntegerv(GL_GPU_MEMORY_INFO_DEDICATED_VIDMEM_NVX, &nDedicatedMemoryInKB);
|
||||||
|
#endif
|
||||||
|
|
||||||
GLint nTotalMemoryInKB = 0;
|
GLint nTotalMemoryInKB = 0;
|
||||||
|
#ifdef GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX
|
||||||
glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &nTotalMemoryInKB);
|
glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &nTotalMemoryInKB);
|
||||||
|
#endif
|
||||||
|
|
||||||
GLint nCurAvailMemoryInKB = 0;
|
GLint nCurAvailMemoryInKB = 0;
|
||||||
|
#ifdef GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX
|
||||||
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &nCurAvailMemoryInKB);
|
glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &nCurAvailMemoryInKB);
|
||||||
|
#endif
|
||||||
|
|
||||||
nlinfo("Memory: total: %d available: %d dedicated: %d", nTotalMemoryInKB, nCurAvailMemoryInKB, nDedicatedMemoryInKB);
|
nlinfo("Memory: total: %d available: %d dedicated: %d", nTotalMemoryInKB, nCurAvailMemoryInKB, nDedicatedMemoryInKB);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue