Forward Compatible Context
fenbf opened this issue · comments
should Forward Compatible Context flag be really used?
I've found this answer at StackExchange and it says:
Never, ever, ever, EVER use FORWARD_COMPATIBLE for ANYTHING.
So maybe this line from main.cpp
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
should be simply removed?
I think you are mistaking GLUT and GLFW (two different libraries). I believe that forward compatible contexts can be used safely in GLFW.
Wes
From: Bartłomiej Filipek [mailto:notifications@github.com]
Sent: Thursday, February 05, 2015 1:06 AM
To: daw42/glslcookbook
Subject: [glslcookbook] Forward Compatible Context (#29)
should Forward Compatible Context flag be really used?
I've found this answer at StackExchangehttp://gamedev.stackexchange.com/a/28332/34216 and it says:
Never, ever, ever, EVER use FORWARD_COMPATIBLE for ANYTHING.
So maybe this line from main.cpp
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
should be simply removed?
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/29.
all in all those flags goes to native OS API calls (wgl, glx...) and even on OpenGL wiki page Creating OpenGL Context WGL there is a note that forward compatible context should not be used.
This book is based on OpenGL 4.0 so I believe that a forward compatible context may be appropriate. Also the OpenGL wiki is not necessarily the most up to date: that link you referenced is OpenGL 3.x
Wes
From: Bartłomiej Filipek [mailto:notifications@github.com]
Sent: Thursday, February 05, 2015 1:11 AM
To: daw42/glslcookbook
Cc: Wes Reardan
Subject: Re: [glslcookbook] Forward Compatible Context (#29)
all in all those flags goes to native OS API calls (wgl, glx...) and even on OpenGL wiki page Creating OpenGL Context WGLhttps://www.opengl.org/wiki/Creating_an_OpenGL_Context_(WGL) there is a note that forward compatible context should not be used.
—
Reply to this email directly or view it on GitHubhttps://github.com//issues/29#issuecomment-73015310.
Thanks for the note. It's interesting that people have such strong opinions about this.
I chose to use a forward compatible context because I wanted to make sure that I was only using non-deprecated features in a 4.x core profile. I think that the comment on StackExchange is a bit over the top. If you really want to stick with just non-deprecated features, there's nothing wrong with using a forward compatible context. The statement on the OpenGL Wiki doesn't elaborate as to why one should not use a forward compatible context. I'd be interested to hear why that statement is there.
Regardless, it wouldn't hurt to remove it, but I currently don't see the harm of using it.