LowLevelWindow_Win32::IsSoftwareRenderer
This commit is contained in:
@@ -5,6 +5,8 @@
|
|||||||
#include "RageUtil.h"
|
#include "RageUtil.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
|
|
||||||
|
#include <GL/gl.h>
|
||||||
|
|
||||||
static PIXELFORMATDESCRIPTOR g_CurrentPixelFormat;
|
static PIXELFORMATDESCRIPTOR g_CurrentPixelFormat;
|
||||||
static HGLRC g_HGLRC = NULL;
|
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
|
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()
|
void LowLevelWindow_Win32::SwapBuffers()
|
||||||
{
|
{
|
||||||
::SwapBuffers( GraphicsWindow::GetHDC() );
|
::SwapBuffers( GraphicsWindow::GetHDC() );
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ public:
|
|||||||
~LowLevelWindow_Win32();
|
~LowLevelWindow_Win32();
|
||||||
void *GetProcAddress( CString s );
|
void *GetProcAddress( CString s );
|
||||||
CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut );
|
CString TryVideoMode( VideoModeParams p, bool &bNewDeviceOut );
|
||||||
|
bool IsSoftwareRenderer( CString &sError );
|
||||||
void SwapBuffers();
|
void SwapBuffers();
|
||||||
void Update();
|
void Update();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user