store and log opengl version

This commit is contained in:
Glenn Maynard
2002-11-11 21:05:02 +00:00
parent b037524db0
commit 3f4b11f495
+4
View File
@@ -42,6 +42,7 @@ RageTimer g_LastCheckTimer;
int g_iNumVerts;
float g_fLastCheckTime;
int g_iFPS, g_iVPF, g_iDPF;
int g_glVersion;
int RageDisplay::GetFPS() const { return g_iFPS; }
int RageDisplay::GetVPF() const { return g_iVPF; }
@@ -112,6 +113,9 @@ void RageDisplay::SetVideoMode( bool windowed, int width, int height, int bpp, R
if(!g_screen)
throw RageException("Failed to open screen!");
g_glVersion = int(roundf(atof((const char *) glGetString(GL_VERSION)) * 10));
LOG->Trace( "OpenGL version %.1f", g_glVersion / 10.);
/*
* Set up OpenGL for 2D rendering.
*/