Compilation fix (mingw)

This commit is contained in:
Nekotekina 2017-03-05 19:00:08 +03:00
parent 3baf79f929
commit 19a698682b
5 changed files with 13 additions and 7 deletions

View file

@ -18,11 +18,12 @@ void gl::init()
#ifdef _WIN32
extern "C" {
extern "C"
{
// NVIDIA Optimus: Default dGPU instead of iGPU (Driver: 302+)
_declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
__declspec(dllexport) DWORD NvOptimusEnablement = 0x00000001;
// AMD: Request dGPU High Performance (Driver: 13.35+)
_declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
__declspec(dllexport) int AmdPowerXpressRequestHighPerformance = 1;
}
#define OPENGL_PROC(p, n) p gl##n = nullptr

View file

@ -328,10 +328,14 @@ namespace vk
s++;
}
VkViewport vp = {0, 0, target_w, target_h, 0., 1.};
VkViewport vp{};
vp.width = target_w;
vp.height = target_h;
vp.minDepth = 0.f;
vp.maxDepth = 1.f;
vkCmdSetViewport(cmd, 0, 1, &vp);
VkRect2D vs = { {0, 0}, {target_w, target_h} };
VkRect2D vs = { {0, 0}, {0u+target_w, 0u+target_h} };
vkCmdSetScissor(cmd, 0, 1, &vs);
//TODO: Add drop shadow if deemed necessary for visibility