-
-
Notifications
You must be signed in to change notification settings - Fork 10.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opengl3+glfw+glad it is error #2806
Comments
Hi, @bizehao. Anyway... In this case (if the case is this) would be enough change the GLFW context initialization from: glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 0); to glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); below I add my initialization: it works with GLFW and GLAD glfwSetErrorCallback(glfwErrorCallback);
if (!::glfwInit()) exit(EXIT_FAILURE);
// I use 4.5 context (or 4.1 on APPLE), but you can change it to 3.3 if need it
glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 4);
#ifdef APP_REQUIRE_OGL45
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 5);
#else
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
#endif
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, GL_TRUE);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_ANY_PROFILE);
glfwWindowHint(GLFW_DOUBLEBUFFER, GL_TRUE);
setGLFWWnd(glfwCreateWindow(GetWidth(), GetHeight(), getWindowTitle(), NULL, NULL));
if (!getGLFWWnd())
{
glfwTerminate();
exit(EXIT_FAILURE);
}
glfwMakeContextCurrent(getGLFWWnd());
//Init GLAD
gladLoadGLLoader((GLADloadproc) glfwGetProcAddress);
glfwSetWindowSizeCallback(getGLFWWnd(), glfwWindowSizeCallback);
glfwSwapInterval(1); |
thank you |
@BrutPitt Change the version of the statement by using your method glad. it is success, Thank you. |
I am Chinese,Maybe my English is a little bad. i am sorry
I've been tested.
(
target_link_libraries(ImguiTest PRIVATE gl3w)
#target_link_libraries(ImguiTest PRIVATE GLEW::GLEW)
#target_link_libraries(ImguiTest PRIVATE glad)
)
opengl3+glfw+gl3w and opengl3+glfw+glew are Perfect operation,
but opengl3+glfw+glad it is error, and it is show "Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)" and I don't understand
I debug it , it may be glBindSampler() , I Uncertain
The text was updated successfully, but these errors were encountered: