Files
mirage/nvapi/api/export.h

26 lines
605 B
C
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#pragma once
#ifdef NVAPI_API_EXPORTS
#define NVAPI_API __declspec(dllexport)
#else
#define NVAPI_API __declspec(dllimport)
#endif
#ifdef __cplusplus
extern "C" {
#endif
/**
* 强制NVIDIA驱动使用Native模式进行Vulkan/OpenGL呈现
*
* 这个函数通过NvAPI Driver Settings API设置"Vulkan/OpenGL present method"为Native模式
* 避免驱动自动升级到DXGI Flip Model从而保持透明度效果。
*
* @return true 如果成功设置false 如果失败非N卡、初始化失败等
*/
NVAPI_API bool ForceNvidiaNativePresent();
#ifdef __cplusplus
}
#endif