forked from Mirrors/openclonk
OpenGL: Print some information about the OpenGL implementation on error
parent
5477a6fb6d
commit
95408be00a
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue