2014-09-18 4 views
0

GLFW3 사용하여 창을 만들려고합니다. 바탕 화면에서이 작업을 수행하면 정상적으로 작동합니다. 내 랩톱에서 창을 만들지 못하고 프로그램이 충돌합니다. glfwWindowHint() 호출을 제거하면 충돌을 방지 할 수 있지만 잘못된 버전의 OpenGL을 사용하기 때문에 코드가 작동하지 않습니다. 다음은 창 코드입니다.GLFW 창 만들기 실패 glfwWindowHint() 호출 후

내 랩톱에 그래픽이 통합되어있는 동안 내 바탕 화면에 NVidia 그래픽이있는 것과 관련이 있습니다.

업데이트 : glfwSwapBuffers() 호출시 충돌이 발생하고 glfw 오류 65543이 콘솔에 인쇄됩니다. glfwCreateWindow()가 NULL을 반환합니다.

+2

프로그램이 어떻게 충돌합니까? 'glfw' 호출 중 하나에 있습니까? 그렇다면 어떤 것입니까? 크래시에서 스택 덤프를 가져올 수 있습니까? –

+1

노트북이 OpenGL 4.1 이상을 지원합니까? [GLFW 디버그 콜백] (http://www.glfw.org/docs/latest/group__error.html#gaa5d796c3cf7c1a7f02f845486333fb5f)을 사용하지 않는 이유는 무엇입니까? – genpfault

+0

온보드 카드에서 실행중인 경우 GL4.1을 지원하지 않을 가능성이 높습니다. –

답변

0

오류 65543을 콘솔에 인쇄하면 glfw3.h에 GLFW_VERSION_UNAVAILABLE로 정의 된 0x00010007과 동일합니다.

/*! @brief The requested OpenGL or OpenGL ES version is not available. 
* 
* The requested OpenGL or OpenGL ES version (including any requested context 
* or framebuffer hints) is not available on this machine. 
* 
* @par Analysis 
* The machine does not support your requirements. If your application is 
* sufficiently flexible, downgrade your requirements and try again. 
* Otherwise, inform the user that their machine does not match your 
* requirements. 
* 
* @par 
* Future invalid OpenGL and OpenGL ES versions, for example OpenGL 4.8 if 5.0 
* comes out before the 4.x series gets that far, also fail with this error and 
* not @ref GLFW_INVALID_VALUE, because GLFW cannot know what future versions 
* will exist. 
*/ 
#define GLFW_VERSION_UNAVAILABLE 0x00010007