• Windows: SwapBuffers with Frame Buffer Objects ? +(no-tearing/vsync/swa

    From skybuck2000@hotmail.com@21:1/5 to All on Wed Feb 19 19:44:09 2020
    Frame Buffer Object allow offscreen rendering.

    Thus immediately reminds me of tearing problems and vertical sync.

    So now the all important question is it actually possible to do this basic operation ?

    Swap "offscreen frame buffer object" to "default frame buffer" ?

    From reading around the internet it seems that there is something called:

    "draw_framebuffer" and "read_framebuffer".

    There is also something called:

    "front" "back" if default frame buffer (0)

    There is also something called

    "attachmentpoint0" or something like that.

    So let's suppose two frame buffer objects are created.

    FrameBufferObject 0 (to get access to default frame buffer)
    FrameBufferObject 1 (to create an offscreen frame buffer)

    Let's setup a viewport to for both for all I care or one to be applied to both.

    FrameBufferObject0 can be set to front
    FrameBufferObject1 can be set to attachment point 0

    Is it now possible to call "SwapBuffers" from Windows API to actually swap ?!

    Or is this basic functionality not available in OpenGL ?

    SwapBuffers is very important it seems the only way to work together with swap_interval(1) which sets vertical synchronization to 1.

    Also the only other way all of this would make any sense is if offscreen framebuffers, textures, and what not where rendering to "back" buffer first.

    To then swap to front ?!?

    However "rendering" to back buffer is not so simple, this would require glBlitFrameBuffer or some kind of blit call ?!? Some say this costs 5 milliseconds or so.

    I would like to find the best possible way to flip/swap an offscreen frame buffer to the front buffer. Otherwise I see little use for this "frame buffer object".

    However I also plan on using CUDA... and I also want the fastest way to "blit/draw" some pixels in cuda to some buffer which is then displayed on screen with no tearing and vertical synchronization.

    I have one application setup which uses pixel buffer object and cuda.

    Another application which uses front/back double buffering, swapbuffers and vertical sync.

    Now I need to merge the two code bases so cuda visualizations can be done with no-tearing ?!

    I would like to avoid rendering to texture and then rendering the texture, this seems stupid and possibly unnecessary performance hit ?!?

    Later it might be usefull to use a larger then screen offscreen rendering buffer, to use it to scroll across this offscreen framebuffer if altering the viewport settings allows this ?

    Is it possible to use offscreen framebuffer + viewport settings to implement a scrolling effect ?

    Bye,
    Skybuck.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)