LowLevelWindow_Win32::IsSoftwareRenderer

This commit is contained in:
Glenn Maynard
2005-11-13 18:55:30 +00:00
parent 05233a7af8
commit 92504b10cc
2 changed files with 13 additions and 0 deletions
@@ -5,6 +5,8 @@
#include "RageUtil.h"
#include "RageLog.h"
#include <GL/gl.h>
static PIXELFORMATDESCRIPTOR g_CurrentPixelFormat;
static HGLRC g_HGLRC = NULL;
@@ -211,6 +213,16 @@ CString LowLevelWindow_Win32::TryVideoMode( VideoModeParams p, bool &bNewDeviceO
return CString(); // we set the video mode successfully
}
bool LowLevelWindow_Win32::IsSoftwareRenderer( CString &sError )
{
if( strcmp((const char*)glGetString(GL_VENDOR),"Microsoft Corporation") &&
strcmp((const char*)glGetString(GL_RENDERER),"GDI Generic") )
return false;
sError = "OpenGL hardware acceleration is not available.";
return true;
}
void LowLevelWindow_Win32::SwapBuffers()
{
::SwapBuffers( GraphicsWindow::GetHDC() );
@@ -10,6 +10,7 @@ public:
~LowLevelWindow_Win32();
void *GetProcAddress( CString s );
CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut );
bool IsSoftwareRenderer( CString &sError );
void SwapBuffers();
void Update();