Renderer: Add NAZARA_REQUEST_DEDICATED_GPU macro
This commit is contained in:
parent
90df17d45a
commit
2ee3957822
|
|
@ -15,6 +15,8 @@
|
|||
#include <iostream>
|
||||
#include <random>
|
||||
|
||||
NAZARA_REQUEST_DEDICATED_GPU()
|
||||
|
||||
/*
|
||||
[layout(std140)]
|
||||
struct PointLight
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
#include <array>
|
||||
#include <iostream>
|
||||
|
||||
NAZARA_REQUEST_DEDICATED_GPU()
|
||||
|
||||
int main()
|
||||
{
|
||||
std::filesystem::path resourceDir = "resources";
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
#include <array>
|
||||
#include <iostream>
|
||||
|
||||
NAZARA_REQUEST_DEDICATED_GPU()
|
||||
|
||||
const char shaderSource[] = R"(
|
||||
|
||||
option red: bool;
|
||||
|
|
|
|||
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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
|
||||
Loading…
Reference in New Issue