Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 1 of 1

Thread: Multisample & glCopyTexSubImage2D

  1. #1
    Junior Member Regular Contributor
    Join Date
    Oct 2007
    Location
    Phoenix, AZ
    Posts
    110

    Multisample & glCopyTexSubImage2D

    I have a glcontext setup with multisample.
    It works fine and looks good at 16 samples.

    I need to copy the pixel results at a certain point in the render to a texture.
    I have tried this with glCopyTexImage2D and glCopyTexSubImage2D.
    Both calls work.
    But the data they get does not contain all the samples yet.

    For example, the multisample view renders this high quality output:

    (magnified to show pixels clearly)

    Click image for larger version. 

Name:	quality_fqrj1ew04p.jpg 
Views:	29 
Size:	12.1 KB 
ID:	827

    But when I go grab the pixels into my texture, the quality is lower:
    Click image for larger version. 

Name:	poor_5vwbu82fxf.jpg 
Views:	26 
Size:	11.5 KB 
ID:	828

    (after some experimentation, this turns out to be how it looks when multisample is set to 2)

    I think that multisample render target hasn't finished pushing the samples into the framebuffer yet.
    I have tried calling glFinish() and glFlush() before doing my copy command, but it didn't change anything.

    Anyone know how to force a multisample render target to copy it's final output to a texture?
    Last edited by CRasterImage; 07-26-2012 at 11:49 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •