16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-23 00:29:19 +02:00

multisampling

This commit is contained in:
VB
2017-02-12 16:50:32 +01:00
parent 67b20087b7
commit 8cc249c056

View File

@@ -212,16 +212,10 @@ int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int)
while (!token.empty()); while (!token.empty());
} }
bool fullscreen = Global::bFullScreen; glfwWindowHint(GL_SAMPLES, Global::iMultisampling);
int width = Global::iWindowWidth;
int height = Global::iWindowHeight;
GLFWwindow *window;
if (fullscreen)
{
// match requested video mode to current to allow for // match requested video mode to current to allow for
// fullwindow creation when resolution is the same // fullwindow creation when resolution is the same
GLFWmonitor *monitor = glfwGetPrimaryMonitor(); GLFWmonitor *monitor = glfwGetPrimaryMonitor();
const GLFWvidmode *vmode = glfwGetVideoMode(monitor); const GLFWvidmode *vmode = glfwGetVideoMode(monitor);
@@ -230,10 +224,9 @@ int CALLBACK WinMain(HINSTANCE, HINSTANCE, LPSTR lpCmdLine, int)
glfwWindowHint(GLFW_BLUE_BITS, vmode->blueBits); glfwWindowHint(GLFW_BLUE_BITS, vmode->blueBits);
glfwWindowHint(GLFW_REFRESH_RATE, vmode->refreshRate); glfwWindowHint(GLFW_REFRESH_RATE, vmode->refreshRate);
window = glfwCreateWindow(width, height, "EU07++", monitor, nullptr); GLFWwindow *window =
} glfwCreateWindow(Global::iWindowWidth, Global::iWindowHeight,
else "EU07++", Global::bFullScreen ? monitor : nullptr, nullptr);
window = glfwCreateWindow(width, height, "EU07++", nullptr, nullptr);
if (!window) if (!window)
return -1; return -1;