From 5e07440a1e93667da1d4ddc6017f10cc6c4b8b31 Mon Sep 17 00:00:00 2001 From: kervala Date: Mon, 9 Nov 2015 10:00:51 +0100 Subject: [PATCH] Changed: Display OpenGL version and GPU used in logs --HG-- branch : develop --- .../src/3d/driver/opengl/driver_opengl_extension.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 5563a4fcf..a55b5d720 100644 --- a/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp +++ b/code/nel/src/3d/driver/opengl/driver_opengl_extension.cpp @@ -1561,12 +1561,20 @@ static bool setupATIMeminfo(const char *glext) void registerGlExtensions(CGlExtensions &ext) { H_AUTO_OGL(registerGlExtensions); + // OpenGL 1.2 ?? const char *nglVersion= (const char *)glGetString (GL_VERSION); sint a=0, b=0; + // 1.2*** ??? sscanf(nglVersion, "%d.%d", &a, &b); - ext.Version1_2= (a==1 && b>=2) || (a>=2); + ext.Version1_2 = (a==1 && b>=2) || (a>=2); + + const char *vendor = (const char *) glGetString (GL_VENDOR); + const char *renderer = (const char *) glGetString (GL_RENDERER); + + // Log GPU details + nlinfo("3D: OpenGL %s / %s / %s", nglVersion, vendor, renderer); // Extensions. const char *glext= (const char*)glGetString(GL_EXTENSIONS);