mirror of
https://port.numenaute.org/aleajactaest/khanat-code-old.git
synced 2024-11-10 17:29:06 +00:00
Changed: Display OpenGL version and GPU used in logs
This commit is contained in:
parent
5babd5ab59
commit
826b729411
1 changed files with 9 additions and 1 deletions
|
@ -1561,13 +1561,21 @@ static bool setupATIMeminfo(const char *glext)
|
||||||
void registerGlExtensions(CGlExtensions &ext)
|
void registerGlExtensions(CGlExtensions &ext)
|
||||||
{
|
{
|
||||||
H_AUTO_OGL(registerGlExtensions);
|
H_AUTO_OGL(registerGlExtensions);
|
||||||
|
|
||||||
// OpenGL 1.2 ??
|
// OpenGL 1.2 ??
|
||||||
const char *nglVersion= (const char *)glGetString (GL_VERSION);
|
const char *nglVersion= (const char *)glGetString (GL_VERSION);
|
||||||
sint a=0, b=0;
|
sint a=0, b=0;
|
||||||
|
|
||||||
// 1.2*** ???
|
// 1.2*** ???
|
||||||
sscanf(nglVersion, "%d.%d", &a, &b);
|
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.
|
// Extensions.
|
||||||
const char *glext= (const char*)glGetString(GL_EXTENSIONS);
|
const char *glext= (const char*)glGetString(GL_EXTENSIONS);
|
||||||
GLint ntext;
|
GLint ntext;
|
||||||
|
|
Loading…
Reference in a new issue