Force use Dedicated Graphics
- Windows builds now use dedicated graphics
This commit is contained in:
parent
6c630a269a
commit
68ef93bd9a
1 changed files with 8 additions and 1 deletions
|
@ -12,6 +12,13 @@
|
|||
|
||||
#include <GLFW/glfw3.h>
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// Force Machine to use Dedicated Graphics
|
||||
__declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001; // NVidia
|
||||
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1; // AMD
|
||||
}
|
||||
|
||||
namespace Light {
|
||||
|
||||
Scope<Window> Window::Create(std::function<void(Event&)> callback)
|
||||
|
@ -40,7 +47,7 @@ namespace Light {
|
|||
BindGlfwEvents();
|
||||
|
||||
// create graphics context
|
||||
m_GraphicsContext = GraphicsContext::Create(GraphicsAPI::DirectX, m_Handle);
|
||||
m_GraphicsContext = GraphicsContext::Create(GraphicsAPI::OpenGL, m_Handle);
|
||||
LT_ENGINE_ASSERT(m_GraphicsContext, "wWindow::wWindow: failed to create 'GraphicsContext'");
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue