LowLevelWindow_Win32::IsSoftwareRenderer
This commit is contained in:
@@ -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();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user