mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 17:29:18 +02:00
multisampling
This commit is contained in:
31
EU07.cpp
31
EU07.cpp
@@ -212,28 +212,21 @@ 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;
|
// match requested video mode to current to allow for
|
||||||
if (fullscreen)
|
// fullwindow creation when resolution is the same
|
||||||
{
|
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
||||||
// match requested video mode to current to allow for
|
const GLFWvidmode *vmode = glfwGetVideoMode(monitor);
|
||||||
// fullwindow creation when resolution is the same
|
|
||||||
|
|
||||||
GLFWmonitor *monitor = glfwGetPrimaryMonitor();
|
glfwWindowHint(GLFW_RED_BITS, vmode->redBits);
|
||||||
const GLFWvidmode *vmode = glfwGetVideoMode(monitor);
|
glfwWindowHint(GLFW_GREEN_BITS, vmode->greenBits);
|
||||||
|
glfwWindowHint(GLFW_BLUE_BITS, vmode->blueBits);
|
||||||
|
glfwWindowHint(GLFW_REFRESH_RATE, vmode->refreshRate);
|
||||||
|
|
||||||
glfwWindowHint(GLFW_RED_BITS, vmode->redBits);
|
GLFWwindow *window =
|
||||||
glfwWindowHint(GLFW_GREEN_BITS, vmode->greenBits);
|
glfwCreateWindow(Global::iWindowWidth, Global::iWindowHeight,
|
||||||
glfwWindowHint(GLFW_BLUE_BITS, vmode->blueBits);
|
"EU07++", Global::bFullScreen ? monitor : nullptr, nullptr);
|
||||||
glfwWindowHint(GLFW_REFRESH_RATE, vmode->refreshRate);
|
|
||||||
|
|
||||||
window = glfwCreateWindow(width, height, "EU07++", monitor, nullptr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
window = glfwCreateWindow(width, height, "EU07++", nullptr, nullptr);
|
|
||||||
|
|
||||||
if (!window)
|
if (!window)
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user