wglext - extension not installed in OpenGL context

前端 未结 2 874
春和景丽
春和景丽 2021-01-21 22:10

I am trying to disable vsync in OpenGl with WGL_EXT_swap_control using wglSwapIntervalEXT(int interval).

I am trying to include the wglext header but after much searchin

2条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-21 22:41

    Just to include header #include "gl\wglext.h" is not enough. You need to also register the extension to OpenGL. If you do not have a clue how to do it google for some tutorial but much much easier and safer is to use some extension registering library like GLEW see:

    • using GLEW
    • complete GL+VAO/VBO+GLSL+shaders example in C++
    • Multi-texturing example at the end is download link to complete C++ GL project with GLEW source included

    After successful glewInit(); call your extension should be available (if present on the gfx card/driver.

    Without registering extensions you got access to only basic OpenGL 1.0 stuff.

提交回复
热议问题