OpenGL: Print some information about the OpenGL implementation on error

stable-5.1
Günther Brammer 2010-08-03 19:02:00 +02:00
parent 5477a6fb6d
commit 95408be00a
4 changed files with 12 additions and 7 deletions

View File

@ -349,11 +349,6 @@ void C4GraphicsSystem::ClearFullscreenBackground()
--iRedrawBackground;
}
void OnSurfaceRestore()
{
::GraphicsSystem.InvalidateBg();
}
bool C4GraphicsSystem::InitLoaderScreen(const char *szLoaderSpec, bool fDrawBlackScreenFirst)
{
// create new loader; overwrite current only if successful

View File

@ -330,7 +330,7 @@ protected:
virtual void PerformLine(SURFACE sfcTarget, float x1, float y1, float x2, float y2, DWORD dwClr) = 0;
bool CreatePrimaryClipper(unsigned int iXRes, unsigned int iYRes);
virtual bool CreatePrimarySurfaces(bool Fullscreen, unsigned int iXRes, unsigned int iYRes, int iColorDepth, unsigned int iMonitor) = 0;
bool Error(const char *szMsg);
virtual bool Error(const char *szMsg);
void DebugLog(const char *szMsg)
{
#ifdef _DEBUG

View File

@ -1777,7 +1777,7 @@ bool CStdGL::RestoreDeviceObjects()
// BGRA Pixel Formats, Multitexturing, Texture Combine Environment Modes
if (!GLEW_VERSION_1_3)
{
return Error(" gl: OpenGL Version 1.3 or higher required.");
return Error(" gl: OpenGL Version 1.3 or higher required. A better graphics driver will probably help.");
}
// lines texture
@ -1934,6 +1934,15 @@ void CStdGL::ResetTexture()
glDisable(GL_TEXTURE_2D);
}
bool CStdGL::Error(const char *szMsg)
{
LogF(" gl: %s", glGetString(GL_VENDOR));
LogF(" gl: %s", glGetString(GL_RENDERER));
LogF(" gl: %s", glGetString(GL_VERSION));
LogF(" gl: %s", glGetString(GL_EXTENSIONS));
return CStdDDraw::Error(szMsg);
}
bool CStdGL::CheckGLError(const char *szAtOp)
{
GLenum err = glGetError();

View File

@ -133,6 +133,7 @@ protected:
bool CreatePrimarySurfaces(bool Fullscreen, unsigned int iXRes, unsigned int iYRes, int iColorDepth, unsigned int iMonitor);
bool CheckGLError(const char *szAtOp);
virtual bool Error(const char *szMsg);
#ifdef USE_X11
// Size of gamma ramps
int gammasize;