Renderer: Add NAZARA_REQUEST_DEDICATED_GPU macro
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <Nazara/Renderer/DebugDrawer.hpp>
|
||||
#include <Nazara/Renderer/Enums.hpp>
|
||||
#include <Nazara/Renderer/Framebuffer.hpp>
|
||||
#include <Nazara/Renderer/GpuSwitch.hpp>
|
||||
#include <Nazara/Renderer/RenderBuffer.hpp>
|
||||
#include <Nazara/Renderer/RenderBufferView.hpp>
|
||||
#include <Nazara/Renderer/RenderDevice.hpp>
|
||||
|
||||
20
include/Nazara/Renderer/GpuSwitch.hpp
Normal file
20
include/Nazara/Renderer/GpuSwitch.hpp
Normal file
@@ -0,0 +1,20 @@
|
||||
// Copyright (C) 2020 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Renderer module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#include <Nazara/Prerequisites.hpp>
|
||||
|
||||
#ifdef NAZARA_PLATFORM_WINDOWS
|
||||
|
||||
#define NAZARA_REQUEST_DEDICATED_GPU() \
|
||||
extern "C" \
|
||||
{ \
|
||||
NAZARA_EXPORT unsigned long NvOptimusEnablement = 1; \
|
||||
NAZARA_EXPORT unsigned long AmdPowerXpressRequestHighPerformance = 1; \
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#define NAZARA_REQUEST_DEDICATED_GPU()
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user