VSync

How can I create and use OpenGL rendering context with vsync enabled with WGL API?

Create your context, then use this extension:
http://www.opengl.org/registry/specs/EXT/wgl_swap_control.txt

Hi HenriH,
You can do that.
look at the function below, call this function once before render function. Hope this will solve your problem.

void VerticalSync(bool enable)
{
// WGL_EXT_swap_control
typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC)(GLint);
static PFNWGLSWAPINTERVALEXTPROC wglSwapIntervalEXT = 0;

if (!wglSwapIntervalEXT)
{
    wglSwapIntervalEXT = reinterpret_cast<PFNWGLSWAPINTERVALEXTPROC>(
        wglGetProcAddress("wglSwapIntervalEXT"));
}

if (wglSwapIntervalEXT)
    wglSwapIntervalEXT(enable ? 1 : 0);

}

Thank you for your kind answers. Could please instruct me also in the following topics:

  1. How do enable multisampling with WGL?

  2. What are these Pbuffer objects? How do I create them and what can I do with them? How do they differ from aux buffers and FBOs?

Cheers

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.