1
0
Fork 0
mirror of https://github.com/bjornbytes/lovr.git synced 2024-07-02 12:33:52 +00:00

Use same window hints for webgl and desktop;

It doesn't seem like this causes any problems anymore.
This commit is contained in:
bjorn 2018-08-30 21:43:20 -07:00
parent 7055875cfa
commit 7222d1fa26

View file

@ -53,7 +53,6 @@ void lovrGraphicsCreateWindow(int w, int h, bool fullscreen, int msaa, const cha
lovrAssert(!state.window, "Window is already created"); lovrAssert(!state.window, "Window is already created");
if ((state.window = glfwGetCurrentContext()) == NULL) { if ((state.window = glfwGetCurrentContext()) == NULL) {
#ifndef EMSCRIPTEN
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
@ -61,13 +60,6 @@ void lovrGraphicsCreateWindow(int w, int h, bool fullscreen, int msaa, const cha
glfwWindowHint(GLFW_SAMPLES, msaa); glfwWindowHint(GLFW_SAMPLES, msaa);
glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE); glfwWindowHint(GLFW_RESIZABLE, GLFW_FALSE);
glfwWindowHint(GLFW_SRGB_CAPABLE, state.gammaCorrect); glfwWindowHint(GLFW_SRGB_CAPABLE, state.gammaCorrect);
#else
glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_ES_API);
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0);
glfwWindowHint(GLFW_SAMPLES, msaa);
glfwWindowHint(GLFW_SRGB_CAPABLE, state.gammaCorrect);
#endif
GLFWmonitor* monitor = glfwGetPrimaryMonitor(); GLFWmonitor* monitor = glfwGetPrimaryMonitor();
const GLFWvidmode* mode = glfwGetVideoMode(monitor); const GLFWvidmode* mode = glfwGetVideoMode(monitor);