mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:01:06 +02:00
Merge pull request #4554 from samcake/yellow
Better support for Nvidia Optimus Laptop
This commit is contained in:
commit
b6f670a8d8
1 changed files with 12 additions and 0 deletions
|
@ -136,6 +136,13 @@
|
||||||
#include "ui/StandAloneJSConsole.h"
|
#include "ui/StandAloneJSConsole.h"
|
||||||
#include "ui/Stats.h"
|
#include "ui/Stats.h"
|
||||||
|
|
||||||
|
// ON WIndows PC, NVidia Optimus laptop, we want to enable NVIDIA GPU
|
||||||
|
#if defined(Q_OS_WIN)
|
||||||
|
extern "C" {
|
||||||
|
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
// Starfield information
|
// Starfield information
|
||||||
|
@ -646,6 +653,11 @@ void Application::initializeGL() {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
qDebug() << "GL Version: " << QString((const char*) glGetString(GL_VERSION));
|
||||||
|
qDebug() << "GL Shader Language Version: " << QString((const char*) glGetString(GL_SHADING_LANGUAGE_VERSION));
|
||||||
|
qDebug() << "GL Vendor: " << QString((const char*) glGetString(GL_VENDOR));
|
||||||
|
qDebug() << "GL Renderer: " << QString((const char*) glGetString(GL_RENDERER));
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
GLenum err = glewInit();
|
GLenum err = glewInit();
|
||||||
if (GLEW_OK != err) {
|
if (GLEW_OK != err) {
|
||||||
|
|
Loading…
Reference in a new issue