Multisasmpled pixelformat

To get a multisampled context we first need a function pointer to wglChoosePixelFormatARB, which requires an OpenGL context, which requires a DC with SetPixelFormat already called for it, which requires a separate window from the one to be used with multisampling.

I currently do:
SetPixelFormat( SplashWindowDC, 1, @PFD );
GL_Context := wglCreateContext( SplashWindowDC );
wglMakeCurrent( SplashWindowDC, GL_Context );
…Check extensions…
…Get function pointers…
wglChoosePixelFormatARB( RenderWindowDC, @AttribIList, @AttribFList, 1, @PixelFormat, @NumFormats );
wglMakeCurrent( SplashWindowDC, nil );
wglDeleteContext( GL_Context );
SetPixelFormat( RenderWindowDC, PixelFormat, @PFD );
GL_Context := CreateContext( RenderWindowDC );
wglMakeCurrent( RenderWindowDC, GL_Context );

  1. Is setting the splash window pixelformat to ‘1’ OK?
    I would rather avoid calling ChoosePixelFormat as it sometimes does strange things like not returning until all my other threads are suspended in WaitForSingleObject.
    Accelerated pixelformats are always first so selecting #1 should guarentee this, and i dont care about anything else in the pixelformat as long as i can create a context from it.
  2. Can the extensions list ever change for different hardware accelerated pixelformats.
  3. Do the two windows need to be on the same monitor in a multiple monitor setup.
  4. Does the video mode need to be set before the above, i think i read somewhere that the pixelformat ID’s can be different in different video modes.
  5. Does it matter if the rendering window is fullscreen but the other one isn’t.

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